I am trying to see how different priors affect the posterior estimates in bayesglm{arm}. But no matter what the prior is, why is the posterior hardly changing?
library(Zelig); data(turnout) #Using the "turnout" data from the "Zelig" package
library(arm) #Loading the "arm" package
model.1 = bayesglm(vote ~ race + age, family=binomial(link=logit),
prior.df=1, prior.scale=2.5,
data=turnout) #This is the default specificication with a weakly informative prior
summary(model.1) yields:
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.042320 0.176567 0.240 0.81058
racewhite 0.641959 0.134136 4.786 1.7e-06 ***
age 0.011222 0.003046 3.683 0.00023 ***
Now compare this to:
model.2 = bayesglm(vote ~ race + age, family=binomial(link=logit),
prior.df=1, prior.scale=2.5, prior.mean=c(-100,0), #Specifying a crazy prior
data=turnout)
Summary(model.2) yields:
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.039891 0.176720 0.226 0.821410
racewhite 0.645076 0.134465 4.797 1.61e-06 ***
age 0.011219 0.003047 3.682 0.000231 ***
What's going on here? Surely a prior which is so different would influence the maximum likelihood estimates enough to sharply change the posterior?
Rpackage but the prior becomes less and less important as the sample size increases - here is a question and two answers related to that. – Macro Aug 1 '12 at 14:10