* Autocorrelation Consistent Covariance Estimation in Money Demand Model * * Keywords: * regression, ols, autocorrelation, correction, newey-west, consistent, * money demand, * * Description: * We illustrate how to use Newey-West standard errors in an OLS model * for Money Demand * * Author(s): * Noel Roy * Skif Pankov * * Source: * William H. Greene, Econometric Analysis - 7th Edition * Pearson International Edition, Chapter 20, Example 20.4 (page 961) * * Reading the data and naming variables, specifying to ignore the first * line read (TableF5-2.shd) year qtr realgdp realcons realinvs realgovt realdpi cpi m1 & i u pop deltap realint / skiplines=1 * Generating logs of variables genr lnm1=log(m1) genr lngdp=log(realgdp) genr lncpi=log(cpi) * The AUTCOV= option with the OLS command computes an adjusted variance- * covariance matrix for the parameter estimates. The AUTCOV= option should * specify the largest order autocorrelation required as suggested by Newey * and West (1987) (i.e. L in the text). The RSTAT option with * the OLS command prints the residual summary statistics including the * Durbin-Watson statistic. * OLS Standard Errors * Running an OLS regression of lnm1 on lngdp and lncpi, specifying to output * residual statistics and that it's a log-log model ols lnm1 lngdp lncpi / rstat loglog * Correcting the previous model for autocorrelation of up to the 5th order * (Newey-West correction) ols lnm1 lngdp lncpi /autcov=5 loglog stop