[R-sig-ME] priors with MCMCglmm binomial analysis

m.fenati at libero.it m.fenati at libero.it
Wed Dec 7 17:14:00 CET 2011


dear R users,
I don't know how to set a MCMCglmm for binomial analysis. I'm trying to fit 
several model but bad results were always observed if compared with the glm 
results. 

My model is:


tc<-matrix(c(124,184,33,18,86,9), ncol=2)

tco<-data.frame("specie"=c("bov","ov","cap"),"pos"= tc[,2],"tot"=tc[,1])

prior<-list(R=list(V=1,nu=0.002))

m.1<-MCMCglmm(cbind(pos,(tot-pos))~specie,prior=prior,data=tco,nitt=900000,
thin=100,burnin=300000,family="multinomial2",verbose=FALSE)


Large coefficient values and intervals occurred after fitting the model:

> summary(m.1)

 Iterations = 300001:899901
 Thinning interval  = 100
 Sample size  = 6000 

 DIC: 401.758 

 R-structure:  ~units

      post.mean  l-95% CI  u-95% CI eff.samp
units 594395401 0.0002638 1.418e+09     5106

 Location effects: cbind(pos, (tot - pos)) ~ specie 

            post.mean  l-95% CI  u-95% CI eff.samp pMCMC
(Intercept)     59.24 -20274.73  22702.05     6000 0.697
speciecap      -62.28 -33022.96  28154.63     6000 0.815
specieov      -142.82 -28811.83  30635.06     6000 0.717



When I fit a glm model, different and more reasonable results are observed:

m.1<-glm(cbind(pos,(tot-pos))~specie, data=tco, family="binomial")

>summary(m.1)

.........

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -1.7731     0.2549  -6.955 3.52e-12 ***
speciecap     0.7922     0.4667   1.698   0.0896 .  
specieov      1.6424     0.2947   5.574 2.49e-08 ***



Where is the error? a mistake in the model specification, priors setting, ... 
I dont'know!
I tried with other priors but the results never agree with the glm results.


Could someone help me?


Thanks in advance!

Regards



Massimo




More information about the R-sig-mixed-models mailing list