Closed jbendelac closed 5 years ago
I used np.random.multivariate_normal, but this from the lecture notebook should also work.
cov = np.array([[2,1],
[1,2]])
mean = np.array([0, 0])
X = scipy.stats.multivariate_normal.rvs(mean=mean, cov=cov, size=N)
Hi @jbendelac . As suggested by @chonganong, use scipy.stats.multivariate_normal.rvs
to generate draws from a vector of jointly normal random variables.. This allows you to specify the mean vector and the variance-covariance matrix. Hope that helps!
Hello, I'm having lots of issues with the Monte Carlo data generating process!
Are we supposed to set up two separate variance covariance matrices for the conditions, or a single one? Also I'm currently generating u, z and epsilon separately as normally distributed variables, but I'm a bit confused about how to make jointly multivariate normal. Finally, how do we ensure that all pairwise combinations not specified have covariances of 0?