My model is currently setup as follows either with just random intercepts:


OR with random slopes as well


Treatment being + or -

Exposures ranging from 1 to 6 with one exposure per day, ever day for 6 days.

Seedling_ID being a number for each individual plant to pull out the within subjects random effects.

And Log10.Daily_Proportion_Growth. being the log10 ratio of their size at Exposure X to their size at Exposure X-1.

The analogous Log10.Cumulative_Proportion_Growth is simply the log10 ratio of their size at Exposure X to their initial size (Exposure 0).

where I'm interested in the Daily growth, and Cumulative growth of some plants in response to a treatment, and I've observed that there is variation in the effect of the treatment depending on the exposure (see below, which is why I wanted time as categorical and not continuous).

My model is exactly the same for the Cumulative growth, treating Exposure (time) as categorical on account of the unequal effect of treatment across exposures, with the same question: Random slopes or just random intercepts?

I've been trying to hunt down this answer on stack-exchange on my own, but the examples never quite seem to fit particular situation, or I get conflicting or difficult to interpret (for me!) answers. As someone with no experience publishing the results of mixed effects models, I wanted to be sure I wasn't mangling the process!

Daily change in proportion growth with exposure


1 Answer 1


In principle there is an argument that you should include a random effect for any fixed effect that varies within subjects; this is advocated by Barr et al 2013 "Keep it maximal", although strongly opposed by others such as Bates and Vashishth (no publication yet, that I know of). By that logic you should use ~ fExposure*Treatment + (fExposure|SubjectID) (where fExposure is factor(Exposure)). However, this model will fit 12 fixed-effect parameters (2 treatment levels $\times$ 6 exposure levels) plus a 6 $\times$ 6 variance-covariance matrix (21 parameters); you'd better have quite a lot of data for this to work, e.g. hundreds to many hundreds of plants. I'm guessing from the width of your error bars that you don't have that many; practically speaking you may have to drop back to the intercept-only model.

You could save parameters by treating exposure as numeric rather than categorical (i.e. 2 parameters for intercept+slope rather than 6 for levels), but since the trend with exposure (at least for the response variable you've shown us) is not particularly linear, it doesn't seem that doing that is going to be particularly useful.

By the way, seeing "variation in the effect of the treatment depending on the exposure" is not the grounds on which I would choose between treating exposure as numeric vs categorical; among-treatment variation in exposure effects argues for the need for an interaction (which you have in your model already). Rather, as suggested above, numeric predictors are good for trends that are reasonably linear, whereas categorical predictors (or more complex nonlinear models) are needed for trends that are non-linear or idiosyncratic.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.