Skip to content

Mixed Models

5 messages · Jessica Witt, Neil French Collier, Ben Bolker +2 more

#
Hi,

I?m very new to mixed modelling so please forgive me for this! I am trying to see the repeatability of a behaviour for individuals e.g. the area travelled, but I?ve also got a number of variables that could confound this so am I right in including these as fixed factors? 

Furthermore I?ve written the code but it?s not giving me anything and I?m pretty unsure what the error message means, if someone could explain to me any modifications I need in my R code to get the repeatability of area travelled that would be amazing!

areamod<-lmer(Area~1+Sex+Temp+Mass+Length+Dodgy+Tank+Order+(1|ID), data=platy, na.action=na.exclude, REML=TRUE)
fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
#
Hi Jessica,

It's likely that you don't have enough data to fit the model you described.
These are more like stats questions (i.e. what factors to include), but I
think if you provide more information about your problem (A reproducible
example) then you might get more help. See here for how to do this:
http://adv-r.had.co.nz/Reproducibility.html.

Cheers,

Neil
On Tue, Feb 16, 2016 at 4:45 PM, Jessica Witt <jes-w at hotmail.com> wrote:

            

  
    
#
More specifically, "fixed effect model matrix is rank-deficient" 
means that several of your predictor variables are perfectly collinear; 
one way this could happen, e.g. is if "Dodgy" is a binary variable that 
varies only across tanks (i.e. some tanks are dodgy, some are not), so 
that once Tank is in the model as a fixed effect, Dodgy gives no further 
information.

fixef(areamod,add.dropped=TRUE)  should give you some more hints about 
which variables were dropped (but not directly which ones they were 
collinear with, although you may able to guess at that point).

   It does seem like a good idea to include confounders/moderators as 
fixed effects.  Perhaps you should consider including Tank as a random 
effect (i.e. (1|Tank)), which might also take care of your collinearity 
problem?
On 16-02-16 10:57 AM, Neil French Collier wrote:
#
Hi Jessica,

It is very difficult to help about the error message without more
details without more details on your dataset, but basically it means
that you have redundant information in your 'fixed effects' variables
(counfounding variables).

For instance, you may have only male (so "sex" is useless, redundant
with 1), or "dodgy" may be 1 only for males and 0 only for femalees,
to the two variables are in fact the same...

More subtle, ? mass ? may be an affine function of ? length ? (like
mass = 3 * length + 4 for instance), here again making these two
variables redundant.

Including confounding variables as fixed effects seems otherwise a
good starting point, but here again without any details about their
meaning, it's impossible to say if you are right in the syntax and so
on.

Best regards,
On Tue, Feb 16, 2016 at 03:45:22PM +0000, Jessica Witt wrote:
? Hi,
? 
? I?m very new to mixed modelling so please forgive me for this! I am trying to see the repeatability of a behaviour for individuals e.g. the area travelled, but I?ve also got a number of variables that could confound this so am I right in including these as fixed factors? 
? 
? Furthermore I?ve written the code but it?s not giving me anything and I?m pretty unsure what the error message means, if someone could explain to me any modifications I need in my R code to get the repeatability of area travelled that would be amazing!
? 
? areamod<-lmer(Area~1+Sex+Temp+Mass+Length+Dodgy+Tank+Order+(1|ID), data=platy, na.action=na.exclude, REML=TRUE)
? fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
? _______________________________________________
? R-sig-mixed-models at r-project.org mailing list
? https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
#
Hi Jessica,

There is a very useful paper on repeatability that explains how to  
estimate it for many experimental settings and also deals with the  
inclusion of confounding fixed effects. Hence, it may answer some of your  
questions:

Nakagawa S, Schielzeth H (2010) Repeatability for Gaussian and  
non-Gaussian data: a practical guide for biologists. Biological Reviews of  
the Cambridge Philosophical Society, 85, 935-956.

Best,
Paul
On Tue, 16 Feb 2016 17:45:22 +0200, Jessica Witt <jes-w at hotmail.com> wrote: