* * ARMA models for Canadian employment data * pp 167-177 * cal(q) 1961:1 open data caemp.dat data(format=prn,org=columns) 1961:1 1994:4 * * BJAutofit estimates a range of ARMA models. In this case, it does MA models * from lags 0 to 4 (qmax), while the number of AR's is fixed at 0. It *'s the * model which minimizes the AIC. * @bjautofit(qmax=4,pmax=0,constant,crit=aic) caemp 1962:1 1993:4 * boxjenk(ma=4,constant,maxl) caemp 1962:1 1993:4 @regactfit(footer="Figure 7.12 Employment: MA(4) Model, Residual Plot") @regcorrs(footer="Figure 7.13 MA(4) Model",report,number=12,dfc=%narma) * * This one just checks AR models, with 0 through 4 lags * @bjautofit(pmax=4,qmax=0,constant,crit=aic) caemp 1962:1 1993:4 * boxjenk(ar=2,constant,maxl) caemp 1962:1 1993:4 @RegActFit(footer="Figure 7.14 Employment: AR(2) Model, Residual Plot") @RegCorrs(footer="Figure 7.15 AR(2) Model",report,number=12,dfc=%narma) * * This does checks over all combinations from 0,0 to 4,4. The first does AIC, the * second SIC (or SBC). * @BJAutoFit(pmax=4,qmax=4,constant,crit=aic) caemp 1962:1 1993:4 @BJAutoFit(pmax=4,qmax=4,constant,crit=sbc) caemp 1962:1 1993:4 * * The ARMA(3,1) actually isn't the choice using the maximum likelihood estimation * technique used in BJAutofit. But we'll estimate it anyway. * boxjenk(ar=3,ma=1,maxl,method=bfgs,constant) caemp 1962:1 1993:4 @regactfit(footer="Figure 7.16 Employment: ARMA(3,1) Model, Residual Plot") @regcorrs(footer="Figure 7.17 ARMA(3,1) Model",report,number=12,dfc=%narma) %resids