*==============================================================================* * Advanced Applied Econometrics * Jakub Muck * Exercise 18 * importing data clear all use http://e-web.sgh.waw.pl/jmuck/AAE/Datasets/InternationalTradePoland.dta * data preperation gen im_pl=ln(IM_PL) gen ex_pl=ln(EX_PL) gen dd_pl=ln(DD_PL) gen dd_eu=ln(DD_EU) gen reer=ln(REER) sort year quarter gen t=_n tsset t gen dim_pl=d.im_pl * (ii) Plot of the logged imports tsline im_pl *(iii) ADF test for the logged imports dfuller im_pl, regress dfuller im_pl, lags(1) regress dfuller im_pl, lags(4) regress *(iv) Since the im_pl is non-stationary we check its first differences dfuller dim_pl, regress dfuller dim_pl, lags(1) regress dfuller dim_pl, lags(4) regress *(v) ADF test with a linear trend for the logged imports dfuller im_pl, regress trend dfuller im_pl, lags(1) regress trend dfuller im_pl, lags(4) regress trend *(vi) im_pl regressed on t reg im_pl t predict res_t, res tsline res_t *(viii) Plot of the reer tsline reer *(ix) ADF test for the reer dfuller reer, regress dfuller reer, lags(1) regress *(x) ADF test for the reer dfuller reer if year>=2000, regress dfuller reer if year>=2000, lags(1) regress *(xi) im_pl and dd_pl are I(1) (please check) reg im_pl dd_pl predict r1, res tsline r1 dfuller r1, nocons dfuller r1, lags(3) nocons * Compare with critical values from the slides *(xi) ex_pl and dd_eu are I(1) (please check) reg ex_pl dd_eu predict r2, res tsline r2 dfuller r2, nocons dfuller r2, lags(3) nocons