Possible bug in dsge_likelihood function

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.

Possible bug in dsge_likelihood function

Postby clauper » Tue Jan 17, 2017 12:18 am

Dear Moderators

During estimation of a medium scale dsge model, I get the error:

Code: Select all
Reference to a cleared variable DH.

Error in dsge_likelihood (line 714)
                        tmp(j,:)=DH(j,j,:);

Error in dynare_estimation_1 (line 616)
                [junk1, junk2, hh] = feval(objective_function,xparam1, ...

Error in dynare_estimation (line 89)
    dynare_estimation_1(var_list,dname);

Error in main (line 720)
dynare_estimation(var_list_);

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

Error in main_mainfile (line 173)
dynare main noclearall


I am using mode_compute=4. Is this a bug, or is there a problem with my program? Is there a quick fix to it?

I am using dynare 4.4.3 and Matlab R2016a. Thanks for taking a look!
clauper
 
Posts: 6
Joined: Tue Jan 17, 2017 12:01 am

Re: Possible bug in dsge_likelihood function

Postby jpfeifer » Tue Jan 17, 2017 10:10 am

This is defintely a bug. Please try the unstable version to see if has been fixed already. If the problem persists, please provide me with the files
------------
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: Possible bug in dsge_likelihood function

Postby clauper » Tue Jan 17, 2017 2:05 pm

Looking at the dsge_likelihood function (in version 4.4.3), it seems strange to me that the measurement error equation is set to:
Code: Select all
H = zeros(pp,1);
on line 338. Then, the statement
Code: Select all
if all(all(abs(H-diag(diag(H)))<1e-14))
(line 708) is always true (when H remains a vector), which is not what it is supposed to do, if I understand the code correctly.

In the unstable version, 'initial_estimation_checks' throws an error, saying that the forecast error variance became singular.
Can you tell if this is a problem with my code or with dynare?
Attachments
main.zip
(15.53 KiB) Downloaded 43 times
clauper
 
Posts: 6
Joined: Tue Jan 17, 2017 12:01 am

Re: Possible bug in dsge_likelihood function

Postby jpfeifer » Wed Jan 18, 2017 9:00 pm

The behavior in 4.4.3 is a bug that is fixed in the unstable version. The message about stochastic singularity that you get, indicates a problem with your model. There must be an exact linear combination of observables implied by your model.
------------
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 5 guests