MLE results from a simple RBC model (King and Rebelo)

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.

MLE results from a simple RBC model (King and Rebelo)

Postby ACL » Fri Feb 10, 2017 3:00 am

Hello all,

I am attempting to estimate (using maximum liklihood, *not* Bayesian) three of the parameters of a basic RBC model (discount rate, constant of rel risk aversion, stderr of the technology shock). I am using 20 years worth of data (quarterly, n = 80). The data file contains the percent deviation of real GDP from its trend (log actual - log filtered, where I use the HP filter, lambda = 1,600). I have specified the mode in the estimation to be mode_compute = 7.

The problem is that I get plausible values for the estimated means of the two parameters, but the standard deviations for both come back as 0.00 and the t-statistics come back extraordinarily high (in the neighborhood of 3.5 million!). The estimated results for the third parameter, the technological innovation, come back fine (s.d. ~= 0.02, t-stat. ~= 40).

The same issue occurs when I estimate the two parameters (discount rate, constant of rel risk aversion) in isolation of each other...zero s.d. and enormous t-stat.

How am I to interpret these results? Should I be using a different estimation routine?

Any help/ideas/insight regardless of triviality is appreciated!

P.S. I have uploaded the .mod file if that happens to help; it runs fine, so I am hoping someone can simply diagnose my issue from their past experience with the weird results I have written about above.
Attachments
rep1.mod
(1.38 KiB) Downloaded 52 times
ACL
 
Posts: 8
Joined: Sat Nov 28, 2015 4:00 am

Re: MLE results from a simple RBC model (King and Rebelo)

Postby jpfeifer » Fri Feb 10, 2017 9:27 am

Please provide the data file as well. You may need to use a zip-file. Also note that you are not supposed to do ML or Bayesian estimation on HP-filtered data.
------------
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: MLE results from a simple RBC model (King and Rebelo)

Postby ACL » Fri Feb 10, 2017 2:42 pm

Thanks for your reply, Johannes. The data file is attached.

Are you saying that the data file should contain unfiltered data? I was under the impression that all data files must be HP filtered prior to using them in estimation. Sounds like I am wrong.

EDIT: I have read through your document. This happens to be the first time I am using a model that I have not log-linearized by hand and used the model(linear) command, which is probably why I am running into those estimation problems. Your document states that the structure of the data and the structure of the model must be consistent. I would like to then use the loglinear command in the estimation function as in the fs2000 example that is included with dynare. I must admit, however, that I am not 100 percent certain of the transformation that was performed to the data file that is included with the fs2000 .mod file. From looking at the data, it definitely does not look like a log difference from HP filtered data. Again, I would like to use empirical real GDP to estimate a non-linear version of the basic RBC model, but I am unsure of what type of treatment to perform on the data file before launching the estimation.

Thanks again.
Attachments
dataY.m
(503 Bytes) Downloaded 53 times
ACL
 
Posts: 8
Joined: Sat Nov 28, 2015 4:00 am

Re: MLE results from a simple RBC model (King and Rebelo)

Postby jpfeifer » Sat Feb 11, 2017 8:12 am

1. The HP-filter is a two-sided filter and you should not use it for estimation other than direct inference.
2. In any case, you are missing a proper observation equation. If you want to use HP-filtered data in any case, you must define something like
Code: Select all
y_obs=log(y)-steady_state(y)

for your model variable to correspond to your data (of course you also need to rename your data in the datafile)
3. The data for the fs2000.mod is generated by simulating the model. Therefore, it corresponds perfectly to the model variables. In actual data, you would be using demeaned first differences. Note that when using first differences, you do not HP-filter the data in advance.
4. The standard way would be to use first differences. I added an example RBC model for Bayesian estimation doing exactly that.
Attachments
RBC_first_diff_estimation.zip
(7.9 KiB) Downloaded 50 times
------------
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 9 guests