# mvexp: The Multivariate Exponential Distribution In lcmix: Layered and chained mixture models

## Description

Density and random generation functions for the multivariate exponential distribution constructed using a normal (Gaussian) copula.

## Usage

 ```1 2``` ```dmvexp(x, rate, corr=diag(ncol(x)), log=FALSE) rmvexp(n, rate=1, corr=diag(length(rate))) ```

## Arguments

 `x` a numeric matrix of which each row represents an observation. `rate` a vector of rate parameters for the marginal distributions of the columns of `x`. If `length(rate) < ncol(x)`, the elements of `rate` will be recycled. If `length(rate) > ncol(x)`, the `rate` vector will be truncated and a warning given. `corr` the correlation matrix. See Details. `log` logical; if `TRUE`, density is given as the log-density. `n` number of vectors to simulate.

## Details

The construction of multivariate distributions from univariate marginal distributions using normal copulas is discussed in Song (2000). Briefly, given univariate marginal densities and the corresponding distribution functions (here, the exponential distribution), the standard normal quantiles of the values of the distribution functions follow a multivariate standard normal distribution, that is, a multivariate normal distribution with marginal means of 0 and marginal variances of 1. Thus the covariance matrix is referred to as the correlation matrix in this context.

## Value

For `dmvexp`, a vector of densities. For `rmvexp`, a vector with `n` rows and `ncol(corr)` columns representing a sample from the multivariate exp distribution with the specified parameters.

Daniel Dvorkin

## References

Song, P. (2000) Multivariate dispersion models generated from Gaussian copula. Scandinavian Journal of Statistics 27, 305–320.

## See Also

`mvnorm`, `mvweisd` for related distributions; `thetahat` for parameter estimation.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17``` ```set.seed(123) r <- 2:3 rho <- matrix(c(1, 0.5, 0.5, 1), ncol=2) x <- rmvexp(5, r, rho) x # [,1] [,2] #[1,] 0.05569265 0.025983192 #[2,] 0.02328782 0.009049892 #[3,] 0.10527587 0.003011938 #[4,] 0.11576801 0.227582536 #[5,] 0.10297173 0.330607553 dmvexp(x, r, rho) # [1] 10.389920 18.910258 7.690541 2.501572 1.478549 ```

lcmix documentation built on May 31, 2017, 5 a.m.