open data ex131.xls
calendar 1979 1 12
all 1988:06
data(format=xls,org=columns) 1979:01 1988:06 ip nho pho qho
*
set gip = ip/ip{1}-1
*
system(model=oil)
variables pho qho nho
lags 1 to 8
det gip constant
end(system)
*
estimate 1980:1 *
*
* Impulse responses are computed using the instruction IMPULSE. The graphs
* shown in the text are a bit non-standard because the responses of different
* variables to a single shock are quite dependent upon the scales of the
* variables involved.
*
impulse(results=impulses,model=oil,steps=24)
graph(header='Figure 14.5 Response to 1 standard deviation shock in price',$
key=attached,klabels=||'Price','Production','Stocks'||,nodates) 3
# impulses(1,1) ; # impulses(2,1) ; # impulses(3,1)
graph(header='Figure 14.6 Response to 1 standard deviation shock in production',$
key=attached,klabels=||'Price','Production','Stocks'||,nodates) 3
# impulses(1,2) ; # impulses(2,2) ; # impulses(3,2)
graph(header='Figure 14.7 Response to 1 standard deviation shock in inventory',$
key=attached,klabels=||'Price','Production','Stocks'||,nodates) 3
# impulses(1,3) ; # impulses(2,3) ; # impulses(3,3)
*
* The error decomposition is done using the instruction ERRORS
*
errors(model=oil,steps=24)
範例給你 自己研究吧 ^ ^