🐛 bvar_irf: SquareRoot-option erroneously used Cholesky decomposition

kalman-mex
Johannes Pfeifer 2023-09-13 15:06:59 +02:00 committed by Sébastien Villemot
parent 2b313b0308
commit 14634946dc
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 2 additions and 2 deletions

View File

@ -84,8 +84,8 @@ for draw=1:options_.bvar_replic
% Build the IRFs...
lags_data = zeros(ny,ny*nlags) ;
sampled_irfs(:,:,1,draw) = Sigma_lower_chol ;
lags_data(:,1:ny) = Sigma_lower_chol ;
sampled_irfs(:,:,1,draw) = StructuralMat ;
lags_data(:,1:ny) = StructuralMat ;
for t=2:options_.irf
sampled_irfs(:,:,t,draw) = lags_data(:,:)*Phi(1:ny*nlags,:) ;
lags_data(:,ny+1:end) = lags_data(:,1:end-ny) ;