Learn R Programming

poweRlaw (version 0.80.0)

dist_pdf: The probability density function (pdf)

Description

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 conlnorm dist_pdf(m, q = NULL, log = FALSE)

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

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

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

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

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

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

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

Value

The probability density (or mass) function

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).

See Also

dist_cdf(), dist_ll() and dist_rand()

Examples

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

##########################################
#Calculate the pdf at particular values  #
##########################################
dist_pdf(m, 7:10)

Run the code above in your browser using DataLab