errors when computing bayesian 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.

errors when computing bayesian variance decomposition

Postby earsmall » Wed Oct 26, 2016 11:25 am

I have been trying to estimate a model using dynare.
It runs well until computing Bayesian IRFs but shows errors in computing Bayesian variance decomposition.

Code: Select all
Subscript indices must either be real
positive integers or logicals.

Error in kernel_density_estimate (line 82)
    xi(indx+[1 2]) = xi(indx+[1 2]) +
    [1-temp,temp]';

Error in posterior_moments (line 84)
        [density(:,1),density(:,2)] =
        kernel_density_estimate(xx,number_of_grid_points,...
       
Error in correlation_mc_analysis (line 95)
        posterior_moments(tmp,1,mh_conf_sig);
       
Error in posterior_analysis>job (line 71)
    oo_ =
    correlation_mc_analysis(SampleSize,'posterior',M_.dname,M_.fname,...
   
Error in posterior_analysis (line 38)
    oo_ =
    job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_,nvar,vartan);
   
Error in compute_moments_varendo (line 83)
                oo_ =
                posterior_analysis('correlation',var_list_(i,:),var_list_(j,:),h,options_,M_,oo_);
               
Error in dynare_estimation_1 (line 818)
            oo_ =
            compute_moments_varendo('posterior',options_,M_,oo_,var_list_);
           
Error in dynare_estimation (line 89)
    dynare_estimation_1(var_list,dname);

Error in est_3edy_post (line 484)
dynare_estimation(var_list_);

Error in dynare (line 180)
evalin('base',fname) ;



I hope to know what makes these errors.
I attached my mod-file and data.
Last edited by earsmall on Thu Oct 27, 2016 3:46 am, edited 1 time in total.
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm

Re: errors when computing bayesian variance decomposition

Postby jpfeifer » Wed Oct 26, 2016 9:00 pm

We are investigating the issue. The problem is that one of the parameter draws causes problem when solving the Lyapunov equation, resulting in complex values for the covariance matrix at lag 5.
------------
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: errors when computing bayesian variance decomposition

Postby jpfeifer » Thu Oct 27, 2016 9:48 am

We found the source of the bug. Please try again with tomorrow's unstable version. But unfortunately, that fixes the technical problem, but not the general problems with your mod-file. I guess the main issue is that you use a linear mean zero model with non-zero mean data. You must fix that.
------------
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: errors when computing bayesian variance decomposition

Postby earsmall » Fri Oct 28, 2016 3:20 pm

As for the main issue, each data of course has non-zero mean as your comment.
However, "prefilter=1" demean the data, so that their mean is zero.

I do not understand how to deal with this problem.
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm

Re: errors when computing bayesian variance decomposition

Postby jpfeifer » Fri Oct 28, 2016 4:39 pm

Sorry, I missed the prefiltering. The problem with your model is that it is estimated to be very close to the instability region. This you can see with the red dots in the mode_check plots. You need to find out what the source of this is. Usually there is something in the data that requires huge persistence in the model to account for the data like a problematic mean or trend.
------------
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: errors when computing bayesian variance decomposition

Postby earsmall » Fri Oct 28, 2016 7:39 pm

Thanks for your kind explanation.

I have one more question about "tomorrow's unstable version" you mentioned.
Can I download it ?
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm

Re: errors when computing bayesian variance decomposition

Postby jpfeifer » Sat Oct 29, 2016 8:49 am

Yes, the bug has been fixed.
------------
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: errors when computing bayesian variance decomposition

Postby earsmall » Sun Oct 30, 2016 9:09 am

I think the unstable version is unavailable for mac os x users...
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm

Re: errors when computing bayesian variance decomposition

Postby jpfeifer » Sun Oct 30, 2016 9:47 am

There seems to be a problem on our side. It should be available, but clearly isn't. We will investigate the issue. What you can always do is build it yourself, using the instructions at the bottom of https://github.com/DynareTeam/dynare
------------
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: errors when computing bayesian variance decomposition

Postby earsmall » Mon Oct 31, 2016 2:41 pm

I do not understand the instructions at the bottom of https://github.com/DynareTeam/dynare.
I installed the latest unstable version for windows and it works well.
Hope to have it for mac os as well.

I appreciate your help and valuable comments.
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm

Re: errors when computing bayesian variance decomposition

Postby jpfeifer » Sat Nov 05, 2016 7:05 am

The macOS snapshots are back up again.
------------
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: Google [Bot] and 6 guests