* * JAPAN.DAT example from pp 352-361 * open data japan.dat calendar(m) 1970 data(format=free,org=columns) 1970:1 1992:7 time japan * * Transform to logs * set ljapan = log(japan) graph(footer="Figure 8-12 log Japanese stock index") # ljapan @bjident(diffs=1) ljapan boxjenk(diffs=1,const) ljapan * graph(footer="Figure 8-13 Residuals from ARIMA(0,1,0)1") # %resids @regcorrs(number=36) * boxjenk(diffs=1,const,ar=1,define=withtrend) ljapan @regcorrs * prj fitted print(picture="*.####") 1991:8 1992:7 ljapan fitted %resids * * Redo model without the constant * boxjenk(diffs=1,ar=1,define=withouttrend) ljapan prj fitnotrend * graph(footer="Figure 8-15 Fitted values with and without trend",key=loleft,$ klabels=||"Log (Japan Index)","ARIMA(1,1,0)1","ARIMA(1,1,0)"||) 3 # ljapan 1991:7 1992:7 # fitted 1991:7 1992:7 # fitnotrend 1991:7 1992:7 * uforecast(equation=withtrend) ftrend 1990:10 1992:6 uforecast(equation=withouttrend) fnotrend 1990:10 1992:6 * graph(footer="Figure 8-16(a)") 3 # ljapan 1982:1 * # ftrend # fnotrend graph(footer="Figure 8-16(b)") 3 # ljapan 1990:10 1992:6 # ftrend # fnotrend