[R] time as a continuous factor in a linear mixed effects model
|@ur@coco @end|ng |rom gm@||@com
Thu Feb 25 18:18:54 CET 2021
I am interested in investigating the main effects of group, time, and group
by time interaction on survey outcomes using linear mixed effects models.
Time is considered as continuous (number of days since baseline), but isn't
it also categorical, since I want to compare Session 1 vs Session 4 (for
example)? How is that handled in the model? As of now, time (days since
baseline) is being treated as one unit, rather than four separate sessions.
Here is an example of my code: mdl.outcome <- lmer(outcome ~ time*Group +
(1 | PID), data = dta)
[[alternative HTML version deleted]]
More information about the R-help