library(faraway)
data(gala)
g2<-glm(Species ~ .,family=poisson, gala)
#####use N > 8000 for more accurate results
bmen<-poissmh(Species ~ .,data=gala,N=1000)
#####compare Bayesian estimation vs classical
round(data.frame(R.coef=coef(g2),R.sd=sqrt(diag(summary(g2)$cov.unscaled)),
mh.mean=apply(bmen$chain,2,mean),mh.sd=apply(bmen$chain,2,sd)),4)
Run the code above in your browser using DataLab