Learn R Programming

Rfast (version 1.7.3)

Multivariate Laplace random values simulation: Multivariate Laplace random values simulation

Description

Multivariate Laplace random values simulation.

Usage

rmvlaplace(n, lam, mu, G)

Arguments

n
The sample size, a numerical value.
lam
The the parameter of the exponential distribution, a positive number.
mu
The mean vector.
G
A $d \times d$ covariance matrix with determinant 1.

Value

A matrix with the simulated data.

Details

The algorithm uses univariate normal random values and transforms them to multivariate via a spectral decomposition.

References

Eltoft T., Kim T., and Lee T.W. (2006). On the multivariate laplace distribution. Signal Processing Letters, IEEE, 13(5):300-303.

See Also

rmvnorm, racg, rmvt

Examples

Run this code
m <- colmeans( as.matrix( iris[, 1:4] ) )
s <- cov(iris[,1:4])
s <- s / det(s)^0.25
lam <- 3
x <- rmvlaplace(1000, lam, m, s)

Run the code above in your browser using DataLab