View source: R/random_values_simulation.R
Multivariate Laplace random values simulation | R Documentation |
Multivariate Laplace random values simulation.
rmvlaplace(n, lam, mu, G, seed = NULL)
n |
The sample size, a numerical value. |
lam |
The the parameter of the exponential distribution, a positive number. |
mu |
The mean vector. |
G |
A |
seed |
If you want the same to be generated again use a seed for the generator, an integer number. |
The algorithm uses univariate normal random values and transforms them to multivariate via a spectral decomposition.
A matrix with the simulated data.
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>
Eltoft T., Kim T., and Lee T.W. (2006). On the multivariate laplace distribution. Signal Processing Letters, IEEE, 13(5):300-303.
rmvnorm, racg, rmvt
m <- colmeans( as.matrix( iris[, 1:4] ) )
s <- cov(iris[,1:4])
s <- s / det(s)^0.25
lam <- 3
x <- rmvlaplace(100, lam, m, s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.