Hi
Is there a procedure to obtain directly GIR and their confidence intervals in a VAR? I can not find any example with the procedure and example browser on estima website.
guillaume wrote:Hi
Is there a procedure to obtain directly GIR and their confidence intervals in a VAR? I can not find any example with the procedure and example browser on estima website.
declare rect f(n,n)
ewise f(i,j)=sigma(i,j)/sqrt(sigma(j,j))
impulse(decomp=f) etc.impulse(decomp=sigmad*inv(%diag(%sqrt(%xdiag(sigmad))),etc.)TomDoan wrote:guillaume wrote:Hi
Is there a procedure to obtain directly GIR and their confidence intervals in a VAR? I can not find any example with the procedure and example browser on estima website.
This is from the July 2002 RATS newsletter
<<quote>>
Generalized Impulse Responses (Pesaran and Shin, (1998), “Generalized Impulse Response Analysis in Linear Multivariate
Models”, Economics Letters, 58, 17-29) are an attempt to avoid the difficulties of identifying orthogonal shocks in VAR models. This is not a particularly complicated idea; in fact, all these do is compute the shocks with each variable in turn being first in a Choleski order. These can be done quite easily using RATS; the following:
- Code: Select all
declare rect f(n,n)
ewise f(i,j)=sigma(i,j)/sqrt(sigma(j,j))
impulse(decomp=f) etc.
will give you the GIR.
However, while these can, quite easily, be done in RATS, we do not recommend them. While coming up with an orthogonalizing model can, in practice, be somewhat difficult, it is a necessary step. A set of responses to highly correlated
shocks are almost impossible to interpret sensibly. For instance, you can’t run an ERRORS instruction to assess the
economic significance of the responses, since that requires an orthogonal decomposition of the covariance matrix.
<<end quote>>
You can actually do this in-line with
- Code: Select all
impulse(decomp=sigmad*inv(%diag(%sqrt(%xdiag(sigmad))),etc.)
If you replace the decomp=swish in montevar with that, you'll get what you want.
declare rect f(n,n)
ewise f(i,j)=sigma(i,j)/sqrt(sigma(j,j))
impulse(decomp=f) etc.luxu1983 wrote:dear TomDoan
- Code: Select all
declare rect f(n,n)
ewise f(i,j)=sigma(i,j)/sqrt(sigma(j,j))
impulse(decomp=f) etc.
sigma in the code stands for what ?? it is variance-covariance matrix of the VAR model ?
thanks
open data oil_output_rats_level_en_eco.xls
calendar(m) 1987
data(format=xls,org=columns) 1987:1 2011:3
*************************************************************************************************
compute [vect[strings]] implabel=|| "dlind","dlcoil", "dlner", "dlgasr", "dlcpi"||
compute nsteps = 18
compute p = 3
*
**************************************************************************************************
set low = DLCPI{1}< 0.01746
set high = DLCPI{1}>=0.01746
**************************************************************************************************
graph(shading=high) 1
# DLCPI
*********High Inflation Regime********************************************************
system(model=poilmodel1)
variables DLINDTR DLROIL DLNER DLgaSCPI DLcPI
lags 1 to p
det constant
end(system)
estimate(resids=varresids, smpl=high)
*
errors(model=poilmodel1,window="Variance Decomposition(High)", steps=nsteps)
impulse(model=poilmodel1, window="Impulse Responses", steps=nsteps, result=impulseshigh)
@MCVARDoDraws(model=poilmodel1, steps=nsteps)
@MCGraphIRF(model=poilmodel1,VARLABELS=implabel,SHOCKLABELS=implabel,$
center=mean,page=all,HEADER='High Inflation',STDDEV=1.0,INCLUDE=||4,5||)
*******Linear VAR******************************************************************************
system(model=poilmodel2)
variables DLINDTR DLROIL DLNER DLgaSCPI DLcPI
lags 1 to p
det constant
end(system)
estimate(resids=varresids)
*
errors(model=poilmodel2,window="Variance Decomposition(linear)", steps=nsteps)
impulse(model=poilmodel2, window="Impulse Responses", steps=nsteps, result=impulses)
@MCVARDoDraws(model=poilmodel2, steps=nsteps)
@MCGraphIRF(model=poilmodel2,VARLABELS=implabel,SHOCKLABELS=implabel,$
center=mean,page=all,HEADER='Linear VAR',STDDEV=1.0,INCLUDE=||4,5|| )
******Low inflation Regime************************************************
system(model=poilmodel3)
variables DLINDTR DLROIL DLNER DLgaSCPI DLcPI
lags 1 to 4
det constant
end(system)
estimate(resids=varresids, smpl=low, noprint)
*
errors(model=poilmodel3,window="Variance Decomposition(Low)", steps=nsteps)
impulse(model=poilmodel3,window="Impulse Responses", steps=nsteps, result=impulseslow)
@MCVARDoDraws(model=poilmodel3, steps=nsteps)
@MCGraphIRF(model=poilmodel3,VARLABELS=implabel,SHOCKLABELS=implabel,$
center=mean,page=all,HEADER='Low Inflation',STDDEV=1.0,INCLUDE=||4,5||)Return to VARs (Vector Autoregression Models)
Users browsing this forum: No registered users and 1 guest