[R-sig-ME] MCMCglmm binomial model

Jarrod Hadfield j.hadfield at ed.ac.uk
Thu Mar 24 12:22:58 CET 2011


Hi,

You should specify family="categorical" for binary data. You can use  
"multinomial2" but then you need to have a double columned response   
with success and failures.

Jarrod

On 23 Mar 2011, at 18:43, François Dumont wrote:

> Hi,
>
> I'm trying to run a binomial model with a MCMCglmm code that I found  
> on the R-sig-ME list (see below). Unfortunately, the following error  
> message occurs when I send the code to R. What I am doing wrong ?
>
> error message : Erreur dans `[.data.frame`(data, ,  
> match(response.names[0:nJ + nt], names(data))) :
>  undefined columns selected
>
> prior <- list(R=list(V=1, nu=0.002), G=list(G1=list(V=1, nu=1,  
> alpha.mu=0, alpha.V=100),G2=list(V=1, nu=1, alpha.mu=0, alpha.V=100),
> G3=list(V=1, nu=1, alpha.mu=0, alpha.V=100)))
>
> model1 = MCMCglmm(bik~
> +ageclass
> +yday
> +nbAdult
> ,random=~year+Famille+Marmotte
> , data=sp,nitt=503000,thin=500,burnin=3000,verbose=FALSE,  
> prior=prior, pr=TRUE, family="multinomial2", DIC=TRUE)
>
> bik is a binomial variables (an animal exhibited or not a behaviour)  
> with value being 0 or 1. I need to extract the specific sample of  
> each individual so that's why pr=TRUE.
>
> Thanks.
>
> François Dumont.
>
> -- 
> Candidat au doctorat en Biologie
> Laboratoire de lutte biologique - Dr. Éric Lucas
> Université du Québec à Montréal
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




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