Baffled MCMClogit
I think your problem is the model formula as logistic regression models have no error . So the model CASE ~ 1
should be replaced with something like CASE ~ x
(predictor variable x
required). Here's your example, modified:
CASE <- rbinom(100,1,0.5)
x <- 1:100
posterior_m0 <- MCMClogit (CASE ~ x, b0 = 0, B0 = 1)
classic_m0 <- glm (CASE ~ x, family=binomial(link="logit"), na.action=na.pass)
So, I think your problem is not related to the MCMCpack library (disclaimer: I have never used this package).
source to share
For those facing this problem:
It seems that MCMClogit function cannot handle anything other than B0 = 0 if your model only has interception.
If you add covariance, you can specify the precision exactly.
I'd look at other packages (like hands or rjags) if you really want to try this model. For a list of options available for Bayesian regression see http://cran.r-project.org/web/views/Bayesian.html
source to share