Estimating DSGE with exogenous regressors

Hello everyone! Please could I ask a question about how Dynare handles exogenous regressors in a model? I have been looking through the manual, source code and forums, and I am still a bit lost on what Dynare is doing ‘under the hood’.

The general idea is to add some additional exogenous time series into an otherwise standard 3 equation NK model and weight this channel using the model’s structure. A silly model example (that I hope to elaborate on) and data is attached where consumer confidence is imposed into the NKPC such that (1+\rho)^{-1} E_t(\pi_{t+1}) = betaEST*confidence_t + \pi_t - \phi (y_t - z^s_t), where betaEST is the estimator of interest.

I followed the advice of jpfeifer on how to introduce exogenous regressors in Dynare (How to estimate DSGE when R is exogenous and observed? - #4 by jpfeifer) and the estimation works, I’m just not too sure how Dynare is processing the series.

My question is: does Dynare introduce this confidence time series as an exogenous regressor in the state space representation? (a la Hamilton (1994):

States_{t+1} = F*states_t + v_{t+1}
Observations_t = A*ExogenousRegressors_t + H*states_t + w_t

). Or is it more like the agent’s know this series at date zero and they take it as given? Pg. 40 of the manual says:

“It is possible to mix deterministic and stochastic shocks to build models where agents know from the start of the simulation about future exogenous changes. In that case stoch_simul will compute the rational expectation solution adding future information to the state space (nothing is shown in the output of stoch_simul) and forecast will compute a simulation conditional on initial conditions and future information.”

Is this true when it comes to estimation as well?

I am sorry if this is a trivial question or has been answered elsewhere.

Thank you so much, I really appreciate it.

exog_var_est.mod (4.0 KB)
matNKdata3.mat (7.4 KB)

  1. You have a constant rho floating around in the first equation, making the variables non mean zero. That looks wrong.
  2. You have specified measurement error instead of mapping to a structural shock.
  3. You did not account for the mean of the exogenous variable.

I adjusted the file how I think it should probably be:
exog_var_est.mod (4.3 KB)
exog_var_est_mode.mat (1.1 KB)

Note that there are still identification issues in your model.

The way it is currently specified the exogenous should enter as in Hamilton. For foresight, you would need to specify it as varexo_det, which is not supported in estimation.

1 Like

Thank you so much for taking the time to give such an informative reply! I am still learning how to use Dynare and the extra bits you added to the code are really interesting to read into.

You’re right, the rho shouldn’t be in the deviation from steady state IS equation, good spot.

Please can I ask another question to clarify something: is the sentiment series the way you entered it now interpretable as a structural shock, or still a measurement error but now written properly (with the mean included, log, and ‘sentiment’ variable in the shock block)?

I will work on this and have a better model, but for now knowing a bit more about what’s happening is amazing. I am very grateful for your help here Professor Pfeifer!

  1. Before, you had measurement error, now it’s a structural shock affecting the endogenous variables of the model
  2. I put the log, because usually the percentage fluctuations in indicators matter, not their absolute level.
1 Like

Awesome, thanks for your patience with my follow up question. You rock!!