| rmLaplace {L1pack} | R Documentation |
Random number generation from the multivariate Laplace distribution.
rmLaplace(n = 1, center = rep(0, nrow(Scatter)), Scatter = diag(length(center)))
n |
the number of samples requested |
center |
a vector giving the locations of each variable |
Scatter |
a positive-definite dispersion matrix |
The function rmLaplace is an interface to C routines, which make calls to
subroutines from LAPACK. The matrix decomposition is internally done using
the Cholesky decomposition. If Scatter is not non-negative definite then
there will be a warning message.
If n = 1 a vector of the same length as center, otherwise a
matrix of n rows of random vectors.
Gomez, E., Gomez-Villegas, M.A., and Marin, J.M. (1998). A multivariate generalization of the power exponential family of distributions. Communications in Statistics - Theory and Methods 27, 589-600.
Kotz, S., Kozubowski, T.J., and Podgorski, K. (2001). The Laplace Distributions and Generalizations. Birkhauser, Boston.
# dispersion parameters
Scatter <- matrix(c(1,.5,.5,1), ncol = 2)
Scatter
# generate the sample
y <- rmLaplace(n = 2000, Scatter = Scatter)
# scatterplot of a random bivariate Laplace sample with center
# vector zero and scale matrix 'Scatter'
par(pty = "s")
plot(y, xlab = "", ylab = "")
title("bivariate Laplace sample", font.main = 1)