bug conditional variance decomposition?

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

bug conditional variance decomposition?

Postby ilobayesian » Mon Sep 02, 2013 3:07 pm

Dear All,
When I try to compute the conditional variance decomposition in Dynare 4.3.1, I get this error:

??? Error using ==> chol
Matrix must be positive definite.

Error in ==> conditional_variance_decomposition at 56
B =
StateSpaceModel.impulse_matrix*chol(StateSpaceModel.state_innovations_covariance_matrix)';

Error in ==> display_conditional_variance_decomposition at 49
conditional_decomposition_array =
conditional_variance_decomposition(StateSpaceModel,Steps,SubsetOfVariables );

Error in ==> disp_th_moments at 79
oo_ = display_conditional_variance_decomposition(conditional_variance_steps,...

Error in ==> stoch_simul at 151
disp_th_moments(oo_.dr,var_list);

Error in ==> finalbelmi_estim at 782
info = stoch_simul(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;


Could it be a bug?
Thanks
ilobayesian
 
Posts: 37
Joined: Mon Jul 25, 2011 3:55 pm

Re: bug conditional variance decomposition?

Postby jpfeifer » Mon Sep 02, 2013 3:15 pm

Please try the most recent version of Dynare. If the problem persists, post or send the mod-file.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: bug conditional variance decomposition?

Postby ilobayesian » Tue Sep 03, 2013 8:33 am

I tried the latest version, but the problem persists. I have sent you code and data.

Thank you
ilobayesian
 
Posts: 37
Joined: Mon Jul 25, 2011 3:55 pm

Re: bug conditional variance decomposition?

Postby jpfeifer » Tue Sep 03, 2013 2:28 pm

Thanks for reporting this. Please change in dynare_estimation_1.m the code
Code: Select all
M_.sigma_e_is_diagonal = 1;
if estim_params_.ncx || ~isequal(nnz(M_.Sigma_e),length(M_.Sigma_e))
    M_.sigma_e_is_diagonal = 0;
end

to
Code: Select all
M_.sigma_e_is_diagonal = 1;
if estim_params_.ncx || any(nnz(tril(M_.Sigma_e,-1)))
    M_.sigma_e_is_diagonal = 0;
end

After that, it should run. The issue is that you have one shock with variance calibrated to 0. This bugfix will be in tomorrow's unstable version.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests