** Chapter 22 ** for W.H. Greene, Econometric Analysis 6th ed. ***************** * (c) Noel Roy 2003, 2008 * * NONSTATIONARY DATA * *=============================================================================== * 22.3 COINTEGRATION * * Example 22.5 (p. 757) Cointegration in Consumption and Output * READ (TableF5-1.prn)Year qtr realgdp realcons realinvs realgovt realdpi cpi M1 i unemp pop pi realint / SKIPLINES=1 GENR loggdp=LOG(realgdp) GENR LOGCONS=LOG(REALCONS) * Replicate Figure 22.10. GRAPH LOGGDP LOGCONS /LINEONLY TIME * * The COINT command with option TYPE=RESD performs Dickey-Fuller tests on the * residuals of cointegrating regressions. The first variable in the list of * variables is regressed on the remaining ones to obtain the cointegrating * regression. SHAZAM tests cointegrating equations both with (labelled COINTEGRATING * REGRESSION - CONSTANT, TREND) and without (labelled COINTEGRATING REGRESSION - * CONSTANT, NO TREND) a time trend. The Example in the text is without a time trend. * The number of lagged first differences is set by the NLAG= option; if not specified, * this value is set as the highest significant (at 95%) lag order from either the * autocorrelation function or partial autocorrelation function of the first * differenced series (up to the dquare root of the sample size). * By default, SHAZAM does not report the estimate of the cointegrating * vector, but will do so if the MAX option is specified. * COINT LOGCONS LOGGDP /TYPE=RESD SIGLEVEL=5 MAX NLAG=1 * *=============================================================================== * 22.3.3 Testing for cointegration * * The Johansen Test can be generated by a SHAZAM Procedure that can be * downloaded from http://shazam.econ.ubc.ca/examples/johansen. See also pp.174-44 * of the SHAZAM Manual. * The test would be implemented as follows: * FILE PROC JOHANSEN * NLAG: 2 * VARS: realcons realgdp * EXEC JOHANSEN * Thw test generates the following output, where r is the number of * cointegrating vectors, LTRACE_ is a test of r>=R_, and LMAX_ is a test of r=R_. * * R_ LTRACE_ LMAX_ * 1. 0.041 0.041 * 0. 20.784 20.743 * The hypothesis r=1 is clearly accepted (5% critical value is 8.1 for both tests), * and r=0 rejected (5% critical value is 17.8 for LTRACE and 14.6 for LMAX). * * stop * *=============================================================================== * Updated November 21, 2008