I am a supporter of
St. Joseph's hospice.
 If you find this site useful or if it helped you, consider a small donation to
St. Joseph's, please.

Information on
St. Joseph's

JustGiving - Sponsor me now!

 

Iman Conover WS

The Iman Conover approach is a good method to generate correlated numbers.

The original paper by Iman and Conover you can find here.

Stephen J. Mildenhall published a very good paper on this approach here.

I created an Excel © file following the example given in Mildenhall’s paper:

The input matrix X:

sbRandCorr_01_Screen

The target correlation S:

sbRandCorr_02_Screen

The Cholesky decomposition C of S:

sbRandCorr_03_Screen

The intermediate matrix M (constant values to to equal Mildenhall’s data:

sbRandCorr_04_Screen

You can create similar data automatically with array formula in A1:A20:

=NORMSINV(ROW(INDIRECT("1:20"))/21)/STDEVPA(NORMSINV(ROW(INDIRECT("1:20"))/21))

and with the array formula =randomshuffle($A$1:$A$20) in cells B1:B20 (copy to columns C and D respectively).

Now you get the covariance matrix E:

And its Cholesky decomposition F:

sbRandCorr_05_Screen
sbRandCorr_06_Screen

The intermediate matrix T:

You can check the generated correlations:

sbRandCorr_07_Screen
sbRandCorr_08_Screen

Calculate the ranks of numbers in the columns of T:

sbRandCorr_09_Screen

The random shuffle code:

Finally you get your result:

sbRandCorr_10_Screen
sbRandomShuffle_01_Code

If you like to use a VBA solution for the Iman Conover approach, look here, please.

If you are interested in downloading a 55 KB Excel 2010 sample file go to my Download page, please.

Sulprobil   Get it done   Contact   Disclaimer   Download