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

Jakub Szymkowiak qbaszym at tlen.pl
Wed Dec 7 23:37:40 CET 2011


Hi,
did You try to run chain with more/less number of iteration?

Cheers,
Kuba


-----Oryginalna wiadomość----- 
From: Eryn McFarlane
Sent: Wednesday, December 07, 2011 5:19 PM
To: m.fenati at libero.it
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] priors with MCMCglmm binomial analysis

Hi Massimo,

I'm not sure, but I was under the impression that binomial analysis in 
MCMCglmm should be done with the family ="categorical". I don't know if this 
will make a huge difference, but hopefully it helps!

Good Luck,

Eryn

Eryn McFarlane
MSc Candidate
Department of Integrative Biology
University of Guelph
Guelph, ON, Canada N1G 2W1

On 2011-12-07, at 11:14 AM, m.fenati at libero.it wrote:

> 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
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models




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