[R-sig-ME] Continuous vs. categorical correlated group effects

Drager, Andrea Pilar andrea.p.drager at rice.edu
Tue Jan 2 20:38:06 CET 2018

Hi All,

I am having trouble running a Bayesian mixed model in MCMCglmm where I  
have individual-level data for my response variable, and species-level  
data as the random effect (such as "species"), plus any other  
species-level continuous variable, such as abundance, in the model.  
But if the the other species-level variable is categorical--whether  
because I make it a random effect or because it is in fact  
categorical--the model runs! Could someone please explain the stats  
behind this?

prior = list(R = list(V = 1, nu = 0, fix = 1),  G = list(G1=list(V =  
1,nu = 0.002)))

Won't run-->MCMCglmm(binary_individual_repsonse ~ species_abund_continuous,
                      random = ~ species_id_categorical, family =  

             Error : Mixed model equations singular: use a (stronger) prior

Runs-->MCMCglmm(binary_individual_response ~ 1,
                 random = ~ species_abund_categorical +  
species_id_categorical, family = "categorical")

Runs-->MCMCglmm(binary_individual_response  ~ species_id_categorical,
                 random = ~ species_abund_categorical, family= "categorical")

Thanks in advance!
Andrea Pilar Drager
PhD. student
Ecology and Evolutionary Biology, Rice University

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