| Mvdc {copula} | R Documentation |
Density, distribution function, and random generator for a multivariate distribution via copula.
mvdc(copula, margins, paramMargins) dmvdc(mvdc, x) pmvdc(mvdc, x) rmvdc(mvdc, n)
copula |
an object of "copula". |
margins |
a character vector specifying all the marginal distributions. See details below. |
paramMargins |
a list whose each component is a list of named components, giving the parameter values of the marginal distributions. See details below. |
mvdc |
a "mvdc" object. |
x |
a vector of the copula dimension or a matrix with number of rows being the copula dimension, giving the coordinates of the points where the density or distribution function needs to be evaluated. |
n |
number of observations to be generated. |
The characters in argument margins are used to construct
density, distribution, and quantile function names. For
example, norm can be used to specify marginal distribution,
because dnorm, pnorm, and qnorm are all
available.
A user-defined distribution, for example, fancy, can be used as
margin provided that dfancy, pfancy, and qfancy are
available.
Each component list in argument paramMargins is a list with
named components which are used to specify the parameters of the
marginal distributions. For example,
paramMargins = list(list(mean = 0, sd = 2), list(rate = 2))
can be used to specify that the first margin is normal with mean 0 and
standard deviation 2, and the second margin is exponential with rate 2.
"mvdc" constructs an object of class "mvdc".
"dmvdc" gives the density, "pmvdc" gives the distribution
function, and "rmvdc" generates random variates.
ellipCopula,
archmCopula,
mvdc-class,
copula-class.
## construct a bivariate distribution whose marginals
## are normal and exponential respectively, coupled
## together via a normal copula
x <- mvdc(normalCopula(0.75), c("norm", "exp"),
list(list(mean = 0, sd =2), list(rate = 2)))
x.samp <- rmvdc(x, 100)
dmvdc(x, x.samp)
pmvdc(x, x.samp)
persp(x, dmvdc, xlim = c(-4, 4), ylim=c(0, 1))