This project is read-only.

Bootstrap VAR

Topics: VAR, SVAR, FAVAR
Oct 28, 2015 at 4:46 PM
Edited Oct 28, 2015 at 4:49 PM
I have bootstrapped the reduced form VAR in order to see the implied parameter uncertainty of impulse response functions, but I have a problem with SVAR function it says something like Choleski factorization does not work since covariance matrix must be positive definite. I have tried with the other sample of countries and it works, so I can bootstrap and get confidence intervals. Do you know what can be done to alleviate this problem?

This is what I tried to do:

vi = VAR(varlist,'groups=',countriesNames);
[vi,dvi] = estimate(vi,i,estrange, ...
 'order=',lagi,'groupWeights=',ones(1,length(countriesNames)),  'BVAR=',NNN);
N = 5;
rng(0);
lagi = get(vi,'order'); %?order?
bd = resample(vi,dvi,startHist+lagi:endHist,N,'wild=',true);
yList = get(vd,'yList');
vv = VAR(yList); %?emptyVAR?

vv = estimate(vi,bd,startHist:endHist, 'order=',lagi,'const=',false);
[s2, svc]=SVAR(vv, bd);
[~,sc] = srf(s2,1:30,'presample=',true);
Error using chol
Matrix must be positive definite.

Error in SVAR/myidentify (line 31)
B(:,:,iAlt) = chol(Omg(:,:,iAlt)).';

Error in VAR/SVAR (line 38)
[This,Data,B,Count] = myidentify(This,Data,opt);

Error in bootstrap_data (line 64)
[s2, svc]=SVAR(vv, bd);