unuran.cont.new {Runuran}R Documentation

Create a UNU.RAN continuous univariate distribution object

Description

Create a new UNU.RAN object for a continuous univariate distribution. The interface might be changed in future releases. Do not use unnamed arguments!

[Advanced] – Continuous Distribution.

Usage

unuran.cont.new( cdf=NULL, pdf=NULL, dpdf=NULL, islog=FALSE,
                 lb=NA, ub=NA, mode=NA, center=NA, area=NA, name=NA)

Arguments

cdf cumulative distribution function. (R function)
pdf probability density function. (R function)
dpdf derivative of the pdf. (R 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)

Details

Creates an instance of class unuran.cont.

The user is responsible that the given informations are consistent. It depends on the chosen method which information must be given / are used.

Note

unuran.cont.new(...) is an alias for new("unuran.cont", ...).

Author(s)

Josef Leydold and Wolfgang H"ormann unuran@statmath.wu-wien.ac.at.

References

W. H"ormann, J. Leydold, and G. Derflinger (2004): Automatic Nonuniform Random Variate Generation. Springer-Verlag, Berlin Heidelberg.

See Also

unuran.cont, unuran.new, unuran.

Examples

## Get a distribution object with given pdf, domain and mode
mypdf <- function (x) { exp(-x) }
distr <- unuran.cont.new(pdf=mypdf, islog=FALSE, lb=0, ub=Inf, mode=0)


[Package Runuran version 0.9.0 Index]