[R-sig-ME] Fwd: Continuous variable as random slope and the minimum number of levels for a categorical variable to be treated as random
geralttee at gmail.com
Sat Apr 15 16:17:17 CEST 2017
this is not really the point of "even continuous, ordered variables can be used as grouping factors”. Random effects have gathered a lot of misunderstandings over the years and I’ve seen many invalid claims about them, both in the Internet and in personal communications from many researchers (e.g. that you define a variable as random if it is not of „main interest”, or that grouping factors with 2-3 levels make sense as robust random terms). For me the point is really the aim and question we want to ask (and also computational considerations - e.g. 2 levels are a poor sample from a larger distribution of random effects and probably are much better accommodated when included as fixed factors, without any serious bias in other model estimates).
Your question (if "continuous, ordered variables can be used as grouping factors” can be used as random terms) is actually a question about what is the point of a particular term. If for some reason you can account for possible non-independence between age classes, then yes, you can include them as a random factor (in such a case they loose their „ordering” - you use them as classes and estimate variance between them). On the other hand - you may want to vary the effect of such continuous variable, e.g. between individuals - in such a case you form a random interaction with it, estimating variance in age-related slopes (and also usually intercepts). Everything boils down to your question and the reason for including a particular term in the model. I can even imagine a age where age is used as both a fixed covariate and as a random (unordered) categorical variable (if we expect some between age-classes variance on top of that explained by a linear, continuous effect of age modelled via the fixed term).
Institute of Environmental Sciences
Jagiellonian University, Kraków, Poland
Evolutionary Biology Centre
Uppsala University, Uppsala, Sweden
Google Scholar profile
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models