Bug in dr1.m with loglinear option in estimation.

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 in dr1.m with loglinear option in estimation.

Postby bkjecn » Mon Apr 09, 2012 10:38 pm

Hi,

I believe that dr1.m contains a bug. I found the bug while working with a model that I estimated using 'loglinear'. To illustrate the point, I made a very simple model (which is actually loglinear). I attached the mod file. When the loglinear option is in the estimation command, the matrix multiplication in line 263 of dr1.m has incorrect dimensions. Currently, it reads:

dr.ghx = repmat(1./dr.ys,1,size(dr.ghx,2)).*dr.ghx.* ...
repmat(dr.ys(klags),size(dr.ghx,1),1);

I think it should read

dr.ghx = repmat(1./dr.ys,1,size(dr.ghx,2)).*dr.ghx.* ...
repmat(dr.ys(klags)',size(dr.ghx,1),1);

You can see that things work fine when you delete the loglinear option from estimation. If one of the developers could look at this, it would be great. Also, if you could please advise on the best place to register bugs, I would appreciate it.

Best,

Ben
Attachments
problem_with_loglinear.mod
(903 Bytes) Downloaded 56 times
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am

Re: Bug in dr1.m with loglinear option in estimation.

Postby MichelJuillard » Sun Apr 15, 2012 4:03 pm

Dear Ben,

thank you for reporting the problem. It will be corrected in tomorrow's unstable version.

Kind regards,

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Re: Bug in dr1.m with loglinear option in estimation.

Postby bkjecn » Sun Apr 15, 2012 4:37 pm

Hi Michel,

Thanks so much! I really appreciate your time and attention to this issue. Thanks for all your work on Dynare!

Best,
Ben
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests