Page 1 of 1

Reasonable acceptance rate coexist with posterior spikes

PostPosted: Thu Feb 06, 2014 4:28 am
by yc1122
Hi,

I'm confused about the presence of 20%-30% acceptance rate and very tight credibility intervals of the parameters i.e. spikes in the posterior check plots. As I understand it, a sound acceptance rate should have guranteed a comprehensive search in the parameter space, whereas the RWMH draws seem to get stuck around the posterior mode and fail to jump around in the parameter space.

Thank you very much if anyone can point out the source of the problem.

best,
yc

Re: Reasonable acceptance rate coexist with posterior spikes

PostPosted: Thu Feb 06, 2014 6:32 am
by jpfeifer
Please post the check plots to show what you mean with
very tight credibility intervals of the parameters i.e. spikes in the posterior check plots

Re: Reasonable acceptance rate coexist with posterior spikes

PostPosted: Thu Feb 06, 2014 7:16 am
by yc1122
I mean the posteriors are just spikes that implies the posterior sampler only explores around the initial values.

Please see the attached file. Thanks.

Re: Reasonable acceptance rate coexist with posterior spikes

PostPosted: Thu Feb 06, 2014 9:33 am
by jpfeifer
As we are talking about prior-posterior plots, I would need to see the mod-file or the prior.
See also here http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=5307

Re: Reasonable acceptance rate coexist with posterior spikes

PostPosted: Thu Feb 06, 2014 2:05 pm
by yc1122
Please see the priors here (original shocks are rescaled to 100*shocks). Btw, since all of the mode-finders will result in non-positive-definite covariance matrix i.e. they can't find the posterior mode, I initialize the RWMH draws with mode_compute=6.

//structural paramters
ebar, .05, gamma_pdf, .05, .025;
chibar, 2, gamma_pdf, 1.8, 0.1;
phi, 1, uniform_pdf, , , 0, 20;
Gbar, .35, gamma_pdf, .3, .05;
epbar, gamma_pdf, 8, 2;
Gam, beta_pdf, 0.5, 0.2;
gam, beta_pdf, 0.5, 0.2;
rho_r, beta_pdf, 0.75, 0.02;
phi_pi, gamma_pdf, 1.5, 0.05;
phi_y, gamma_pdf, 0.15, 0.02;

//shocks
rho_a, beta_pdf, .5, .2;
rho_p, beta_pdf, .5, .2;
rho_m, beta_pdf, .5, .2;
rho_xi, beta_pdf, .5, .2;
rho_chi, beta_pdf, .5, .2;
rho_b, beta_pdf, .5, .2;
rho_er, beta_pdf, .5, .2;
rho_delta, beta_pdf, .5, .2;

stderr e_a, inv_gamma_pdf, 0.1, .2;
stderr e_b, inv_gamma_pdf, 0.2, .2;
stderr e_chi, inv_gamma_pdf, 0.2, .2;
stderr e_p, inv_gamma_pdf, 3, .5;
stderr e_xi, inv_gamma_pdf, 8, 1;
stderr e_m, inv_gamma_pdf, 0.1, .2;
stderr e_r, inv_gamma_pdf, 0.2, .2;
stderr e_d, inv_gamma_pdf, 8, 1;


And output of estimation as below (as one can see, the credibility intervals are strangely tight):
parameters
prior mean post. mean conf. interval prior pstdev

ebar 0.050 0.2016 0.2015 0.2018 gamma 0.0250
chibar 1.800 1.7425 1.7422 1.7430 gamma 0.1000
phi 10.000 1.1704 1.1693 1.1715 unif 5.7735
Gbar 0.300 0.7343 0.7340 0.7346 gamma 0.0500
epbar 8.000 4.7766 4.7676 4.7897 gamma 2.0000
Gam 0.500 0.5233 0.5223 0.5239 beta 0.2000
gam 0.500 0.0009 0.0005 0.0012 beta 0.2000
rho_r 0.750 0.7943 0.7942 0.7944 beta 0.0200
phi_pi 1.500 1.4478 1.4476 1.4480 gamma 0.0500
phi_y 0.150 0.1422 0.1420 0.1424 gamma 0.0200
rho_a 0.500 0.0009 0.0002 0.0013 beta 0.2000
rho_p 0.500 0.9946 0.9945 0.9948 beta 0.2000
rho_m 0.500 0.9996 0.9993 0.9999 beta 0.2000
rho_xi 0.500 0.9993 0.9988 0.9998 beta 0.2000
rho_chi 0.500 0.3168 0.3161 0.3173 beta 0.2000
rho_b 0.500 0.7707 0.7694 0.7719 beta 0.2000
rho_er 0.500 0.7730 0.7721 0.7737 beta 0.2000
rho_delta 0.500 0.1634 0.1625 0.1642 beta 0.2000

standard deviation of shocks
prior mean post. mean conf. interval prior pstdev

e_a 0.100 2.7753 2.7738 2.7771 invg 0.2000
e_b 0.200 0.4731 0.4727 0.4735 invg 0.2000
e_chi 0.200 1.1346 1.1340 1.1351 invg 0.2000
e_p 3.000 6.2107 6.2077 6.2137 invg 0.5000
e_xi 8.000 11.6256 11.6197 11.6320 invg 1.0000
e_m 0.100 0.3016 0.3010 0.3021 invg 0.2000
e_r 0.200 0.1563 0.1558 0.1569 invg 0.2000
e_d 8.000 14.4670 14.4611 14.4714 invg 1.0000



Many thanks.

Re: Reasonable acceptance rate coexist with posterior spikes

PostPosted: Thu Feb 06, 2014 4:11 pm
by jpfeifer
Look at your AR-coefficient estimates. They are basically 1. If a proposed draw that hits the 1, this draw is rejected. Thus, you need a small jumping matrix just to get a decent acceptance rate. Those parameters hitting the bound should also explain the mode finding problems. Given the large persistence implied by those estimates, I would guess your data were not correctly treated/stationarized.

Re: Reasonable acceptance rate coexist with posterior spikes

PostPosted: Sat Feb 08, 2014 3:36 am
by yc1122
Thanks for pointing this out. I think you are right about the jumping scale. But it seems to me normal that some shocks are extremely persistent, say Gali, Smets&Wouters (2011) and Gertler, Sala&Trigari (2008) also find high level (.99) of persistence for price markup or gov spending shocks. What may worry me is the potential underestimation of standard deviations of shocks, which will also push AR coefficients to unity. However, I do want smaller standard deviations of the shocks to account for plausible theoretical moments of the model variables and more reasonable magnitude of IRFs. Actually, that is the reason why I reject the first pass of estimation and have the ongoing attempt.

As for the measurement eqs., I think they should be fine since except for interest rate and inflation rate, all of the observables are filtered and demeaned when necessary.

In fact, when I run more draws, spikes in posteriors of some parameters disappear though others still remain. But no one hits the boundary of priors. So I guess they may hit the boundary of determinacy parameter region where is a high probability region as well. In this case, it may take much longer time (1 million draws in my experiment) to jump away from the boundary of determinacy region.

Re: Reasonable acceptance rate coexist with posterior spikes

PostPosted: Sat Feb 08, 2014 6:21 am
by jpfeifer
A few quick notes. There is a large difference between 0.99 in Gali, Smets, Wouters, and what you find. With 0.99, the halflife of your shock is 69 quarters, with 0.9988 as the lower bound of the HPDI for rho_xi, the halflife is 577 quarters.
Essentially, your distribution is degenerate given that many of your shock processes basically have a unit root. That's why I conjectured there is something wrong.

I hope you use a correct filter for your data (see e.g. https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf)

Any positive definite jumping matrix in the Metropolis-Hastings will yield draws from the posterior. You just may need a lot of draws. What you describe is exactly this. I would recommend trying to run the MCMC with the prior_variance option for mcmc_jumping_covariance and see whether your distribution looks better. This will also be inefficient but should at least assure you of a better feeling what the posterior coverage is. The current estimates seem to be stuck due to a too narrow proposal density.

In short, you have to find out if the results you got indicate that there is a problem with the model as the posterior is really at the upper bound or whether your MCMC sampler just got stuck and you have not enough draws.

Re: Reasonable acceptance rate coexist with posterior spikes

PostPosted: Sat Feb 08, 2014 1:41 pm
by yc1122
Many thanks for your suggestions. I'll try and see.