Schmitt-Grohe & Uribe (2018) replication

Dear all,
I am trying to replicate Schimitt-Grohe and Uribe (2018) model (article attached), but I was not able to come to the same results as the authors using exactly their data. From my point of view, the only difference I made in the implementation of this model (mod file attached), is that I assumed the observation error to be Normal (0;Var of the series)/10), i.e. I’ve written observations errors as shocks with a given standard error. In the original paper, the authors also estimate the standard error of the estimation errors, but I was not able to do this in dynare as I get the error that you cannot estimate paramaters used only in shocks.

Kindly give your input on this matter. Any advice as to how to optimize the estimation would also be greatly welcomed, as right now a full estimation takes more than two days of continous running.

Best Regards.

w25380.pdf (292.8 KB)
dizertatiev4.mod (10.7 KB)

  1. What happens if you use their reported parameter values as your starting values?
  2. Why do you use mode_compute=6? That is a time-intensive but inefficient optimizer
  3. What exactly is your problem in estimating/specifying the measurement error?

Thank you for the help prof. Pfeifer.
To answer your questions:
1.What do you mean by reported parameter values?
2.It’s my first experience with Dynare and that’s the optimizer I’ve seen used in an example.:smile: I’ll try a different type.
3. If I declare the members of R matrix as parameters, include them in the estimation, and write a shock like var miu1; stderr r1, I get the

ERROR: some estimated parameters (r1, r2, r3, r4, r5) also appear in the expressions defining the variance/covariance matrix of shocks; this is not allowed.

I’ve been trying to write the model more explicitly, as indicated in the annex. I still omit the unconditional expectations because I don’t know how to write that in dynare code. Unfortunately, I’m having trouble finding a steady state. I attached the mod file for two lags (the authors use six).

Best Regards

dizertatievtrend_2.mod (6.0 KB)

  1. The question is whether there is simply a problem of mode-finding. If you know the results of the SGU estimation, you could try their values instead of starting at the prior mean.
  2. Please provide the data file
  3. The error message suggests that your implementation here was wrong.
  4. Regarding the steady state, you should use
steady_state_model;
y=0;
pi=0;
i=0;
e=0;
if=0;
x=0;
xm=0;
xmf=0;
zm=0;
z=0;
yobs=a1;
robs=a2;
iobs=a3;
eobs=a4;
ifobs=a5;
end;
  1. If I see it correctly, then the unconditional expectations is just there to denote that the data has been demeaned.

Thank you again for the answer.
Here are my remarks to your reply:

  1. I don’t have that information, the authors didn’t provide it.
  2. I attached the data I gathered for the USA-UK estimation.
  3. I find out how to model what I had in mind. I deleted miu from shocks block, and added stderr miu to estimation (I attached the new mod file).
  4. Still doesn’t work. I get a peculiar error:

There are 10 eigenvalue(s) larger than 1 in modulus
for 10 forward-looking variable(s)
The rank condition is verified.
Error in computing likelihood for initial parameter values
ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),
ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):
Error using print_info (line 42)
Blanchard Kahn conditions are not satisfied: no stable equilibrium

  1. I agree, that’s probably not that important in the implementation. It’s best to disregard this from now.

Best Regards!
otusa.xlsx (42.2 KB)
dizertatievtrend_2_usa.mod (6.2 KB)

Your model has a unit root. You need to use diffuse_filter in estimation

Thank you for the advice. I included it in the estimation block, but now I run into another error:

Blockquote The forecast error variance in the multivariate Kalman filter became singular.
This is often a sign of stochastic singularity, but can also sometimes happen by chance
for a particular combination of parameters and data realizations.
If you think the latter is the case, you should try with different initial values for the estimated parameters.

Best Regards!

Your setup features stochastic singularity, i.e. your observables form a perfect linear combination in your model.

Two more questions:

  1. How does dynare interpret a variable wrote at (+1)? Does it treat it like the future expected value of that variable?
  2. I don’t understand exactly how dynare forms the steady state in the mod file I attached previously. In the paper the authors reduce it to standard form using large matrix, but I wrote it explicitly using the main equations. How does the kalman filter work the way I did it?

Best Regards!

  1. A (+1) implies a conditional expectation at time t, i.e. E_t(x_{t+1})
  2. I don’t understand your question. It confounds steady states and state space representations (and potentially solutions)

Thanks again for the answer prof. Pfeifer.
After your comment I realized I shouldn’t use (+1) variables, because the original model is not based on conditional expectations. I’ve rewritten the mod file, and modified the starting parameters so as to meet the Blanchard Kahn conditions. Unfortunately, I still get the errors of stochastic singularity.

Sorry about the confusion of my previous reply. I meant state space, not steady state.
As I see it, the main concern of the original paper is forming a state space represantion and use for estimating the parameters, and then computing IRFs and forecast error variance decompositions from the MCMC draws. I don’t understand how this state space is formed in my current representation.

I attached a new mod file.
Best Regards!
dizertatievtrend_2_usa.mod (6.4 KB)