Learn R Programming

Runuran (version 0.40)

unuran.cmv.new: Create a UNU.RAN continuous multivariate distribution object

Description

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

[Advanced] -- Continuous Multivariate Distribution.

Usage

unuran.cmv.new(dim=1, pdf=NULL, ll=NULL, ur=NULL,
               mode=NULL, center=NULL, name=NA)

Arguments

dim

number of dimensions of the distribution. (integer)

pdf

probability density function. (R function)

ll,ur

lower left and upper right vertex of a rectangular domain of the pdf. The domain is only set if both vertices are not NULL. Otherwise, the domain is unbounded by default. (numeric vectors)

mode

location of the mode. (numeric vector -- optional)

center

point in “typical” region of distribution, e.g. the approximate location of the mode. It is used by several methods to locate the main region of the distribution. If omitted the mode is implicitly used. If the mode is not given either, the origin is used. (numeric vector -- optional)

name

name of distribution. (string)

Author

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

Details

Creates an instance of class unuran.cmv.

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

References

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

See Also

unuran.cmv, unuran.new, unuran.

Examples

Run this code
## Get a distribution object with given pdf and mode
mvpdf <- function (x) { exp(-sum(x^2)) }
mvd <- unuran.cmv.new(dim=2, pdf=mvpdf, mode=c(0,0))

## Restrict domain to rectangle [0,1]x[0,1] and set
## mode to (0,0)
mvpdf <- function (x) { exp(-sum(x^2)) }
mvd <- unuran.cmv.new(dim=2, pdf=mvpdf, ll=c(0,0), ur=c(1,1), mode=c(0,0))

Run the code above in your browser using DataLab