Class unuran.cont provides an interface to UNU.RAN objects for continuous distributions. The interface might be changed in future releases. Do not use unnamed arguments!
[Advanced] -- Continuous Distribution Object.
class
Details
Create a new instance of a unuran.cont object using
cdf: cumulative distribution function. ( function)
pdf: probability density function. ( function)
dpdf: derivative of the pdf. ( function)
islog: whether the given cdf and pdf are given by their logarithms (the dpdf is then the derivative of the logarithm). (boolean)
lb: lower bound of domain; use -Inf if unbounded from left. (numeric)
ub: upper bound of domain; use Inf if unbounded from right. (numeric)
mode: mode of distribution. (numeric)
center: typical point (center ) of distribution. If not given the mode is used. (numeric)
area: area below pdf; used for computing normalization constants if required. (numeric)
name: name of distribution. (string)
The user is responsible that the given informations are consistent. It depends on the chosen method which information must be given / are used.
Examples
## Create continuous distribution with given logPDF and its derivativepdf <-function(x){-0.5*x^2}dpdf <-function(x){-x }distr <- new("unuran.cont", pdf=pdf, dpdf=dpdf, islog=TRUE, lb=-Inf, ub=Inf)