Estimation with deterministic break

I would like to estimate a linearized DSGE model with the following characteristic: I want to allow one parameter to take a value for the first part of the sample and a different one in the second part. To simplify things, I’m willing to assume that this change is not anticipated by the agents in the model, nor they expect the parameter to change again after the change occurs; and I know when this “break” has occurred in my sample. Furthermore, I don’t even want to estimate this parameter that is changing, only the other parameters in the model that I’m willing to assume do not change in my sample.

While I know conceptually how the estimation should be performed in this case (get two solutions of the model, one for each parameter value; use the first solution to compute the likelihood for the first part of the sample and the other for the rest of the sample; sum both log-likelihoods; and maximize the sum), I want to know if there is a way to do this in Dynare. My understanding is that there is no option in the estimation command to do this. Am I right? Even in this case, it is not obvious to me how to go “inside” the dynare code to try to implement this. I would appreciate any help regarding how to do this (maybe an example of someone that has already modified the estimation command to have a better idea on where to start).

Thanks for your help!

Dear Javier,
you are the first one to ever request a feature like this. Implementing this is not straightforward. I will try to have a look at it soon, but it may take a while. A conceptual question: how would you initialize/restart the Kalman filter after the break? Start over again with the recursion or continue with the forecast and forecast error variance from the previous recursion?

Hi Johannes,

Thank you for your help. Conceptually, the Kalman filter should not be re-started after the break, it should take the previous forecast and forecast error as the staring point. Maybe another way to put this (that could be simpler to code depending on how the program for the kalman filter was written) is to think in a state space model with time-varying matrices, where that time-variation is deterministic. For instance, for the case I mentioned, the observation equation will be as always:
while the state equation will be:
x_t= F_t
x_{t-1} +e_t
In the case I mentioned F_t=F0 (i.e. the solution of the model with the parameter in the first part of the sample) if t<T0, and F_t=F1 if t>=T0. So if you have the Kalman filter programed so that it accepts a given sequence of matrices F_t, then there is nothing special you need to do in terms of applying the filter; you just need to solve the model twice and assign the appropriate sequence for F_t. (Actually, this is how I have programed this in the past when Dynare was not available. But It would be great to be able to do it in Dynare to take advantage all its good things.)

Finally, I really don’t want to bother you to much with this question; I just took a long shot to see if someone has done it before or has some example that would help me in doing it myself. But if it is too complicated and it will take a lot of your time, please discard my request.


Hello, this is like Kulish and Pagan’s implementation, see … TU0Yzc4MTY. It sets up the state space representation with time-varying matrices which are defined before entering the Kalman filter. This means you can estimate the date of the break as well as the parameter values before and after the break.

The same process can be used to estimate ZLB durations – a sequence of ZLB durations implies a sequence of reduced forms, which then enter the Kalman filter. Shameless plug: see my work with Kulish and Rees here: . Thanks!