Error in DiffuseKalmanSmoother1_Z

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’-TPstar(:,:,t)*Z’*Kinf(:,:,t)’-Kinf(:,:,t)FKstar(:,:,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.
ar_with_unit_root_steadystate.m (127 Bytes)
ar_with_unit_root.mod (582 Bytes)

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

Hi,
this seems to be a bug that has been corrected in the unstable version. There, the line reads:

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.

Hi Jpfeifer, thanks for the info.
Pierre