Open victorbluhu opened 4 years ago
HI @victorbluhu ,
This is not a typo. According to the function's documentation, this is expected
Hi @MajesticKhan , sorry for the very late response.
Even though the code states "initial value of ____" (state / covariance matrix), they do update the Z_0 value with the smoothed post-Kalman Filter values Zsmooth(:,1) (as you may see in lines 312 (KF filter-smoother) and 403 (Z_0 update)). The Z_0 in the output is different from the Z_0 in the input.
As I mentioned in the OP, that is not the case for the covariance matrix V_0. We copy V_0 to V_0_new (line 321), update V_0_new (lines 365 and 397), but discard it all together.
I believe the funcion's documentation is already contradicted by the code and should not be considered as decisive evidence.
@victorbluhu No need to apologize!
Yes, I agree with you. In fact I made a post about this earlier lol. Check this issue
@eric-qian @bbok can you please clarify this issue? Thank you!
I believe that in line 243 of the dfm.m file the EMstep function should return V_0_new and not V_0. Due to this typo, the initial state covariance matrix is not updated in the algorithm. It does not seem to affect estimations by a lot, but we are leaving loglikelihood on the table.