neige
I am doing a simulation study on measurement error, and I have to simulate two correlated categoerical variables,
X1
0 1
0 A B N
X2
1 C D M
R S T
I am losing my mind today,it is 30 degree here.... I just can not get it out, it supposed to be straightforward.
As you can see, let P1 = P(X2=0 | X1 = 0) and P2 = P(X2=0 | X1 = 1),
then P1 = K*P2 , X1 and X2 are independent if and only if K =1, i.e. the relative risk is 1, then corr(x1,x2)=0
My question is, I want to find the relationship between pearson correlation , corr(x1,X2), P1 and P2.
If I have it, then I can control my correlation at different levels.....
THanks, maybe computers can work in high but not my brain, it is just algebra...