* * Enders, Applied Econometric Time Series, 4th edition * Example from Chapter 5, pp 278-281 * Transfer function model on Italy data * open data italy.xls calendar(q) 1971:1 data(format=xls,org=columns) 1971:01 1988:04 entry slitaly attkit * @bjident(number=8,report,qstats) attkit cross(from=0,to=+11) slitaly attkit * boxjenk(inputs=1,constant) slitaly 1971:4 * # attkit 3 0 0 boxjenk(inputs=1,constant) slitaly 1971:4 * # attkit 2 0 0 boxjenk(inputs=1,constant) slitaly 1971:4 * # attkit 1 0 1 boxjenk(inputs=1,constant) slitaly 1971:4 * # attkit 0 0 2 boxjenk(inputs=1,constant) slitaly 1971:4 * # attkit 0 0 1 * boxjenk(inputs=1) slitaly # attkit 1 0 1 @regcorrs(title="Residuals from transfer function model",number=12) * set u = %resids boxjenk(ar=1,sar=1) u * boxjenk(ar=1,sar=1,inputs=1,define=transfer) slitaly # attkit 1 0 1 @regcorrs(dfc=2,number=12,qstat) * * The calculation of the IRF in the text isn't correct. A transfer * function model takes a different form than an ARDL model, and the * calculations there are based upon an ARDL form, which isn't what was * estimated. In this case, the IRF hits just the two periods that have * coefficients in the transfer function. * * The DEFINE option on BOXJENK creates the equivalent (more complicated) * ARDL representation. The IRF for an ARDL can be computed by dividing * lag polynomials. * compute cpoly=%eqnlagpoly(transfer,attkit) compute apoly=%eqnlagpoly(transfer,slitaly) compute irf=%polydiv(%eqnlagpoly(transfer,attkit),%eqnlagpoly(transfer,slitaly),16) disp *.###### irf * * You can also do the IRF by using the IMPULSE instruction by creating a * model with a second empty equation to allow a shock to the exogenous * ATTKIT. * equation(empty) dummy attkit group testm transfer dummy * impulse(model=testm,shocks=||0.0,1.0||,steps=16)