0
$\begingroup$

I do individual-based simulations and I am trying to initialize a variable P known to be correlated to another five variables: H(r=-0.67), E(r=-0.33), X(r=0.33), A(r=-0.25), C(r=-0.25), O(r=0.25). These five variables are assumed to be independent and the value of each these variables is drawn from a normal distribution with mean=0.5 and SD=0.25. My question is if there is a way in which I can generate 'random' values of P which respect the correlations with each of the other five variables H,E,X,A,C,O?

I am not sure this is even possible, any help will be greatly appreciated.

$\endgroup$
0
$\begingroup$

Let S be the covariance matrix of random vector (P,H,E,X,A,C,O). Let

S = L*L'

be the Cholesky decomposition of matrix S. Simulate 7 standard normal variables: Z1, Z2, Z3, Z4, Z5, Z6, Z7. Then

(P,H,E,X,A,C,O) = L * (Z1, Z2, Z3, Z4, Z5, Z6, Z7) + 0.5.

I assume the expectation of P is 0.5 as well.

$\endgroup$
  • $\begingroup$ Thanks for your answer. I will look into it although the thing with the P variable is a bit more complicated than I described. The value of P ranges between [0,1] with 98.75% of values between [0,0.25]; 1% between [0.25,0.5] and 0.25% [0.5,1]. Any thoughts on this would be greatly appreciated. $\endgroup$ – Ivan Puga Jan 17 '18 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.