[R-sig-ME] Mixed Models
Ben Bolker
bbolker at gmail.com
Tue Feb 16 17:06:33 CET 2016
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'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:
>
>> 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
>
>
>
>
More information about the R-sig-mixed-models
mailing list