* * Example 8/4 from pp 423-428 * open data capital.dat calendar(q) 1953 data(format=free,org=columns) 1953:1 1974:4 capital approp * graph(footer="Figure 8-16 Time Plots of Capital Expenditure Data",$ key=upleft,klabels=||"Capital expenditure","Capital appropriation"||) 2 # capital # approp * set lcap = log(capital) set lapp = log(approp) set gcap = lcap-lcap{1} set gapp = lapp-lapp{1} * graph(footer="Figure 8-17 Capital Expenditure Data, Log First Differences",$ key=below,klabels=||"Differenced log capital expenditure","Differenced log capital appropriation"||) 2 # gcap # gapp * @yulevar(lags=10,det=none,crit=aic) # gcap gapp @yulevar(lags=4,det=constant,model=varmodel) # gcap gapp * equation(identity,coeffs=||1.0,1.0||) capint lcap # lcap{1} gcap equation(identity,coeffs=||1.0,1.0||) appint lapp # lapp{1} gcap * compute newmodel=varmodel+capint+appint compute %modelsetvcv(newmodel,%modelgetvcv(varmodel)) forecast(stderrs=stderrs,results=forecasts,model=newmodel) * 12 1975:1 set expfore 1975:1 1977:12 = exp(forecasts(4)) graph 2 # expfore # capital set lower 1975:1 1977:12 = exp(forecasts(4)+%invnormal(.05)*stderrs(4)) set upper 1975:1 1977:12 = exp(forecasts(4)+%invnormal(.95)*stderrs(4)) graph 4 # expfore # approp # lower # upper