Page 1 of 1
HST1999 estimation problem
Posted:
Fri Jun 20, 2014 5:43 pm
by pocvin
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
Re: HST1999 estimation problem
Posted:
Sun Jun 22, 2014 10:05 am
by pocvin
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.
Re: HST1999 estimation problem
Posted:
Sun Jun 22, 2014 10:36 am
by jpfeifer
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.
Re: HST1999 estimation problem
Posted:
Mon Jun 23, 2014 5:01 pm
by pocvin
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.
Re: HST1999 estimation problem
Posted:
Mon Jun 23, 2014 5:10 pm
by jpfeifer
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.
Re: HST1999 estimation problem
Posted:
Wed Jun 25, 2014 1:30 pm
by pocvin
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.
Re: HST1999 estimation problem
Posted:
Fri Jun 27, 2014 9:04 am
by jpfeifer
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.
Re: HST1999 estimation problem
Posted:
Sat Jun 28, 2014 10:47 am
by pocvin
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?
Re: HST1999 estimation problem
Posted:
Mon Jun 30, 2014 10:07 am
by jpfeifer
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.
Re: HST1999 estimation problem
Posted:
Mon Jun 30, 2014 3:27 pm
by pocvin
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.
Re: HST1999 estimation problem
Posted:
Tue Jul 01, 2014 4:13 pm
by jpfeifer
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.
Re: HST1999 estimation problem
Posted:
Wed Jul 02, 2014 3:49 pm
by pocvin
Thank you for your priceless comments and guidance, they will surely be helpful for other users as well!