Is there a way to recover Metropolis-step acceptance rates AFTER completing posterior draws? The immediate application is in the probit.bayes and logit.bayes models used by Zelig... which I believe is merely calling MCMCpack. So one strategy, to which I am fixing to resort, is to call, say, MCMClogit with verbose set to mcmc (or mcmc divided by an integer) and then look at my screen. But it seems odd that this datum is not being put into output objects, so I wonder if I'm missing something. Plus sometimes I can save the output object, but then the power goes out and what's on screen is gone forever. Thanks, Michael Michael Margolis Profesor Investigador Escuela de Economía Universidad de Guanajuato UCEA-Campus Marfil, Fracc 1 El Establo, Guanajuato, Gto. CP 36250 Mexico (52)(473) 735 29 25 Ext. 2858 [[alternative HTML version deleted]]
Hi Michael,
If you are using the standard logit or probit model, it is fairly easy to save
the acceptance rate after each draw. I would recommend using the
"bayesm" package as the source code is easy to manipulate. For
instance in the probit function (rbprobitGibbs), you need to include a couple
of lines of code to save the acceptance rate. I'm sure it is possible with
the other packages as well.
HTH
Anup
Michael Margolis <michael.margolis@ugto.org> wrote: Is there a way to
recover Metropolis-step acceptance rates AFTER
completing posterior draws?
The immediate application is in the probit.bayes and logit.bayes
models used by Zelig... which I believe is merely calling MCMCpack.
So one strategy, to which I am fixing to resort, is to call, say,
MCMClogit with verbose set to mcmc (or mcmc divided by an integer)
and then look at my screen. But it seems odd that this datum is not
being put into output objects, so I wonder if I'm missing something.
Plus sometimes I can save the output object, but then the power goes
out and what's on screen is gone forever.
Thanks,
Michael
Michael Margolis
Profesor Investigador
Escuela de Economía
Universidad de Guanajuato
UCEA-Campus Marfil, Fracc 1
El Establo, Guanajuato, Gto. CP 36250
Mexico
(52)(473) 735 29 25 Ext. 2858
[[alternative HTML version deleted]]
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
---------------------------------
[[elided Yahoo spam]]
[[alternative HTML version deleted]]
Hi Michael,
Actually I was wrong in the initial mail. rbprobitGibbs uses the Gibbs Sampler.
I think the rhierbinLogit does the Logit model which uses a Metropolis hastings
approach uses the acceptance rate and the function outputs the rejection rate in
the output list. So you are not required to change the source code.
HTH
ANup
Michael Margolis <michael.margolis@ugto.org> wrote: Is there a way to
recover Metropolis-step acceptance rates AFTER
completing posterior draws?
The immediate application is in the probit.bayes and logit.bayes
models used by Zelig... which I believe is merely calling MCMCpack.
So one strategy, to which I am fixing to resort, is to call, say,
MCMClogit with verbose set to mcmc (or mcmc divided by an integer)
and then look at my screen. But it seems odd that this datum is not
being put into output objects, so I wonder if I'm missing something.
Plus sometimes I can save the output object, but then the power goes
out and what's on screen is gone forever.
Thanks,
Michael
Michael Margolis
Profesor Investigador
Escuela de Economía
Universidad de Guanajuato
UCEA-Campus Marfil, Fracc 1
El Establo, Guanajuato, Gto. CP 36250
Mexico
(52)(473) 735 29 25 Ext. 2858
[[alternative HTML version deleted]]
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
---------------------------------
[[elided Yahoo spam]]
[[alternative HTML version deleted]]