problem with estimation_params

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.

Re: problem with estimation_params

Postby jpfeifer » Sat Oct 08, 2016 4:01 pm

Then you need to find out what is going on. Did you try a different mode-finder?
------------
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 estimation_params

Postby lilia » Sat Oct 08, 2016 4:29 pm

I did and the plot is always weird. May it depend on the model being unstable under some parameters configurations? Thanks for your help
Lilia
lilia
 
Posts: 17
Joined: Mon Feb 15, 2016 1:48 pm

Re: problem with estimation_params

Postby jpfeifer » Sun Oct 09, 2016 8:55 am

Something here seems to be fundamentally wrong. Could you please upload a zip-file with the most recent version of the mod-file, the data, and the mode-file you found.
------------
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 estimation_params

Postby lilia » Sun Oct 09, 2016 9:52 am

me too, I think something must be wrong but I do not see what. the model is correct. what I'm not completely sure about is the relation between the theoretical and the observed variables. I've tried with both per capita consumption and aggregate consumption together with different methods for making these variables stationary. the results are always the same...

thanks a lot, I do appreciate your help
Attachments
test.zip
(97.78 KiB) Downloaded 65 times
lilia
 
Posts: 17
Joined: Mon Feb 15, 2016 1:48 pm

Re: problem with estimation_params

Postby jpfeifer » Sun Oct 09, 2016 7:22 pm

There is clearly an issue with the mean here. I would recommend using demeaned growth rates for estimation if possible. Related to this, Dynare has a hard time finding the steady state during MCMC. That is where the red dots come from. If the steady state exists for those values of b and Dynare is not able to find them, you might move to a more analytical approach of steady state finding.
------------
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 estimation_params

Postby lilia » Mon Oct 10, 2016 3:39 pm

Hi, thanks for the patience!
The problem of the steady state seems solved (no more red dots). however, the mode check plot and the estimation results are still strange. The likelihood is very small and the Hessian eigenvalues are equal! what does it mean?

This is from the log:

Initial value of the log posterior (or likelihood): -6972520.5243
Gradient norm 17418.6617
Minimum Hessian eigenvalue 7568286935.463
Maximum Hessian eigenvalue 7568286935.463

Iteration 1
Predicted improvement: 0.020044812
lambda = 1; f = 6972520.4849095
lambda = 1.9332; f = 6972520.4481676
lambda = 3.7372; f = 6972520.3771577
lambda = 7.2247; f = 6972520.2399525

Norm of First-order Trust-region
Iteration Func-count f(x) step optimality radius
0 1 9.31346e-11 9.28e-06 1
1 2 1.31201e-21 0.000275185 3.63e-11 1

<a href = "matlab: helpview([docroot '/toolbox/optim/msg_csh/optim_msg_csh.map'],'eqn_solved','CSHelpWindow');">Equation solved</a>.

fsolve completed because the vector of function values is near zero
as measured by the selected value of the <a href = "matlab: helpview([docroot '/toolbox/optim/msg_csh/optim_msg_csh.map'],'fcn_tolerance_fsolve','CSHelpWindow');">function tolerance</a>, and
the <a href = "matlab: helpview([docroot '/toolbox/optim/msg_csh/optim_msg_csh.map'],'appears_regular','CSHelpWindow');">problem appears regular</a> as measured by the gradient.
lilia
 
Posts: 17
Joined: Mon Feb 15, 2016 1:48 pm

Re: problem with estimation_params

Postby jpfeifer » Mon Oct 10, 2016 6:34 pm

Did you use demeaned growth rates? If yes, please provide the newest version.
------------
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 estimation_params

Postby lilia » Mon Oct 10, 2016 6:51 pm

no, the previous run is with differenced data. I'll try with demeaned growth rates and see what happens. the reason why I haven't done it sofar is that the model is in levels and the means of the theoretical variables are not zero. thanks again!
lilia
 
Posts: 17
Joined: Mon Feb 15, 2016 1:48 pm

Re: problem with estimation_params

Postby lilia » Wed Oct 12, 2016 12:52 pm

Dear Pfeifer,
please find attached the log with demeaned growth rates, something is still wrong... thanks

lilia
lilia
 
Posts: 17
Joined: Mon Feb 15, 2016 1:48 pm

Re: problem with estimation_params

Postby lilia » Wed Oct 12, 2016 12:53 pm

the attachment
Attachments
codici dynare.zip
(688.38 KiB) Downloaded 64 times
lilia
 
Posts: 17
Joined: Mon Feb 15, 2016 1:48 pm

Re: problem with estimation_params

Postby jpfeifer » Thu Oct 13, 2016 7:07 am

Your calibrated standard deviation for the shock makes no sense. Your data is percent times 100. Try using

Code: Select all
c_obs = (c-mean(c))/100;

and estimating the standard deviation, for example
Code: Select all
estimated_params ;
b, normal_pdf, 1.16,0.05;
teta, normal_pdf, 5.3181, 0.05;
stderr zz, gamma_pdf, 0.1, 5;
end;

You need to adjust the prior according to your tastes.
------------
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 estimation_params

Postby lilia » Thu Oct 13, 2016 9:39 am

many many thanks! I finally see where the problem came from and now everything works fine.
lilia
 
Posts: 17
Joined: Mon Feb 15, 2016 1:48 pm

Previous

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests