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:1
allocate 2010:4
open data USA_data.xls
data(format=xls,org=cols)
print /
log M0reel / lM0reel
set creditreel = credit/cpi*100
log creditreel / Lcreditreel
set istockreel = istock/cpi*100
log istockreel / Listockreel
set ihousereel = ihouse/cpi*100
log 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 Lconsomreph
lags 1 to 2
det constant
ect coint
end(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