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