## Bootstrapped Confidence Intervals VECM

Questions and discussions on Vector Autoregressions

### Bootstrapped Confidence Intervals VECM

Dear all,

I try to modify the replication WinRATS codes of King et al (1991)'s article.
With regard to the "Error Decomposition of Variance", my question is how to compute the bootstrapped 95-percent confidence intervals for the results in the last step = 48 (or generally, for each step if possible).
This is my codes and my data:

Code: Select all
`*************************************calendar(q) 1975:1allocate 2010:4open data USA_data.xlsdata(format=xls,org=cols)print /log M0reel / lM0reelset creditreel = credit/cpi*100log creditreel / Lcreditreelset istockreel = istock/cpi*100log istockreel / Listockreelset ihousereel = ihouse/cpi*100log ihousereel / Lihousereel** Define the error correction equations*equation(coeffs=|| -0.905,      -0.062,     0.036,      1.000,  -0.714||) coint#  LREVENUREPH LISTOCKREEL LIHOUSEREEL LCONSOMREPH CONSTANT** Define the atilde matrix*compute atilde=\$||1.0  ,0.0  ,0.0|\$  0.0  ,1.0  ,0.0|\$  0.0  ,0.0  ,1.0|\$  0.905,0.062,-0.036||** Lag Select*@varlagselect(lags=6,crit=sbc)# Lrevenureph Listockreel Lihousereel Lconsomreph@varlagselect(lags=6,crit=aic)# Lrevenureph Listockreel Lihousereel Lconsomreph@varlagselect(lags=6,crit=hq)# Lrevenureph Listockreel Lihousereel Lconsomreph** Estimate the cointegrated VAR*system(model=vecms)variables Lrevenureph Listockreel Lihousereel Lconsomrephlags 1 to 2det constantect cointend(system)*estimate(noprint)** Get the long run response matrix*impulse(model=vecms,factor=%identity(4),results=baseimp,steps=200,noprint)compute lrsum=%xt(baseimp,200)** Compute a factor*compute d=%ginv(atilde)*lrsum@forcedfactor(force=rows) %sigma d f**** Error decomposition (table 5)*errors(decomp=f,model=vecms,steps=48,\$   labels=||"Permanent 1","Permanent 2","Permanent 3","Transitoire"||)`

****************************************************************************************
You will find herewith my data

Best regards
Attachments
USA_data.xls
cecedi

Posts: 8
Joined: Wed Aug 10, 2011 9:34 pm

### Re: Bootstrapped Confidence Intervals VECM

This will do a bootstrapping analog to the KPSW4.RPF program file which does error bands in a VECM using Monte Carlo integration.

bootvecm.rpf
TomDoan

Posts: 2760
Joined: Wed Nov 01, 2006 5:36 pm

### Re: Bootstrapped Confidence Intervals VECM

Thanks Tom Doan for your help,

However, my need is to compute the error band (confidence intervals) of Error Decomposition of Variance derived from the Instruction "Errors".
I do here my bootstrapped (relying on Bootvar.rpf program file) to compute the confidence intervals of Error Decomposition of Variance (for the last step). I post here my WinRATS codes and my data.
I have 4 variables in the system. There are 3 permanent shocks corresponding Upper and Lower (1, 2, 3); and 1 transitory shock corresponding Upper and Lower (4). Because I have to make the sum of the 3 permanent shocks in only one that represents the permanent components, so I have to make the sum = Upper 1 + Upper 2 + Upper 3 ; and the problem is that this sum exceeds to 1.

Is it normal ? Can I present the confidence interval Upper exceeding to 1 in my paper? If not, what is the solution for this problem?

Many thanks
Best regards
Attachments
USA_data.xls
USA_Wealth_Effect.PRG
cecedi

Posts: 8
Joined: Wed Aug 10, 2011 9:34 pm

### Re: Bootstrapped Confidence Intervals VECM

Conventional "standard error" bands aren't a good idea for the error decomposition. The error decompositions are very asymmetrical, particularly near the boundaries---standard error bands are appropriate only when a distribution is at least approximately normal. Instead, use bootstrap quantiles as your measure. Note, by the way, that the point estimates can often be outside even fairly wide confidence bands. For instance, if the point estimate of an impulse response is near zero, the point estimate of the variance share will be near zero as well. The draws for the responses will generally be at least somewhat non-zero, leading to small, but positive variance shares. This type of behavior for bootstrapping and Monte Carlo with highly non-linear functions is described in Sims and Zha(1999), "Error Bands for Impulse Responses", Econometrica, vol 67, no. 5, pp 1113-1156.
TomDoan

Posts: 2760
Joined: Wed Nov 01, 2006 5:36 pm