[R-sig-ME] Continuous vs. categorical correlated group effects
Drager, Andrea Pilar
andrea.p.drager at rice.edu
Tue Jan 2 23:21:12 CET 2018
summary(flor_data)
species_id binary_individual_response
Length:29609 Min. :0.00000
Class :character 1st Qu.:0.00000
Mode :character Median :0.00000
Mean :0.06018
3rd Qu.:0.00000
Max. :1.00000
species_abund
Min. : 11.23
1st Qu.:1996.23
Median :2548.23
Mean :3438.20
3rd Qu.:5310.23
Max. :6116.23
The following is also the case:
Won't run-->glmer(binary_indivdual_response ~ species_abund
+(1|species_id),family=binomial(link='logit')
Runs-->glm(binary_individual_response ~ species_abund + species_id,
family=binomial(link='logit')
Quoting Ben Bolker <bbolker at gmail.com>:
> Can you show us the summary() of your data?
> Is it possible you have complete separation in your continuous predictor?
>
> On 18-01-02 02:38 PM, Drager, Andrea Pilar wrote:
>>
>> 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 =
>> "categorical")
>>
>> 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
>>
>> _______________________________________________
>> 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
Andrea Pilar Drager
PhD. student
Ecology and Evolutionary Biology, Rice University
More information about the R-sig-mixed-models
mailing list