* * Enders, Applied Econometric Time Series, 4th edition * Pages 70-75 * Estimation of various AR/ARMA models for simulated data * open data sim_2.xls data(format=xls,org=columns) 1 100 obs y1 y2 y3 * * The easiest way to get the types of graphs shown in Figure 2.3 is by * using the procedure @BJIDENT. These do the ACF and PACF on a single * graph with different color (fill) bars. * @bjident(number=20) y1 @bjident(number=20) y2 * ***************************************************************** * * Generating figure 2.3 (as shown) * corr(number=20,results=acf1,partials=pacf1) y1 corr(number=20,results=acf2,partials=pacf2) y2 spgraph(vfields=2,hfields=2,fillby=rows,\$ footer="Figure 2.3 ACF and PACF for Two Simulated Processes") graph(header="Panel (a): ACF for the AR(1) process",style=bar,number=0) # acf1 graph(header="Panel (b): PACF for the AR(1) process",style=bar,number=0) # pacf1 graph(header="Panel (c): ACF for the ARMA(1,1) process",style=bar,number=0) # acf1 graph(header="Panel (d): PACF for the ARMA(1,1) process",style=bar,number=0) # pacf1 spgraph(done) ***************************************************************** * * Model 1, table 2.2 * boxjenk(ar=1,noconst) y1 @regcrits @regcorrs(footer="Figure 2.4 ACF of Residuals from Model 1",number=24,qstats,report) * * Model 2, table 2.2 * boxjenk(ar=1,ma=||12||,noconst) y1 @regcrits @regcorrs(number=24,qstats,report) * * Model 1, table 2.3 * boxjenk(ar=1,noconst) y2 @regcrits @regcorrs(number=24,qstats,report) * * Model 2, table 2.3 * boxjenk(ar=1,ma=1,noconst) y2 @regcrits @regcorrs(number=24,qstats,report) * * Model 3, table 2.3 * boxjenk(ar=2,noconst) y2 @regcrits @regcorrs(number=24,qstats,report) * * Analysis of Y3 * @bjident(number=20) y3 boxjenk(ar=2,noconst) y3 @regcrits(title="AR(2)") @regcorrs(number=24,qstats,report) boxjenk(ar=2,ma=||16||) y3 @regcrits(title="AR(2) with MA on lag 16") @regcorrs * * Sample split * @bjident y3 50 100 boxjenk(ar=2,noconst) y3 50 100 @regcorrs(number=24,qstats,report)