Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

How can I generate two correlated $AR(1)$ data series with given correlation between $d_{1,t}$ and $d_{2,t}$, $r_{12}$, where $\rho_{12}$ is correlation between the two error series $$d_{1,t}=\mu+\phi_1d_{1,(t−1)}+e_{1}(t)\quad\quad d_{2,t}=\mu+\phi_2d_{2,(t-1)}+e_{2}(t)$$

$e_1$ and $e_2$ are not the same and $r_{12}$ is desired correlation between $d_{1,t}$ and $d_{2,t}$. The relations between $r_{12}$ and $\rho_{12}$ is:

$$r_{12}=\rho_{12}*\sqrt{(1-\phi_1^2)*(1-\phi_2^2)}/ (1-\phi_1\phi_2)$$

one example for: $\phi_1=.3$, $\phi_2=-.8$ AND $r_{12}=-.8$; the problem is, for this example $\rho_{12}$ is $-1.7$, now how can I generate the error terms where the correlation between the two error series $\rho_{12}$ is not between $-1$ and $+1$. please help me if i'm wrong somewhere. THANKS YOU

share|improve this question
You need to generate random numbers from $e_{1}$ and $e_{2}$ jointly, such as by a multivariate normal distribution (using the covariance between the error terms). Then using those values and the other known variables you can simply plug them in to $d_{1}$ and $d_{2}$. – John Nov 1 '12 at 20:06
Thanks for your answer, the PROBLEM is: I'd like to generate two correlated series with r12=-.8 or -.9 but for these values ρ12=-1.7 while ρ12 must be -1<ρ12<+1 – Roji Nov 1 '12 at 21:54
to generate e1 and e2 jointly I need ρ12, how can i calculate ρ12 ? – Roji Nov 1 '12 at 21:55

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.