[R] Random sample from log-normal distribution

Juan Pablo Lewinger lewinger at usc.edu
Sat Nov 18 20:05:43 CET 2006


> Dear all R users,
> 
> Please forgive me if my question is too trivial.
> Suppose I have two variables, (x,y) which is
> log-normally distributed with expected value (mu1,
> mu2) and some variance-covariance matrix. Now I want
> to draw a random sample of size 1000 from this
> distribution. Is there any function available to do
> this?
> 
> Thanks and regards,
> Megh


If what you really want is a bivariate lognormal, you can generate first a 
bivariate normal sample (X,Y) with the function rmvnorm in package mvtnorm.  
Then exp(X,Y) will be multivariate lognormal.



More information about the R-help mailing list