Question about estimation

Yes, you can use it.

Perfect, now Octave doesn’t freeze and after an hour of waiting I got out of the loop and a second pop up window opens. However, I also obtain warnings that maximum amount of iterations has been reached and that Hessian matrix is not positive definite.


I would need to see the newest files.

They are in the attachment.

Data.xlsx (19.4 KB)
Model.mod (3.1 KB)

You should set prior_trunc=0 and check whether you need a constant in the observation equation. When I run your model, two autoregressive parameters move close to a unit root.

Do you mean adding prior_trunc=0 as an option to the estimation command?

Yes, exactly.

But if I add it, nothing changes, and I get into the same loop of mode-finding as before. Does this mean I don’t need a constant in the observation equation?

Model.mod (3.2 KB)

You can try. As I wrote, the data seems to prefer unit roots. You need to investigate why. Often the reason is different constant terms in the data and the model variables.

First, regarding the “data seems to prefer unit roots”, my master’s thesis advisor advised me to do an unit root test and not to investigate “why data prefers unit roots”. I checked Dynare reference manual and I can’t find any code examples for unit root testing. Could you please advise me how to do unit root testing, e.g. Augmented Dickey-Fuller test, Dickey-Fuller GLS test, Phillips-Perron test etc.

Second, regarding “check whether you need a constant in the observation equation”, my advisor advised me to simply add a constant to see if the model converges. Does this mean I can add any constant term, e.g. 1?

Thank you in advance.

Model.mod (3.2 KB)
Data.xlsx (19.4 KB)

  1. I doubt that would help. The theory in your model tells you the data you input is stationary. Conceptually, you can only get false positives in such a test. In any case, we are talking about the properties of a cointegrated system. What exactly would you be testing for?
    Sidenote:
  1. You can try to add an estimated constant to each observation equation.

How could I obtain estimated constant? I added random constant (1) to each equation in the Model block, however I obtain residual -1 at every equation, and an error message:

error: The steadystate file did not compute the steady state
error: called from
print_info at line 33 column 5
steady at line 143 column 5
driver at line 830 column 1
dynare at line 310 column 5

Model.mod (3.2 KB)
Data.xlsx (19.4 KB)

Have a look at the observation equations in DSGE_mod/Smets_Wouters_2007/Smets_Wouters_2007_45.mod at master ¡ JohannesPfeifer/DSGE_mod ¡ GitHub

But this file, besides model and steady-state model blocks, includes also measurement/observation equations. Does this mean I have to write this equations (or can I copy them from the provided link?)

Yes, you have to define proper observation equations.

I’m pretty sure I’ve done defining in wrong way, as I obtain error message:

Model.mod (3.3 KB)

I formed five equations, for each of the variable in observed data.

Why are your equations outside of the model-block?

I apologize, corrected. I attached new error message:


Model.mod (3.3 KB)

You did not initialize the parameters like ctrend. Also, you did not adjust the steady state file to reflect that the mean of the equations is the defined parameter. Finally, you may not want to impose cointegration.

  1. Thank you for advise. Now I initalized “ctrend” and “constepi” according to your link to the model, but could you please advise me what value could I use for “conster” (interest rates)?
  2. I deleted all previous equations of the steady state model and kept only new ones, as per your link, I hope that’s correct.
  3. How do I un-impose the cointegration?

New error message is attached.
Model.mod (2.8 KB)