Problem with RBC model


I am trying to estimate the RBC model in section 2.3 of this article I made a few changes: I added an equation for y=exp(z)k^alphalab^(1-alpha) and I am estimating all 7 of the parameters. I am using detrended GDP data I got from some other Dynare example. I keep getting the following error:

Improvement on iteration 24 = 0.000002033

f at the beginning of new iteration, -633.1605667791
Predicted improvement: 13.269746463
lambda = 1; f = -620.1507553

SOLVE: Iteration 2
Spurious convergence.

lambda = 0.33333; f = -630.9595435
lambda = 0.11111; f = -633.1907086

I kill it, because I have no idea what Spurious convergence means, but it seems that the results will be no good. If I let it run, the mode finding algorithm usually crashes with the error:

??? Error using ==> chol
Matrix must be positive definite.

Error in ==> metropolis_hastings_initialization at 52
d = chol(vv);

Error in ==> random_walk_metropolis_hastings at 43
ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = …

Error in ==> dynare_estimation_1 at 942

Error in ==> dynare_estimation at 62

Error in ==> myrbc2 at 140

Error in ==> dynare at 102
evalin(‘base’,fname) ;

Thanks, Daniel
y.xls (20 KB)
myrbc.mod (1.82 KB)

For me the timing of capital seems to be wrong. Moreover, your data looks as if it contains log-differences. Hence, you may need to specify a measurement equation. Please have a look into:
[Simple model. Unkown error!)

Sorry, I posted the wrong .mod file. That one also doesn’t work, but I gave up on it. Here is the one the follows the example I mentioned.

myrbc2.mod (1.58 KB)

That one still seems to contain questionable parts. The timing of capital does not conform to the Dynare standard (although it may be correct depending on the exact underlying model but this is hard to judge without knowing it), there is no observation equation and the data does not match the model’s variable definitions. Your data is in logs and the model only gets linearized, not loglinearized. Please look in the above mentioned forum how to match the data and the model.
Best Johannes