I’ve been trying to recover the updated shocks after using the smoother in the estimation. What I do is to use the Updated Variables for the exogenous processes, which are AR(1), to calculate the corresponding shock value in each period. Then I used this in the function simul_t, to recover the values for the different variables of the model and compare them to the updated variables reported by Dynare, and they don’t match. Also, it seems like the results depend on the variables that one set as observable, getting the best results in the cases where the only endogenous state variable was observable. After all that I’ve tried, even including only one observable and one shock (to rule out identification issues), I’ve come to the hyptohesis that the problem must be the first value used in the Kalman Filter. So this question has two parts: one, is why might this be happening? and two, if the problem is in fact the initial value, how does the kalman filter decide that initial value and how can I imposse that value accurately to solve it?