Question about estimation

  1. You are missing a semicolon after stoch_simul.
  2. You are not using the unstable version but Dynare 5.4.

So which version should I use (do you have a link?)? I tried downloading the 4.6 unstable version at
https://archives.dynare.org/download/dynare-unstable.html
but I end up at an 404 error website: https://www.dynare.org/snapshot/windows-zip/dynare-4.6-unstable-123ba26-win.zip

At the bottom of Download | Dynare

Great news, using latest unstable verson of Dynare, Octave 8.3 finally manages to open all 10 figures and window doesn’t freeze. However, I still obtain an error message:

You did not declare endogenous variables after the estimation/calib_smoother command.
error: Estimation: the ‘estimated_params’ block is mandatory (unless you are running a smoother)
error: called from
dynare_estimation_init at line 221 column 9
dynare_estimation_1 at line 114 column 93
dynare_estimation at line 118 column 5
driver at line 798 column 14
dynare at line 301 column 5

Model.mod (2.5 KB)

But what are you trying to do?

My goal is to estimate DSGE model on real world data using quarterly data for 3 countries via Metropolis-Hastings algorithm (subtype Random Walk Metropolis). Later on I plan to use ESS procedure (introduced by Inoue and Rossi) to test structural parameters for potential breaks (parameter instability).

I see. Currently, you are missing the block defining which parameters to estimate.

I plan to estimate consumption, investment, money aggregates, inflation and interest rates. Do you have any example on how to write the code for this block? I tried estimated_params; but I obtain an error message and no figure pops up. Thank you.

Always provide the full error message. There is the fs2000.mod in the examples-folder of your Dynare installation.

In the estimated_params block, I included only the estimated parameters, not fixed ones (like beta = 0.99). I hope this is alright. I also noticed that logarythmic variables are written like lne and lnz in the beginning of .MOD file, however in the equations they appear in the brackets, e.g. ln(e). Is this correct?

Here is error message.

渕Starting Dynare (version 6-unstable-2023-10-21-1022-d95154ff).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
ERROR: Model.mod: line 90, cols 1-2: syntax error, unexpected LN

Preprocessing time: 0h00m00s.
error: Dynare: preprocessing failed
error: called from
dynare at line 288 column 5

The numbers in estimated_params block are means and standard deviations.

Model.mod (3.1 KB)

What are you trying to do with e.g.

estimated_params;
ln(e), gamma_pdf, 1.39, 0.24;

? The syntax for estimated shocks would be
estimated_params;

alph, beta_pdf, 0.3, 0.05;

phip, gamma_pdf, 50, 10;

phik, gamma_pdf, 32.14, 2.8;

rhoa, beta_pdf, 0.75, 0.15;

rhoe, beta_pdf, 0.75, 0.15;

rhox, beta_pdf, 0.75, 0.15;

rhoz, beta_pdf, 0.75, 0.15;

rhov, beta_pdf, 0.5, 0.1;

stderr epsilone, gamma_pdf, 1.39, 0.24;

Thanks, I am attaching new error messages.

Model.mod (2.8 KB)

Can you provide the data file?

I’m attaching the Data file. I don’t know if I have to refer to it in the Model file - I simply copied and pasted the Data file in the same folder as Model file. The data include quarterly data 1991Q1 - 2020Q1 for 3 countries (Slovenia, Austria and Italy) and 5 variables.

Data.xls (79.5 KB)

There are at least two issues I spot immediately:

  1. Octave seems to only supports xlsx files, not the older xls ones.
  2. Your data has a panel structure and Dynare is not equipped to work with panels.

I corrected both errors and I get one error message less.

Data.xlsx (23.8 KB)

Use xls_range=B1:F118 to just point to the data without any dates.

Do you mean as a simple line in .MOD file or as parameter at stoch_simul? In both cases I get error messages…

ERROR: Model.mod: line 100, cols 33-41: syntax error, unexpected XLS_RANGE

Preprocessing time: 0h00m00s.
error: Dynare: preprocessing failed
error: called from
dynare at line 288 column 5

In case I just delete A column in Exel, I get this errors:

You did not declare endogenous variables after the estimation/calib_smoother command.
warning: gaminv: calculation failed to converge for some values.
warning: called from
gaminv at line 101 column 7
prior_bounds at line 91 column 26
dynare_estimation_init at line 195 column 16
dynare_estimation_1 at line 114 column 93
dynare_estimation at line 118 column 5
driver at line 841 column 14
dynare at line 301 column 5

error: makedataset: nobs (585) cannot be greater than the last date in the dataset (117)!
error: called from
makedataset at line 248 column 9
dynare_estimation_init at line 388 column 48
dynare_estimation_1 at line 114 column 93
dynare_estimation at line 118 column 5
driver at line 841 column 14
dynare at line 301 column 5

No, as an option to estimation. In such cases, please consult the manual first.
2. The error message is pretty explicit. Don’t specify nobs=585 if there are only 117 observations.

Thank you, I corrected both mistakes, and I obtain two error messages:

鿙You did not declare endogenous variables after the estimation/calib_smoother command.
warning: gaminv: calculation failed to converge for some values.
warning: called from
gaminv at line 101 column 7
prior_bounds at line 91 column 26
dynare_estimation_init at line 195 column 16
dynare_estimation_1 at line 114 column 93
dynare_estimation at line 118 column 5
driver at line 842 column 14
dynare at line 301 column 5

error: dseries::subsref: Indices are out of bounds! Subsample cannot end after 117Y.
error: called from
subsref at line 258 column 13
makedataset at line 253 column 15
dynare_estimation_init at line 388 column 48
dynare_estimation_1 at line 114 column 93
dynare_estimation at line 118 column 5
driver at line 842 column 14
dynare at line 301 column 5

I checked Dynare Manual at calib_smoother chapter, but I didn’t find any relevant cases.

Data.xlsx (23.8 KB)
Model.mod (2.8 KB)