importance of exogenous regressor in VAR
importance of exogenous regressor in VAR
Hi,
I have set up a VECM for regional and local variables. I also included some exogenous global variables.
Now my question is how, can I compare the importance of local/regional vs global variables as the FEVD does not give my any input on the global variables.
Is there a formal way of using the R_sqr or partial R_sqr? Would be helpful for suggestions of how to approach this problem.
Thanks
I have set up a VECM for regional and local variables. I also included some exogenous global variables.
Now my question is how, can I compare the importance of local/regional vs global variables as the FEVD does not give my any input on the global variables.
Is there a formal way of using the R_sqr or partial R_sqr? Would be helpful for suggestions of how to approach this problem.
Thanks
Re: importance of exogenous regressor in VAR
A partial R^2 would just be another way to describe a causality test for the global variables in the local equations.
Re: importance of exogenous regressor in VAR
Hi Tom. Is there a certain way that RATS shows me the partial R^2 for my exogenous variables (TOTC and W)? Currently it only presents the t-stat and its significance!
Thanks.
my code:
Thanks.
my code:
Code: Select all
*
*
* Monte Carlo integration with shock to "exogenous" variable
*
compute lags=2 ;*Number of lags
compute nstep=10 ;*Number of response steps
compute ndraws=10000 ;*Number of keeper draws
*
open data "C:\Users\Sebastian\Desktop\Newfolder\FINAL1"
calendar 1970 1 1
all 2015:1
data(format=xls,org=col) 1970:1 2015:1 lwEAC_B lBuGDP wEACI_B BuIn W TOTC OP trend DUM84 DUM93 DUM94 DUM15 DUM92 DUM08 DUM9397 DUM95 DUM9495 DUM8095 DUM8298 DUM7795
*
equation(coeffs=||0,0,1,0||) ect1
#lwEAC_B lBuGDP wEACI_B BuIn
equation(coeffs=||0,0,0,1||) ect2
#lwEAC_B lBuGDP wEACI_B BuIn
system(model=vecmodel)
variables lwEAC_B lBuGDP wEACI_B BuIn
lags 1 to lags
ect ect1 ect2
det constant trend DUM94 DUM15 DUM9397 TOTC{0 to 1} W{0 to 1}
end(system)
*
* Define placeholder equation to allow shock to TOTC OP and W.
*
equation(empty) toteq TOTC
equation(empty) worldeq W
*
******************************************************************
estimate
compute nshocks=1
compute nvar =%nvar
compute fxx =%decomp(%xx)
compute fwish =%decomp(inv(%nobs*%sigma))
compute wishdof=%nobs-%nreg
compute betaols=%modelgetcoeffs(vecmodel)
*
declare vect[rect] %%responses(ndraws)
declare rect[series] impulses(nvar,nvar)
infobox(action=define,progress,lower=1,upper=ndraws) "Monte Carlo Integration"
do draw=1,ndraws
*
* On the odd values for <<draw>>, a draw is made from the inverse Wishart
* distribution for the covariance matrix. This assumes use of the
* Jeffrey's prior |S|^-(n+1)/2 where n is the number of equations in
* the VAR. The posterior for S with that prior is inverse Wishart with
* T-p d.f. (p = number of explanatory variables per equation) and
* covariance matrix inv(T(S-hat)).
*
* Given the draw for S, a draw is made for the coefficients by adding
* the mean from the least squares estimate to a draw from a
* multivariate Normal with (factor of) covariance matrix as the
* Kroneker product of the factor of the draw for S and a factor of
* the X'X^-1 from OLS.
*
* On even draws, the S is kept at the previous value, and the
* coefficient draw is reflected through the mean.
*
if %clock(draw,2)==1 {
compute sigmad =%ranwisharti(fwish,wishdof)
compute fsigma =%decomp(sigmad)
compute betau =%ranmvkron(fsigma,fxx)
compute betadraw=betaols+betau
}
else
compute betadraw=betaols-betau
*
* Push the draw for the coefficient back into the model.
*
compute %modelsetcoeffs(vecmodel,betadraw)
*
* Shock the combination of the VAR + the placeholder equation with a
* unit shock to the placeholder.
*
impulse(noprint,model=vecmodel+worldeq,shocks=%unitv(%nvar+1,%nvar+1),$
result=impulses,steps=nstep)
*
* Save the impulse responses
*
dim %%responses(draw)(nvar*nshocks,nstep)
ewise %%responses(draw)(i,j)=ix=%vec(%xt(impulses,j)),ix(i)
infobox(current=draw)
end do draw
infobox(action=remove)
*
@mcgraphirf(model=vecmodel,percentile=||.16,.84||,shocklabels=||"To world"||,accumulate=||1,2,3,4||)
*Re: importance of exogenous regressor in VAR
This is a systems estimator, so there isn't really a meaningful R^2 measure, partial or otherwise. Again, what's wrong with a likelihood ratio test done with and without the exogenous variables? Doesn't that tell you about the importance of the exogenous variables? There's a reason partial R^2's (which won't even apply here) are rarely mentioned in textbooks or papers---they don't really tell you much.
Re: importance of exogenous regressor in VAR
Thanks Tom, thats a great idea. I just run a simultaneous equation model and eliminate the exogenous variable of interest from the equation of the endogenous variable of interest, right?
But you dont have anything in mind that can be used to find out their relative importance?! - relative to the other endogenous variables..
thanks
But you dont have anything in mind that can be used to find out their relative importance?! - relative to the other endogenous variables..
thanks
Re: importance of exogenous regressor in VAR
It's not a simultaneous equations model. A VECM or VAR is very different from an SE model and this is a VECM as you've written it.
No. That really makes no sense. The lagged endogenous variables are part of a VECM---that's the whole point. You can look at what the exogenous variables add to the VECM which is what the likelihood ratio test would give you.
No. That really makes no sense. The lagged endogenous variables are part of a VECM---that's the whole point. You can look at what the exogenous variables add to the VECM which is what the likelihood ratio test would give you.
Re: importance of exogenous regressor in VAR
OK.. But cant I rewrite the the VECM as a SE by creating the cointegration vector and then just compose the VECM.. The thing is that the model consists of regional and domestic variables and i am primarily interested in the effect of the exo. variables only towards the domestic variables.. That why I thought of removing the exo. variable only from the equation of the domestic variable of interest. OR does it not make sense to pull the system that much apart?
And Off topic: The IRF already state the I(1) variable effect, no need to accumulate the shocks as I did it in the code above?
And Off topic: The IRF already state the I(1) variable effect, no need to accumulate the shocks as I did it in the code above?
Re: importance of exogenous regressor in VAR
... and why are BuIn responses from W-shocks bound to 0 in the the first period (happens for any country model), but is not the case for TOT-shocks... It shouldnt be bound to 0 ideally, or is there a reason why it is like that?!
- Attachments
-
- W-shocks.JPG (47.33 KiB) Viewed 20383 times
-
- tot-shocks.JPG (47.4 KiB) Viewed 20383 times
Re: importance of exogenous regressor in VAR
Probably the W coefficient in the BUIN equation is close to zero.
Re: importance of exogenous regressor in VAR
not really..
- Attachments
-
- W.JPG (13.84 KiB) Viewed 20376 times
Re: importance of exogenous regressor in VAR
You're obviously doing a different program than what you posted above, since that has four endogenous variables. Please post your program and data.
Re: importance of exogenous regressor in VAR
I enclosed the code for two countries, they both run with the same data set. While for Burundi, the W significance is indeed little, I also posted the code for Rwanda. There it is much significant, but RwIn is still tied to 0 (an that is the case for any country model I run). In my eyes that makes no sense.. Thanks
- Attachments
-
- BurNEW.RPF
- Code2
- (3.2 KiB) Downloaded 929 times
-
- FINAL1.xls
- data
- (38.5 KiB) Downloaded 695 times
-
- RwandaNEW.RPF
- Code1
- (3.2 KiB) Downloaded 957 times
Re: importance of exogenous regressor in VAR
You need to substitute out the ECT's while doing the IMPULSE instruction:
impulse(print,model=%modelsubstect(vecmodel)+worldeq,shocks=%unitv(%nvar+1,%nvar+1),$
result=impulses,steps=nstep)
(adding the %MODELSUBSTECT() around the VECMODEL.) Note also that the INCLUDE on @MCGRAPHIRF is based upon position, not name. In your case, it ends up not mattering since the model uses the 4 endogenous variables in their original order, but you should change that to ||2,4|| or whatever is correct.
impulse(print,model=%modelsubstect(vecmodel)+worldeq,shocks=%unitv(%nvar+1,%nvar+1),$
result=impulses,steps=nstep)
(adding the %MODELSUBSTECT() around the VECMODEL.) Note also that the INCLUDE on @MCGRAPHIRF is based upon position, not name. In your case, it ends up not mattering since the model uses the 4 endogenous variables in their original order, but you should change that to ||2,4|| or whatever is correct.
Re: importance of exogenous regressor in VAR
TOM! Thanks so much! Perfect! Now it all makes more sense!