[R-sig-ME] zero values generalized mixed model

Ben Bolker bbolker at gmail.com
Tue Jul 21 21:17:57 CEST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15-07-21 12:59 PM, Thomas Parmentier wrote:
> Hi all, I�ve got a question concerning a generalized mixed model
> where some levels only have zero values. I will try to explain my
> setup: I am testing location preference of ant-associated beetles
> (15 species) in ant nests. Therefore I made six-chamber nests with
> 6 identical connected pots. Ant workers stored all their brood
> (standardized volumes) in one chamber. This brood chamber also
> contained most workers. My aim is to test whether some species are
> attracted or repulsed from those dense brood chambers. Later, I
> want to link this location preference with other traits of the
> myrmecophiles (e.g. degree of parasitism). I used a generalized
> (binomial) mixed model with presence (score 1) / absence (score 0)
> in the brood chamber as dependent variable. A model without
> intercept and an offset of (logit(1/6) was used to directly test
> the deviation of the observed proportions from the expected
> proportion by random distribution (1/6). Species = 15 species of
> myrmecophiles, replicate = experiment was run 15 times. Model: 
> modelbrood<-glmer(BROOD_CHAMBER~offset(datasetlocation$baseline)
> -1+SOORT+(1|REPLICATE)+(1|ID), binomial(link=logit),
> data=datasetlocation) So far, everything runs fine. However two
> species were never observed in the brood chambers, even with more
> than 50 individuals tested in total. So  they show a clear aversion
> of the brood chambers. However, when tested, SE are extremely large
> for those species, and consequently P values of 0.8 are given. So
> apparently the model struggles with levels of a factor with only
> zero values. When I change one zero to one in both species, the SE
> are much more reliable.
> 
> So my question is there a way to handle zero values in generalized
> mixed models?
> 
> Thanks a lot,

  This is called "complete separation"; at this point, the
simplest/most practical way to handle this is to move to a Bayesian
framework using either blmer or MCMCglmm; see e.g.
http://stats.stackexchange.com/questions/128742/mixed-logistic-model-with-complete-separation
and links therein ...

  cheers
   Ben Bolker

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJVrprlAAoJEOCV5YRblxUHNH4IALQDB7sUvDfn67SldGDbcMpz
/fDEvuYqmhh9+Bms3GC60Mmb+34tY8BlcFUuXd+UQUQDQsEkX1SlJVICrOySmrVi
fTnA7GwbhbOYjYJLBdJDcoNsai4IWRKHxmtE8qgPoq7a/DvljxEEOY2XH2DKi6yZ
1V1UUZhGSJvw8eOnRX7pttNke6lbOybH6yaIssQWpGzcVV8e2bGdUsnFJGnpo+0x
zy9Vgzc20k1/NX3Vn0Stj04X0EctFTDZ7XILKQx2refwCLMxgVroAXPvz5TAcJVh
gw0Ay0Xtuz+6wi3OTaz3bjevBuy4iTZQN9eGmkNsReq3WvOvxNRdDn2M4n/TVmY=
=w2Jk
-----END PGP SIGNATURE-----



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