Economics questions

Generate a covariate matrix X of dimension n × k, where n = 250 and k = 4. The fifirst column in X should

be a column of ones and the other three columns can be generated from a relatively diffffuse normal or

uniform distribution.

Let β = (0.5, 0.75, 1, 1.25)0 and let σ2 = 1. Simulate y from the model y = Xβ + ε, where ε ∼ N(0, σ2In).

Estimate β by ordinary least squares and report βˆ OLS and the standard errors in a table. [Hint: the

standard errors are computed by taking the square root of the main diagonal of s2(X0X) 1 , where s2 is

computed as discussed in class.] Also submit your computer code (this should not take more than 20 lines)

Sample Solution

find the cost of your paper

This question has been answered.

Get Answer