Convergence Diagnostics Help

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.

Convergence Diagnostics Help

Postby Nice » Fri Feb 20, 2015 11:00 pm

Hello All,

The my estimation runs and produces the default convergence diagnostics, however I am concerned about the red and blue lines which do not seem to converge for most of my parameters. Based on the threads on the Dynare forum I have tried the following:

1. I have tried to increase the number of replications from the default of 2000 to 50,0000 as well as increase the number of chains from 2 to 5.

2. I have computed the mode using mode_compute = 6 and then used the mode_file option to run the estimation using mode_compute = 4. This does not work.

I am not sure what else to do to improve the convergence diagnostics. Additionally I am concerned about the following two points:

1. The prior posterior graphs do not depict the prior distribution and only show the posterior as a vertical green line. What does this mean?
2. The smoothed shocks graphs show majority of the shocks as horizontal lines. Why is this the case and what does this mean?

Any help would be much appreciated.
Attachments
can_data.m
(38.74 KiB) Downloaded 56 times
leeper_soe_est_2.mod
(22.07 KiB) Downloaded 79 times
Nice
 
Posts: 31
Joined: Fri Jul 11, 2014 5:16 pm

Re: Convergence Diagnostics Help

Postby StephaneAdjemian » Sat Feb 21, 2015 2:02 pm

Hi,

Given the size of the model you probably needs much more than 50,000 iterations in the metropolis. It is not really an issue if the initial condition given by mode_compute=6 is not the posterior mode. For the MCMC to work you only need to start from initial conditions where the posterior density is positive (when we start near in the neighborhood of the posterior mode this is obviously true).

Can you post one of the prior-posterior figures ? The vertical green line your estimate of the posterior model (from mode_compute=6) not an estimate of the posterior density.

For the last point, it probably means that your estimate for the variance of the shocks is zero (this is a problem)... But I am not sure that these plots worth any concern since the metropolis did not converge. You should rather check that these plots are sensible at the posterior mode (i.e. by running the estimation command with mh_replic=0).

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Convergence Diagnostics Help

Postby Nice » Sun Feb 22, 2015 11:39 pm

Dear Stephanie,

Thank you very much for your help and guidance. What is a better choice for the number of iterations for a model this size?

I have attached my convergence diagnostics graphs as well as one of the prior posterior figures. If you could kindly share with me your thoughts on the convergence diagnostics as well as why the prior distribution does not appear in the prior-posterior figure attached.

Many many thanks.
Attachments
Archive.zip
(845.18 KiB) Downloaded 66 times
Nice
 
Posts: 31
Joined: Fri Jul 11, 2014 5:16 pm

Re: Convergence Diagnostics Help

Postby jpfeifer » Tue Feb 24, 2015 10:25 am

The original Leeper et al paper says in footnote 7:
A sample of 5,000,000 draws was created with the first 250,000 used as a burn-
in period and every 200th draw was thinned. The posterior mode and the inverse
Hessian at the posterior mode resulting from the optimization procedure were used
to define the transition probability function. A step size of 0.3 resulted in acceptance
rates between 34% and 38% for the different model specifications.

That should give you an indication. Your estimation has definitely not converged.

The definition of marginal utility in your first equation is weird:
Code: Select all
uc_h = exp(u_b_h)*exp(c_h - H*c_h(-1)) ^(-GAMMA) ;

c_h should usually be logged separately. Note also the footnote to Table 3 in Leeper et al. The Inverse Gamma distribution is specified in terms of the scale and shape parameter, not the mean and standard deviation. Unfortunately, you cannot follow their approach, because Dynare currently does not allow for an Inverse Gamma distribution with non-existing moment, see https://github.com/DynareTeam/dynare/issues/846
------------
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: Convergence Diagnostics Help

Postby Nice » Wed Feb 25, 2015 4:01 pm

Hello Jpfeifer,

1. The definition for marginal utility you are referring to is from another file, this error was corrected in the file "leeper_soe_est_2.mod" which is posted above.

2. In Estimation Guide to the original Leeper paper it states:

" Final acceptance rate: 33.98%. 5,000,000 draws were made, with the first 250,000 used as a burn-in period and every 200th thinned, leaving a sample size of 23,751."

Is there any way to to thin the sample in Dynare? If not , using a sample size of 5,000,000 and burn in of 250,0000 I will end up with a sample size of 4,750,000 which is much larger than what they have. Would it be advisable to use a smaller sample size of 1,000,000 instead?

3. Given that Dynare does not allow to follow their approach would my estimation results be incorrect if I specify the Inverse Gamma distribution in terms of the mean and standard deviation for the standard deviations of the shock processes?

Many Thanks!
Nice
 
Posts: 31
Joined: Fri Jul 11, 2014 5:16 pm

Re: Convergence Diagnostics Help

Postby Nice » Sat Feb 28, 2015 8:53 pm

Dear: Jpfeifer,

Could you kindly help on the following 2 questions:

1. In Estimation Guide to the original Leeper paper it states:

" Final acceptance rate: 33.98%. 5,000,000 draws were made, with the first 250,000 used as a burn-in period and every 200th thinned, leaving a sample size of 23,751."

Is there any way to to thin the sample in Dynare? If not , using a sample size of 5,000,000 and burn in of 250,0000 I will end up with a sample size of 4,750,000 which is much larger than what they have. Would it be advisable to use a smaller sample size of 1,000,000 instead?

2. Given that Dynare does not allow to follow their approach would my estimation results be incorrect if I specify the Inverse Gamma distribution in terms of the mean and standard deviation for the standard deviations of the shock processes?

Many many thanks!
Nice
 
Posts: 31
Joined: Fri Jul 11, 2014 5:16 pm

Re: Convergence Diagnostics Help

Postby jpfeifer » Sun Mar 01, 2015 11:46 am

1. There is currently no way to conduct thinning in Dynare. Dynare by default uses a random subsample to compute posterior moments/statistics. You can vary this with the sub_draws option. If you are worried about convergence, using 5m draws is better than 1m.

2. They will not be wrong. You will just have used a prior that looks very different from what you intended. If you are happy with the prior that the mean and standard deviation imply, go ahead. However, I would recommend looking at other papers to set this particular prior. For example, Smets/Wouters (2007) use a mean of 0.1 and a standard deviation of 2 for their inverse gamma distribution. These values are easier to justify.
------------
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: Google [Bot] and 7 guests