Multivariate Lognormal Simulation with Correlation

A multivariate lognormal simulator.
5.9K Downloads
Updated 6 Dec 2004

View License

MVLOGNRAND MultiVariate Lognormal random numbers with correlation.

This function will generate multivariate lognormal random numbers with correlation.

Often one would simulation a lognormal distribution by first simulating a normal and then taking the exponent of it.

If you provide the correlation matrix to the multivariate normal random number generator and then exponeniate the results, you will not have the correlation stucture you input in the normal distribution because of the exponeniation. This function adjusts for that and passes the adjusted correlation matrix to the normal random number generator.

Example:
Mu = [ 11 12 13 ];
Sigma= [ .1 .3 .5 ];
Sims= 1e6;
CorrMat=[1 .2 .4 ; .2 1 .5 ; .4 .5 1];
y=MvLogNRand(Mu,Sigma,Sims,CorrMat );

corrcoef(y)
ans =
1 0.19927 0.40156
0.19927 1 0.50008
0.40156 0.50008 1

CorrMat =
1 0.2 0.4
0.2 1 0.5
0.4 0.5 1

Cite As

Stephen Lienhard (2024). Multivariate Lognormal Simulation with Correlation (https://www.mathworks.com/matlabcentral/fileexchange/6426-multivariate-lognormal-simulation-with-correlation), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Spelling change in title and description.