Problem with RBC model

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Problem with RBC model

Postby dajmcdon » Mon Mar 15, 2010 3:17 pm

Hi,

I am trying to estimate the RBC model in section 2.3 of this article http://homepages.nyu.edu/~ts43/research/AP_tom16.pdf. I made a few changes: I added an equation for y=exp(z)*k^alpha*lab^(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.
0.8172
0.5460
0.9049
-1.4046
0

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
feval(options_.posterior_sampling_method,'DsgeLikelihood',options_.proposal_distribution,xparam1,invhess,bounds,gend,data);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> myrbc2 at 140
dynare_estimation(var_list_);

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

Thanks, Daniel
Attachments
y.xls
This is the data, though I am using a different datafile "gdp.mat" which contains the variable y. It wouldn't let upload the .mat file.
(20 KiB) Downloaded 65 times
myrbc.mod
(1.82 KiB) Downloaded 62 times
dajmcdon
 
Posts: 4
Joined: Fri Nov 13, 2009 2:54 pm

Re: Problem with RBC model

Postby jpfeifer » Mon Mar 15, 2010 6:56 pm

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:
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=2490
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Problem with RBC model

Postby dajmcdon » Tue Mar 16, 2010 1:44 am

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.

Daniel
Attachments
myrbc2.mod
(1.58 KiB) Downloaded 75 times
dajmcdon
 
Posts: 4
Joined: Fri Nov 13, 2009 2:54 pm

Re: Problem with RBC model

Postby jpfeifer » Tue Mar 16, 2010 7:08 am

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
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests