jmbejara / comp-econ-sp19

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2019)
48 stars 26 forks source link

HW 2 Monte Carlo - Var-Cov Matrix #16

Closed rachelsalisbury closed 5 years ago

rachelsalisbury commented 5 years ago

How do you construct the variance-covariance matrix in the function that generates data?

jmbejara commented 5 years ago

There are three variables that need to be generated: e, u, and z_1. They are jointly normal. The variance-covariance matrix should be a 3 x 3 matrix. You need to know the covariances between each pair of those three variables. They are described as follows:

the covariance between $\epsilon$ and $u$ is 1/2, the covariance between $z_1$ and $\epsilon$ is 0, and let $u$, $z_1$, and $\epsilon$ be Normally distributed (jointly, let them be a multivariate Normal). Let them be mean zero with covariance between pairs to be 0, unless otherwise stated above. Let the variance of each be 1.

Hope this helps!

rachelsalisbury commented 5 years ago

Figured it out, thank you!