ECN6540 Econometric Methods COMPUTER PRACTICAL 4
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
STATA for Windows. ECN6540 Econometric Methods
COMPUTER PRACTICAL 4
Autocorrelation
1. Use the command ‘edit’ to open up the data editor in Stata. Then input the below data into Stata by hand:
YEAR |
Y |
X |
1970 |
45.72 |
1015.5 |
1971 |
54.22 |
1102.7 |
1972 |
60.29 |
1212.8 |
1973 |
57.42 |
1359.3 |
1974 |
43.84 |
1472.8 |
1975 |
45.73 |
1598.4 |
1976 |
54.46 |
1782.8 |
1977 |
53.69 |
1990.5 |
1978 |
53.7 |
2249.7 |
1979 |
58.32 |
2508.2 |
1980 |
68.1 |
2732 |
1981 |
74.02 |
3052.6 |
1982 |
68.93 |
3166 |
1983 |
92.63 |
3405.7 |
1984 |
92.46 |
3772.2 |
1985 |
108.09 |
4019.2 |
1986 |
136 |
4240.3 |
1987 |
161.7 |
4526.7 |
Where Y=NYSE stock price index (1965=100), X=GNP ($ billions)
a. Use the command ‘tsset YEAR’ to define the data inputted in Stata as time series data (with the time identifier called ‘YEAR’).
b. Estimate the OLS regression of Y on X.
c. Find out if there is first-order autocorrelation in the data on the basis of the d- statistic.
d. Gain an estimate of p from the d-statistic and transform the model obtaining GLS estimates.
e. Gain an estimate of p from the residuals and transform the model obtaining GLS estimates.
f. Now re-estimate the original model in part (b) including a lagged dependent variable (note L.Y will include the lag of the dependent variable in the regression model, where ‘ L.’ is the lag operator).
g. Test for autocorrelation (hint: you will need to calculate the durbin h-statistic)
2023-08-03