代写Matlab|代写Matlab |or Stata 编程代码、代写Time Series Econometrics程序作业

代写Matlab or Stata 编程代码、代写Time Series Econometrics程序作业
1. Write a Matlab or Stata code to replicate all the tables and ?gures in Sections 8.5, 9.3,
and 9.5.4 from A Guide to Modern Econometrics (4th Edition), by Marno Verbeek.
Use the attached dataset ppp2.dat.
2. Write a Matlab or Stata code to replicate all the tables and ?gures in Section 9.6
from A Guide to Modern Econometrics (4th Edition), by Marno Verbeek. Use the
attached dataset money.dat.
3. Write a Matlab or Stata code to replicate all the tables in Section 7.1.6 from A Guide
to Modern Econometrics (4th Edition), by Marno Verbeek. Use the attached dataset
bene?ts.dta.
4. Consider the AR (p) model with an intercept term. In practice, when we estimate
AR models, we seldom know how many lags to include. Thus we try various lag
lengths, and choose among the di§erent speci?cations based on a criterion. One
popular criterion is the Akaike Information Criterion (AIC). Write a Matlab or Stata
code that takes a data vector y and a scalar pmax, and estimates AR (p) models for
each p = 1; :::; pmax. The code should calculate the AIC for each value of p, and
return the p for which the AIC is minimized. Apply this code on a quarterly variable
yt representing the annual GDP growth rate of the United States. That is, after
downloading the quarterly GDP time series, Yt
, over the sample 1970Q1-2014Q4,
apply your code on the variable yt = ln (Yt)
ln (Yt4).
5. Take the following DGP (data generating process): a mean zero, AR (2) with Gaussian
errors and 1 = 0:6, 2 = 0:2.
Use a simulation method in Matlab or Stata to calculate
the variance and the ?rst three autocorrelations of this process. Hint: you could
generate one very long sample and report the sample values of the items requested or
you could repeatedly draw a shorter sample, calculate the sample values each time and
then average the results over the repetitions. Should these two approaches generate
the same answer? Try both.
6. Take the same DGP from point 5. In Matlab or Stata, run a Monte Carlo to evaluate
the performance of the AIC in picking the lag length under this DGP. Use samples
of size 50, 100, 500. In each case, use pmax = 8. Hint: repeatedly draw samples
using the same routine as in point 5. For each sample, use the routine from point 4
to ?nd the p that minimizes the AIC. Save this p each time. Report the frequency
distribution of the ps.
7. Take an MA (2) DGP where the "s are standard normal, 1 = 0:6, and 2 = 0:6.
In Matlab or Stata, use a simulation method to calculate the variance and the ?rst
1
three autocorrelations of this process. Hint: you could generate one very long sample
and report the sample values of the items requested or you could repeatedly draw a
shorter sample, calculate the sample values each time and then average the results
over the repetitions. Should these two approaches generate the same answer? Try
both.
8. Take the same DGP from point 7. In Matlab or Stata, run a Monte Carlo to evaluate
the performance of the AIC in picking the lag length of an AR (p) model under this
MA (2) DGP. Use samples of size 50, 100, 500. In each case, use pmax = 8. Hint:
repeatedly draw samples using the same routine as in point 7. For each sample, use
the routine from point 4 to ?nd the p that minimizes the AIC. Save this p each time.
Report the frequency distribution of the ps.


http://www.daixie0.com/contents/12/1314.html

猜你喜欢

转载自www.cnblogs.com/fsnh/p/8998025.html