draw.multivariate.laplace {MultiRNG} | R Documentation |
Pseudo-Random Number Generation under Multivariate Laplace Distribution
Description
This function implements pseudo-random number generation for a multivariate Laplace (double exponential) distribution with pdf
for and
,
is symmetric and positive definite, where
,
, and
are the mean vector, the variance-covariance matrix, and the shape parameter, respectively.
Usage
draw.multivariate.laplace(no.row,d,gamma,mu,Sigma)
Arguments
no.row |
Number of rows to generate. |
d |
Number of variables to generate. |
gamma |
Shape parameter. |
mu |
Vector of means. |
Sigma |
Variance-covariance matrix. |
Value
A matrix of generated data.
References
Ernst, M. D. (1998). A multivariate generalized Laplace distribution. Computational Statistics, 13, 227-232.
See Also
Examples
cmat<-matrix(c(1,0.2,0.3,0.2,1,0.2,0.3,0.2,1), nrow=3, ncol=3)
mu.vec=c(0,3,7)
mydata=draw.multivariate.laplace(no.row=1e5,d=3,gamma=2,mu=mu.vec,Sigma=cmat)
apply(mydata,2,mean)-mu.vec
cor(mydata)-cmat
[Package MultiRNG version 1.2.4 Index]