MCMC univariate diagnostics" and posterior distributions

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.

MCMC univariate diagnostics" and posterior distributions

Postby stavakoli » Sat Dec 24, 2016 12:55 pm

Hi everybody
I have a small-open-economy RBC model Bayesian estimation. I got the "MCMC univariate diagnostics" and posterior distributions as very similar. I think there is a problem with this figure because I expect them to be a little different. Is ther any problem with this results or not?
Attachments
policy B.rar
(616.78 KiB) Downloaded 126 times
stavakoli
 
Posts: 32
Joined: Tue Nov 22, 2016 3:13 pm

Re: MCMC univariate diagnostics" and posterior distributions

Postby jpfeifer » Sun Dec 25, 2016 9:49 am

This looks like you are having a serious identification problem in your model. Priors and posteriors are usually not supposed to be that similar.
------------
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: MCMC univariate diagnostics" and posterior distributions

Postby stavakoli » Tue Dec 27, 2016 7:00 am

So in this case what should I do?
stavakoli
 
Posts: 32
Joined: Tue Nov 22, 2016 3:13 pm

Re: MCMC univariate diagnostics" and posterior distributions

Postby jpfeifer » Tue Dec 27, 2016 1:25 pm

Run the
Code: Select all
identification
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: MCMC univariate diagnostics" and posterior distributions

Postby stavakoli » Wed Dec 28, 2016 8:54 am

Thanks
I run the code:
Code: Select all
identification(parameter_set=posterior_mean,advanced=1);

And here is the results of identification .
==== Identification analysis ====

Testing posterior mean
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 2
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 3
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 4
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 5
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 6
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 7
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 8
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 9
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 10
The number of moments with non-zero derivative is smaller than the number of parameters
up to 10 lags: check your model
Either further increase ar or reduce the list of estimated parameters
??? Error using ==> identification_analysis at 102
IDETooManyParams

Error in ==> dynare_identification at 280
[idehess_point, idemoments_point, idemodel_point, idelre_point,
derivatives_info_point, info] = ...

Error in ==> policyb at 284
dynare_identification(options_ident);

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


I am having trouble figuring out what that mistake is. Any guidance on how I can proceed and identify some/any parameters in this model
stavakoli
 
Posts: 32
Joined: Tue Nov 22, 2016 3:13 pm

Re: MCMC univariate diagnostics" and posterior distributions

Postby stavakoli » Wed Dec 28, 2016 9:06 am

If u need to check with codes, here they are:
stavakoli
 
Posts: 32
Joined: Tue Nov 22, 2016 3:13 pm

Re: MCMC univariate diagnostics" and posterior distributions

Postby jpfeifer » Wed Dec 28, 2016 7:10 pm

Are you sure all objects you are trying to estimate are independent parameters? Also note that you are not handling parameter dependence via the steady state values correctly. Please 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.
------------
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: MCMC univariate diagnostics" and posterior distributions

Postby stavakoli » Wed Dec 28, 2016 8:18 pm

Thanks for your answer.
Actually I didn't get your mean by:" you are not handling parameter dependence via the steady state values correctly". In my model some steady state values have been revealed as independent parameters and I give them values from observations or normalized them. For example gc_ss is the steady state value of gc (government consumption) and has been gained from observations and or_ss is the steady state value of or (oil revenue) which is normalized to 1. Do you mean that it was the case of problem? Because the model is not linear, I just derived all steady state values by pencil and paper.
stavakoli
 
Posts: 32
Joined: Tue Nov 22, 2016 3:13 pm

Re: MCMC univariate diagnostics" and posterior distributions

Postby jpfeifer » Thu Dec 29, 2016 7:17 am

Please read the part on parameter dependence in the linked document above. Also, if you normalize something, you cannot estimate it. Either you fix it, or the data tells you about its value. But in that case, you need actual data that is informative.
------------
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: MCMC univariate diagnostics" and posterior distributions

Postby stavakoli » Thu Dec 29, 2016 10:37 am

Thanks for your attention Johannes
I read that paper you mentioned and got the idea of parameter dependence and I eliminated them from params-statement. But the problem is still go on. I have no idea about the following error
The number of moments with non-zero derivative is smaller than the number of parameters
up to 10 lags: check your model
Either further increase ar or reduce the list of estimated parameters
stavakoli
 
Posts: 32
Joined: Tue Nov 22, 2016 3:13 pm

Re: MCMC univariate diagnostics" and posterior distributions

Postby jpfeifer » Sun Jan 01, 2017 7:52 am

Please provide the updated mod-file
------------
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: MCMC univariate diagnostics" and posterior distributions

Postby stavakoli » Tue Jan 03, 2017 11:16 am

Here is the mod-file:
Attachments
Policyb.mod
(1.33 KiB) Downloaded 97 times
stavakoli
 
Posts: 32
Joined: Tue Nov 22, 2016 3:13 pm

Re: MCMC univariate diagnostics" and posterior distributions

Postby jpfeifer » Tue Jan 03, 2017 2:29 pm

Please try
Code: Select all
identification(parameter_set=prior_mean,advanced=1);

before the estimation command.
You will get
Testing prior mean

All parameters are identified in the model (rank of H).


WARNING !!!
The rank of J (moments) is deficient!



SE_e_a is collinear w.r.t. all other params!
ra is collinear w.r.t. all other params!
gf is collinear w.r.t. all other params!
rf is collinear w.r.t. all other params!

indicating that you cannot identify these parameters with the data you observe.
------------
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 contributions and examples

Who is online

Users browsing this forum: No registered users and 3 guests