I'm still pretty new to linear mixed models, so any help is highly appreciated.

In my experiment, a test group (gets the intervention) and a control group (does not get the intervention) are observed over time. There are five measurement points (one might think of them as "waves of measurement") for each participant. Within a given measurement point the date one participant fills out her questionnaire might differ from the date for a another participant (i.e. one particpant fills out her questionnaire for measurement point #4 on 2019-02-01 while another particpant fills out her questionnaire for measurement point #4 on 2019-02-20).

I'm interested in the effect of the intervention and the effect of time on some outcome variable.

Based on the things I've read so far, I assume a "naive model" (random slope only, no interaction between fixed effects) in lme4 might look like this:

outcome ~ group + measurement_point + (1|subject)

Now, I've some general questions on this:

  1. Is the naive model above reasonable?
  2. What is the best way to model the measurement points (i.e., as individual dates on which participants filled out the questionnaire or as a factor variable representing the number of "waves", e.g. going from 1 to 5)?
  3. Should I care about missing data assuming that it is missing at random? I have up to 19% of missing values for some measurement points. What's the best way to handle this?

Edit: Here's a plot of the data. There is probably no effects of group or time just based on this visual exploration, but I still want to fit a model that examines it. :) Plot of the data at hand


closed as too broad by mkt - Reinstate Monica, Michael Chernick, kjetil b halvorsen, Peter Flom - Reinstate Monica Jul 26 at 12:19

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Thank you for your suggestions! So should I put my three questions in three separate posts? $\endgroup$ – Tee Jul 25 at 12:15
  • $\begingroup$ I can't attach the data, but I've added a plot to the opening post. There is probably no effect of group or time just based on this visual exploration, but I still want to fit a model that examines this. :) $\endgroup$ – Tee Jul 25 at 13:04

A couple of points:

  • The fixed-effects part of the model specifies the mean structure. Based on the design of your study and your research question, you would probably want to assume that there is a difference in the average longitudinal evolutions between the two groups. To achieve this you would need to include the interaction term between your follow-up time variable and the intervention, and test for this interaction term.
  • The longitudinal evolutions in the two groups may be nonlinear. You could at least test for that by including polynomials or splines.
  • The random-effects part of the model accounts for the correlation in the repeated measurements of each participant. The random intercepts models you have posted above assumes that the correlations over time remains constant. Most often this is not a reasonable assumption. Including both random intercepts and random slopes can give you more flexibility, and postulates that the correlations decrease with the time lag between measurements. You could test for that using a likelihood ratio test.
  • When the mean and variance-covariance structure of the mixed model are correctly/flexibly specified, and your missing data are missing at random, then the mixed model will provide you with valid inferences without having to do anything about these missing data.

You may find more information regarding all these issues in my course notes.


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