Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Induce Correlation

2 views
Skip to first unread message

elad...@gmail.com

unread,
Nov 7, 2007, 1:42:41 PM11/7/07
to
Hello,

I wonder if anyone can help me on how to inudce correlation between
variables in Excel.

Thanks

elad...@gmail.com

unread,
Nov 7, 2007, 1:44:03 PM11/7/07
to
Hello,

I wonder if anyone can help me with how to induce correlation between
variables using Excel.

I would appreciate your support.

Thanks

Paige Miller

unread,
Nov 7, 2007, 2:10:52 PM11/7/07
to
On Nov 7, 1:44 pm, elada...@gmail.com wrote:
> Hello,
>
> I wonder if anyone can help me with how to induce correlation between
> variables using Excel.

The easiest way is to make Column 2 to be a linear function of Column
1, plus some random noise.

--
Paige Miller
paige\dot\miller \at\ kodak\dot\com

Jack Tomsky

unread,
Nov 7, 2007, 2:28:17 PM11/7/07
to


If X and Y are uncorrelated, each having variance one, set

U = X
V = r*X + sqrt(1-r^2)*Y.

Then Var(U) = Var(V) = 1 and Corr(U,V) = r.

Jack

elad...@gmail.com

unread,
Nov 8, 2007, 11:11:59 AM11/8/07
to
Thanks guys for the input !

However, I need to induce/impose correlation between multi variables
(around 8) not only 2.

Also, I need to that in excel suings its commands.

I would really appreciate your suport in this matter.

thanks

Jack Tomsky

unread,
Nov 8, 2007, 4:59:45 PM11/8/07
to

Let's say that you want a set of rvs Z1, ..., Z8 whose specified covariance matrix is SIGMA, which is 8 by 8. Factor SIGMA into TT', where T is lower triangular. The nonzero elements of T can be obtained recursively.

Let Y1, ..., Y8 be uncorrelated and have variances all equal to one. Then calculate Z = TY.

Z will have covariance matrix TT', which is the specified SIGMA.

As far as Excel is concerned, adding multivariate normality, you can generate 8 uniform random numbers U1, ..., U8. For each Ui, calculate Yi = NORMSINV(Ui). These Yi will have variances of one and will be uncorrelated.

After specifiying SIGMA, you can obtain the equations for the nonzero elements of T algebraically or perhaps find them in a book. Then you can use the matrix multiplication function in Excel to multiply T by Y.

Jack

0 new messages