Using gret l for Principles of Econometrics, 4th Edition
Serial Correlation in Residuals
The correlogram can also be used to check whether the assumption that model errors have zero covariance-an important assumption in the proof of the Gauss-Markov theorem. The example that illustrates this is based on the Phillips curve that relates inflation and unemployment. The data used are from Australia and reside in the phillips-aus. gdt dataset.
The model to be estimated is
inf = ві + в2 Аи* + et (9.6)
The data are quarterly and begin in 1987:1. A time-series plot of both series is shown below in Figure 9.10. The graphs show some evidence of serial correlation in both series.
The model is estimated by least squares and the residuals are plotted against time. These appear in Figure 9.11. A correlogram of the residuals that appears below seems to confirm this. To generate the regression and graphs is simple. The script to do so is:
ols inf const d_u
2 series ehat = $uhat
3 gnuplot ehat —time-series
4 corrgm ehat
Unfortuantely, gretl will not accept the accessor, $uhat, as an input into either gnuplot or corrgm. That means you have to create a series, ehat, first. Once this is created, both functions work as expected.