Time-varying parameters

Is there a way to estimate time-varying parameters with Dynare?

y = delta*x + e
delta = delta(-1) + u

(where y and x are observed variables)


Some precisions about my previous message:
We’ve managed to estimate an unobserved variable
(e.g. y = m +e
m = m(-1) + v )
but when it comes to estimating a time-varying parameter -e.g. d*x where d follows a random walk as in my previous message- the variance u is invariably zero.
I know this a common finding that UC variances are biased towards zero, but is there a way to overcome the problem? Can I parametrize var(u) and estimate the other coefficients?


Dear Julien,
I am not sure I understand what your problem really is. But for me a parameter that is time-varying is simply a variable. If you declare “delta” as a parameter and then write delta=delta(-1)+u, perhaps it is not surprising that you get var(u)=0. The value of delta is constant over time if delta is a parameter.

Alternatively you can declare delta as a variable in which case you would estimate a process for it as you’ve already done in your example

[quote](e.g. y = m +e
m = m(-1) + v )[/quote]

. You may, however, want to write the equation(s) of your model in a stationary form.


Dear Junior,
Thanks for your answer.
Indeed I had in mind that the time-varying parameter was a variable. Sorry about the confusion.
But my problem remains when delta is stationary…

It isn’t possible to exactly estimate the variable parameter model

with Dynare.
When both delta and x are variables, the model isn’t linear anymore and Dynare will first linearize it, but then you don’t obtain what you want.

On the other hand, in the traditional varying parameter model used in econometrics, x is exogenous and that model can be estimated via the Kalman filter, but this filter is set up differently in this case than in the case used in Dynare. In a DSGE framework, x is generally not exogenous.

Kind regards


Michel and fellow forummers,
could you then please explain how Kalman filter in the case of Dynare. I was looking at the dynare_estimation.m and found that there is an option under kalman_algo. I presume this is the code that gets executed when you type in estimation(…) in the mod file. However, I can’t find any explanation on this in the manual made available on line. Will be grateful if you fill in the missing gaps.

Also, a question to other forummers. How does one estimate a DSGE model with time-varying parameters embedded at the state-space level? In particular, the time-varying parameters are evolving to some recursive least squares rules (a restricted form of Kalman filter) which takes the form:
theta_t = theta_t-1 + gbar * inverseR_t * x_t * )y_t - x_t’theta_t-1)
R_t = R_t-1 + gbar * (x_t-1 * x_t-1 - R_t-1)

Will be thankful for advice and suggestions.


I attach some slides. The first ones explain the set up of the Kalman filter used for estimation.

kalman_algo is a (deprecated) option to change the initialization of the filter. For stationary models, one uses the unconditional mean and the unconditional variance of the endogenous variables. For nonstationary model, declaring unit_root_variables will trigger an initialization with a diffuse prior for the initial value of these variables.

As I told you in my previous answer, time-varying parameters are nonlinear models and you will loose what you are after when Dynare linearizes the model.

In the case of learning models, you can simulate the effect of the change in parameters inherent in learning. See swz3.mod on the page about the Workshops. Estimating such models isn’t currently possible in Dynare


estimation.pdf (100 KB)