HST1999 estimation problem

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.

HST1999 estimation problem

Postby pocvin » Fri Jun 20, 2014 5:43 pm

Hello

I am trying to estimate the Hansen Sargent Tallarini (1999) model using the procedure suggested by Barillas et al. (2010). Unfortunately, the estimation does not yield proper results and I cannot find the problem. Any help would be much appreciated.

many thanks in advance.

Vincent

HSTML.mod
(1.25 KiB) Downloaded 46 times
pocvin
 
Posts: 7
Joined: Fri Jun 20, 2014 5:26 pm

Re: HST1999 estimation problem

Postby pocvin » Sun Jun 22, 2014 10:05 am

a few additional information:
I use Dynare 4.4.2;
mode_compute=4,8,9,10 return estimated parameters that are equal to the initial values (I have tried many different initial values and bounds);
mode_compute=6 yields the following error:
"Error using chol
Matrix must be positive definite."

Does someone know how to solve this problem? You would really help me out.

I added the data file as an appendix.
Attachments
DataHighIPD.xls
(30 KiB) Downloaded 35 times
pocvin
 
Posts: 7
Joined: Fri Jun 20, 2014 5:26 pm

Re: HST1999 estimation problem

Postby jpfeifer » Sun Jun 22, 2014 10:36 am

You did not specify a correct observation equation. See Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf for more information.
------------
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: HST1999 estimation problem

Postby pocvin » Mon Jun 23, 2014 5:01 pm

Thank you very much for your answer. I worked through your paper but could not find the problem in the above-attached .mod file: Dynare is able to compute the SS, the IRFs have the expected shape, the timing is correct, the observed variables are stationary, etc.

Could you please be more precise about the incorrectness of the attached model? Many thanks in advance.
pocvin
 
Posts: 7
Joined: Fri Jun 20, 2014 5:26 pm

Re: HST1999 estimation problem

Postby jpfeifer » Mon Jun 23, 2014 5:10 pm

You e.g. tell Dynare that you observe the level of consumption. But which data do you provide Dynare? It looks like first log-differences and not the level of consumption.
------------
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: HST1999 estimation problem

Postby pocvin » Wed Jun 25, 2014 1:30 pm

Dear professor Pfeifer,

Thank you very much for your help: using series in levels and controlling for nonstationarity via the "lik_init=2" option greatly improves the estimations. Unfortunately, however, "mode_check=6" is still not working. What could be the reason for it?

Also, I would like to compare the unrestricted model with a restricted version (e.g. without habits) in order to see which one better explains the data. Where can I find the (maximum) likelihood values? Sorry for the triviality of my question but I could not find a fitting answer on the forum/tutorials.

Many thanks in advance.
pocvin
 
Posts: 7
Joined: Fri Jun 20, 2014 5:26 pm

Re: HST1999 estimation problem

Postby jpfeifer » Fri Jun 27, 2014 9:04 am

Using just the levels is still wrong. Your data will have a trend, will not be logged and will have a different steady state than the model variables. Use first differences and a correctly specified observation equation.

For comparing models, see the manual on the model_comparison command.
------------
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: HST1999 estimation problem

Postby pocvin » Sat Jun 28, 2014 10:47 am

Thank you for your answer.
1) If I understand you right, I can keep the variables in 1st log-differences and simply define my observed variables as
Code: Select all
c_obs=log(c)-log(c(-1));
i_obs=log(i)-log(i(-1));
? Note that I do not want to control for measurement errors and the like.

2) The command "model_comparison HSTML HSTML2 ;" (where HSTML2 excludes habit formation), yields the following error:
"model_comparison:: The user supplied prior distribution over models is improper...
model_comparison:: The distribution is automatically rescaled!
Error using model_comparison (line 50)
Not enough input arguments."
Is it because "model_comparison" does not work with maximum likelihood estimations or because I am still missing something in 1)? Can I also use the "Fval obtained by the minimization routine" or the "Initial value of the log posterior (or likelihood)" for model comparison under maximum likelihood?
pocvin
 
Posts: 7
Joined: Fri Jun 20, 2014 5:26 pm

Re: HST1999 estimation problem

Postby jpfeifer » Mon Jun 30, 2014 10:07 am

1) Yes, that is correct.
2) Could you provide me with the code? Note that model comparison under ML estimation only works for nested models. In that case you can just take the "Fval obtained by the minimization routine" and use it for a likelihood ration test.
------------
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: HST1999 estimation problem

Postby pocvin » Mon Jun 30, 2014 3:27 pm

Thank you so much for your help. The code is attached.

2) I posted the wrong error message for the model_comparison command, the correct error message is the following:
"MODEL_COMPARISON: I cant't find the Laplace approximation associated to model HSTML".
I don't know if it is due to a mistake in the model specification or to Dynare. But since I use nested models, I will use the "fval" and manually compute the LR stat & p-values. Thank you for that hint.
Attachments
HST_ML.zip
(3.85 KiB) Downloaded 46 times
pocvin
 
Posts: 7
Joined: Fri Jun 20, 2014 5:26 pm

Re: HST1999 estimation problem

Postby jpfeifer » Tue Jul 01, 2014 4:13 pm

Sorry, but model_comparison curently only works with Bayesian estimation as models don't need to be nested here.
By the way: you are aware that your capital stock is hugely negative in the steady state of your model? This suggests a bug somewhere.
------------
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: HST1999 estimation problem

Postby pocvin » Wed Jul 02, 2014 3:49 pm

Thank you for your priceless comments and guidance, they will surely be helpful for other users as well!
pocvin
 
Posts: 7
Joined: Fri Jun 20, 2014 5:26 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests