* * Example of VECM beginning page 349 * open data gdp.dat calendar(q) 1970 data(format=free,org=columns) 1970:01 2000:04 usa aus * graph(footer="Figure 13.1 Real gross domestic products",key=upleft,klabel=||"Real GDP(USA)","Real GDP(AUS)"||) 2 # usa # aus * * Tests for unit roots * @dfunit(lags=4) usa @dfunit(lags=4) aus * linreg aus # usa set e = %resids * * The EGTESTRESIDS procedure does the Dickey-Fuller regression on the residuals, * but reports the proper critical values for this type of test. * @egtestresids(det=none) e * * The EGTEST procedure does the whole operation directly, including the preliminary regression. * @egtest(det=none) # aus usa * set da = aus-aus{1} set du = usa-usa{1} * * Error correction regressions * linreg da # constant e{1} linreg du # constant e{1} * * This estimates the VECM using the built-in RATS instructions. This creates a * system of equations which can be analyzed further (for forecasting, impulse * responses or variance decompositions). * linreg(define=cointeq) aus # usa system(model=vecm) variables aus usa lags 1 det constant ect cointeq end(system) estimate