联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Matlab编程Matlab编程

日期:2018-05-03 03:28


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.


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp