Initialization of Kalman filter for estimation

I guess that when estimating a stationary model, dynare uses the steady state values of the variables to initialize the Kalman filter. Is it possible to choose different initial values for the variables? Thanks!

I tend to say no. What do you have in mind?

Dear Johannes,
I have a clarification question regarding the initial value of the unobserved state variable choosen by the Kalman smoother. In my experience this initial value is typically not zero. How does the Kalman smoother choose the period 1 states…? Is there a way to discipline the period 1 state assuming that I have information on it?
To give an example, say I have data on investment, which I use in the estimation, but not on the capital stock. Let’s say the linearized law of motion of the deviation of the capital stock from its steady state is given by k=deltaI+k(-1)(1-delta). Let’s say I want the to impose that in period 1, k=0. I was wondering whether one could for instance include k as an observable with a (small) measurement error. In the first period, I would then set k equal to zero in the datafile, and leave the entries for all other periods blank. Would that work?
Many thanks,
Ansgar

I think you are confusing the timing here. If you have data on investment at time 1, the value of the capital stock chosen with that investment will be inferred by the Kalman filter. The problem is how to select the capital stock at time 0. Here, Dynare will use the steady state by default. Being able to select it is still on the to-do list, see https://git.dynare.org/Dynare/dynare/merge_requests/1522

Hi Johannes,
yes you are probably correct, ideally one would set k(0) (so, the value of the capital stock before the first period where I observe investment, if I understand you correctly?).
Just to clarify: I was talking about the Kalman smoother (so the values obtained if all observations are used), not the Kalman filter. Is it really the case that k(0) equals the steady state…? I am surprised because the period 1 values are typically quite different from the steady state.

By contrast, the Kalman filter values are all 0 in the first period (Assuming I understood the manual correctly, and oo_.UpdatedVariables are the values from the Kalman filter, since they are based on information up until the respective period).

Many thanks,
Ansgar

All the discussion above refers to the initial value of the filter (the one that is initialized diffusely with the diffuse Kalman filter). The whole point of the smoother is to do a forward and then a backward pass to get an idea of what (among other things) the value of the state at the beginning was.

Thank you for the clarification. I would then like to repeat my question from above: Let’s say I want the to impose that in period 1 (the first period where I have an observation), k=0. Could one for instance include k as an observable with a (small) measurement error? In period 1, I would then set k equal to zero in the datafile, and leave the entries for all other periods blank. Would that work to discipline the smoothed value of k in the first period, and thus fix the location of the future path of k (since I is an observable…)?

Yes, that should work, but I still don’t understand why one would like to such a thing.