* * Dickey-Fuller test examples from pp 337-338 * open data usa.dat calendar(q) 1985 data(format=free,org=columns) 1985:01 2005:01 gdp inf f b * set cf = f-f{1} set cb = b-b{1} * * Dickey-Fuller regressions * linreg cf # constant f{1} cf{1} linreg cb # constant b{1} cb{1} * * Using DFUNIT procedure. The LAGS=1 option indicates that we want one additional * lag of the differenced series. * @dfunit(lags=1) f @dfunit(lags=1) b * * Test of I(2). Dickey-Fuller regressions. * set ccf = cf-cf{1} set ccb = cb-cb{1} * linreg ccf # cf{1} linreg ccb # cb{1} * * Using DFUNIT procedure. We need the option DET=NONE (DET is short for * "deterministic") - the regression includes no deterministic components * (constant, trend). * @dfunit(det=none) cf @dfunit(det=none) cb