Calculating correlated RV's with different stddev

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Calculating correlated RV's with different stddev

Effect of normalization on correlation matrix
Hello dear list members,

For simulation purpose I need 2 RV's (X1, X2) with the same correlation
(r=0,3) to a target RV Y, same means (Y, X1, X2 = 1) but different stddev.
(X1 vs. X2 = 0,2 vs. 0,6)=> differing variation coefficients!!!

With "COMPUTE 0,3*Y+SQRT(1-(0,3 ** 2))*Y_1" i only get variables with r =
0,3 when the used Dummy-Var for calculating (Y_1) has the same
stddev/variation coefficient like my target-variable Y.

Here's my try. Does anyone know how to do that?

Greetings

Lenz


*Target-Variable.
*=============================================.
COMPUTE Y = RV.NORMAL(1,0.2) .

*Y_1,2,... = Dummy-RV for calculating RV's correlated with Y  (X1,
X2, ...).
*--------------------------------------------------------------------.
COMPUTE Y_1 = RV.NORMAL(1,0.2) .
COMPUTE Y_2 = RV.NORMAL(1,0.6) .

*calculating RV's correlated with Y  (X1, X2, ...), r = 0,3.
*-----------------------------------------------------------------------.
COMPUTE X1 = 0.3*Y+SQRT(1-(0.3 ** 2))*Y_1 .
COMPUTE X2 = 0.3*Y+SQRT(1-(0.3 ** 2))*Y_2 .
EXE.
Reply | Threaded
Open this post in threaded view
|

Re: Ranking within cases individually

Maguin, Eugene
This is Erin's reply to my questions sent last week about her posting.

>>The sort command will only allow me to sort ALL of the data set by one
variable.  I need to sort the variables from highest to lowest for each
case.  I haven't been able to find a command that allows this.  Hopefully
this makes my problem a bit easier to understand and hopefully you can help
me.  Maybe I am not seeing an option of sort that you are aware of.  Thanks
for your time! Erin

Erin, I think I understand what you want. Suppose this is your dataset.

ID x1 x2  y  z
01 27 23  4  9
02 18  2 24 50
03  3 17  4 13

Do you want it to look like this when the sorting is finished?

ID x1 x2  y  z
01 27 23  9  4
02 50 24 18  2
03 17 13  4  3

If not, please arrange it correctly in your reply. Can we assume that all
variables whose values are to be sorted within case are all either string or
numeric? Lastly, please reply to the list because I can think of two people
who have posted on this subject in the recent past.

Gene Maguin