* * Enders, Applied Econometric Time Series, 4th edition * Example from Section 6.7, page 375 * Simulation of cointegrated processes with different drift values * * This controls the set of random numbers so the results will be * reproducible. * seed 2015 * compute nobs=100 * all nobs * * These are so each of the simulations gets the same set of shocks * set eps1 = %ran(1) set eps2 = %ran(1) * clear(zeros) y z * * The drifts will be changed from simulation to simulation. The rest of * the formulas remain the same. * dec real ydrift zdrift * frml yeq y = ydrift+.8*y{1}+.2*z{1}+eps1 frml zeq z = zdrift+.2*y{1}+.8*z{1}+eps2 * group cointmodel yeq>>y zeq>>z * spgraph(hfields=2,vfields=2,\$ footer="Figure 6.3 Drifts and Intercepts in Cointegrating Relationships") * compute ydrift=0.0,zdrift=0.0 forecast(model=cointmodel,from=2,to=nobs) graph(header="Panel (a): No Drift or Intercept") 2 # y # z * compute ydrift=0.1,zdrift=0.4 forecast(model=cointmodel,from=2,to=nobs) graph(noaxis,header="Panel (c): Drift Coefficients = (0.1, 0.4)") 2 # y # z * compute ydrift=0.1,zdrift=0.1 forecast(model=cointmodel,from=2,to=nobs) graph(noaxis,header="Panel (b): Drift Coefficients = (0.1, 0.1)") 2 # y # z * compute ydrift=+0.1,zdrift=-0.1 forecast(model=cointmodel,from=2,to=nobs) graph(noaxis,header="Panel (d): Drift Coefficients = (0.1, -0.1)") 2 # y # z spgraph(done)