Skip to contents

This is generic function for distribution objects. This function calculates the probability density function (pdf) for the current parameters and xmin value.

Usage

dist_pdf(m, q = NULL, log = FALSE)

# S4 method for class 'conlnorm'
dist_pdf(m, q = NULL, log = FALSE)

# S4 method for class 'conexp'
dist_pdf(m, q = NULL, log = FALSE)

# S4 method for class 'conpl'
dist_pdf(m, q = NULL, log = FALSE)

# S4 method for class 'conweibull'
dist_pdf(m, q = NULL, log = FALSE)

# S4 method for class 'disexp'
dist_pdf(m, q = NULL, log = FALSE)

# S4 method for class 'dislnorm'
dist_pdf(m, q = NULL, log = FALSE)

# S4 method for class 'displ'
dist_pdf(m, q = NULL, log = FALSE)

# S4 method for class 'dispois'
dist_pdf(m, q = NULL, log = FALSE)

Arguments

m

a distribution object.

q

a vector values where the function will be evaluated. If q is NULL (default), then the data values will be used.

log

default FALSE. If TRUE, probabilities are given as log(p).

Value

The probability density (or mass) function

Note

This method does not alter the internal state of the distribution objects.

Examples

##########################################
#Create distribution object              #
##########################################
m = displ$new()
m$setXmin(7); m$setPars(2)

##########################################
#Calculate the pdf at particular values  #
##########################################
dist_pdf(m, 7:10)
#> [1] 0.13291308 0.10176158 0.08040421 0.06512741