11
$\begingroup$

Both bayesglm() (in the arm R package) and various functions in the MCMCpack package are aimed at doing Bayesian estimation of generalized linear models, but I'm not sure they're actually computing the same thing. The MCMCpack functions use Markov chain Monte Carlo to obtain a (dependent) sample from the joint posterior for the model parameters. bayesglm(), on the other hand, produces. I'm not sure what.

It looks like bayesglm() produces a point estimate, which would make it MAP (maximum a posteriori) estimation rather than a full Bayesian estimation, but there's a sim() function that looks like it can be used to get posterior draws.

Can someone explain the difference in intended use for the two? Can bayesglm() + sim() produce true posterior draws, or is it some sort of approximation?

$\endgroup$
2
2
$\begingroup$

To see the full source code you need to download the arm package source from CRAN (it's a tarball). A quick look at the sim function makes me think that arm is an approximate Bayes method as it seems to assume multivariate normality of the maximum likelihood estimates. In models with a very non-quadratic log likelihood, such as the binary logistic model, this may be unlikely to be accurate enough. I'd like to get some comments from others about this. I have used MCMCpack with success; it provides an exact Bayesian solution for many models, given enough posterior draws and convergence of MCMC.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.