Hi,

I’m trying to estimate a simple RBC model with three parameters. I’m using mode_compute=6 since other optimizers find a non-positive Hessian. However, the results are in the boundaries of the priors and not very close to the true values (the data used is synthetic data generated with alpha=0.3, betap=0.2 and rho=0.9).

I use these priors:

alpha, 0.3, 0.2, 0.5, normal_pdf, 0.3, 0.025;

betap, 0.2, gamma_pdf, 0.25, 0.1;

rho, 0.9, beta_pdf, 0.5, 0.2;

With first order I get these results:

parameters

prior mean post. mean 90% HPD interval prior pstdev

alpha 0.300 0.2005 0.2000 0.2017 norm 0.0250

betap 0.250 1.3170 1.3187 1.3294 gamm 0.1000

rho 0.500 0.9997 0.9997 0.9998 beta 0.2000

And with second order

parameters

prior mean post. mean 90% HPD interval prior pstdev

alpha 0.300 0.3000 0.3000 0.3000 norm 0.0250

betap 0.250 0.2000 0.2000 0.2000 gamm 0.1000

rho 0.500 0.9000 0.9000 0.9000 beta 0.2000

Thank you for the help

fake_data_1.csv (5.0 KB)

fake_data_2.csv (8.3 KB)

rbc.mod (2.2 KB)

I can’t spot a problem. Have you tried using a longer data set?

Hi Johannes,

Let me provide some more details regarding the issue here. We are trying to estimate 3 parameters coming from a plain-vanilla RBC model: \alpha, \beta, and \rho, representing the span of control, the discount rate, and the persistence of the AR(1) process, respectively. We are using 2 time series that we simulated (those fake_data csv files) for estimation: the deviations of consumption and investment. We tried to estimate this problem with some other codes that we’ve written, and it appeared to be well identified. Now we want to compare to the results from Dynare, as Dynare is the usual benchmark.

According to our previous experiments, T=200 is fine for identification. Our issue on Dynare is rather the Hessian on the mode would fail to compute when we are not using `mode_compute=6`

, and hence Dynare would fail to proceed Random-Walk Metropolis-Hasting, even fails with first-order case.

Is the way we set the measurement errors correct? We just want to set the variance of the measurement error as 1e-5.

Here’s the result that we evaluate using Kalman filter derived likelihood on `fake_data_1.csv`

, using the stuff that we wrote down. The MAP converged just after several iterations, so I think maybe it’s because we specified the Dynare model incorrectly.

```
ModeResult with maximized lp of 1427.26
:α │ 0.296674
:β_p │ 0.195203
:ρ │ 0.875452
```

Using a file that simulates 200 periods of data directly in Dynare and then estimating it works as expected: rbc.mod (2.2 KB)

Thus, the Dynare model does not seem to match the model you used for generating the data.

Thank you Johannes, that’s very helpful. Let me have a look at it.

Yes, the issue was with the fake data I generated, which is inconsistent with the Dynare model in the end.

Thanks a lot for your help Johannes.