Page 1 of 1

error in DiffuseKalmanSmoother1_Z

PostPosted: Fri Feb 04, 2011 5:38 pm
by pml20
Dear Dynare team,

This is a follow-up on my earlier question (in November, IIRC) on problems with simulating I(1) processes.
There appears to be a bug when running ML on unit-roots. When running the attached simple model, the following message appears:

Error in ==> DiffuseKalmanSmoother1_Z at 136
Pstar(:,:,t+1) = T*Pstar(:,:,t)*T'-T*Pstar(:,:,t)*Z'*Kinf(:,:,t)'-Kinf(:,:,t)*F*Kstar(:,:,t)' + QQ;

When I check the .m file, it appears that the F in the middle of the second term on the RHS is not defined. Should it be Fstar defined on line 134?

To get correctly simulated data in levels in the attached program, run it first with stoch_simul, then cumulate simulated dy and save this new y into the datafile for a second run with the estimation command. The error message appears after printing the ML results.

Re: error in DiffuseKalmanSmoother1_Z

PostPosted: Fri Feb 04, 2011 6:05 pm
by pml20
In fact, it seems that the bug arises also when going Bayesian, and it is a feature of the 4.1.3 version (the problem doesn't show up in 4.1.2)
P

Re: error in DiffuseKalmanSmoother1_Z

PostPosted: Sat Feb 05, 2011 8:43 am
by jpfeifer
Hi,
this seems to be a bug that has been corrected in the unstable version. There, the line reads:
Code: Select all
Pstar(:,:,t+1)      = T*Pstar(:,:,t)*T'-T*Pstar(:,:,t)*Z'*Kinf(:,:,t)'-Kinf(:,:,t)*Fstar(:,:,t)*Kstar(:,:,t)' + QQ;

You should upgrade to this version, which seems to be already almost identical to Dynare 4.2 that's going to appear soon.

Re: error in DiffuseKalmanSmoother1_Z

PostPosted: Mon Feb 07, 2011 2:53 pm
by pml20
Hi Jpfeifer, thanks for the info.
Pierre