[R] generating lognormal variables with given correlation

Francisco J. Zagmutt gerifalte28 at hotmail.com
Fri Mar 23 17:56:01 CET 2007


This reference may be relevant for you: Connover, W.J., Iman, R.L. A 
distribution-free approach to inducing rank correlation among input 
variables. Technometric, 3, 311-334, 1982.

Also, you may want to look at a more modern approach implemented in the 
copula package:
install.packages("copula")
library(help="copula")

I hope this helps,

Francisco,


Karl Ove Hufthammer wrote:
> Mollet, Fabian:
> 
>> I would like these (lognormal distributed) parameters to be correlated,
>> that is, I would like to have pairwise samples of 2 parameters with a
>> given correlation coefficient.
>>  
>> I have seen that a covariance matrix can be fixed when generating random
>> variables from a multivariate normal distribution e.g. by the function
>> mvrnorm.
>>  
>> Is there a function to do the same for a multivariate lognormal
>> distribution?
> 
> I don't know about any, but you should be aware that not all values of the 
> correlation is possible with lognormal distributions. For example, if both 
> variables have a standard lognormal distribution, they can't have correlation 
> less than 1/e = -0.37. As the variance of the two distributions increase, the 
> absolute value of the maximum and minimum correlation possible decrease (to 
> zero).
> 
> Using the normal product-moment correlation as a measure of dependence rarely 
> makes much sense unless the association between the variables is linear.
>



More information about the R-help mailing list