HW 5 part 1
HW 5 part 1¶
Import what is needed here (first read what follows)
# import ...
Set gen = np.random.default_rng(seed)
, with the seed assigned to you.
#TODO
Simulate n_rep=500
samples of n_obs=100
observations from a AR(1) process
where
# TODO
# data =
Estimate the correct model specification using OLS and MLE for each one of the n_rep
samples and save the parameter estimates from each method in two n_rep
thetaOLS
(for OLS) and thetaMLE
(for MLE)
Hint: Probably want to use a for loop…
## TODO
Print the means and standard deviations of the parameter estimates
#TODO
Compute and print the biases and mean squared errors of the parameter estimates
#TODO
Plot in a 2x3 figure the histograms of the parameter estimates, with OLS on the top row and MLE in the bottom
#TODO
Comment briefly on the relative performance of OLS and MLE for this model