1

Hoping you can help me understanding a request that my supervisor would like me to do in an LS Mean plot. My model is the following in lme4:

DV ~ Group + Time + Group x Time + BaselineScore + BaselineScore x Time + (1|Subject) + (1|Site)

Where subjects are randomly assigned to groups and coded to be explicitly nested within sites. My time variable is discrete, coded as Time 0 (baseline data collection), Time 1 (first visit), Time 2 (second visit), and Time 3 (final visit). So in the model, only Times 1, 2, and 3 are included since I already have BaselineScore by itself and as an interaction with each time point.

My supervisor asked me to include Time 0 on the plot to indicate where each group started pre-treatment, to better interpret the plot at Times 1 through 3. He also said these means should be the same for both groups since we controlled for BaselineScore.

This seems wrong to me. It was my understanding that the random intercepts applied to individuals within sites, not to the groups themselves, so there is no reason for the groups to be different even though we controlled for baseline values and have random intercepts. Also, it's my understanding that the LS means represent predictions from the model, but Time 0 is not included in the model. As such, it would not make sense to present the raw means of the DV for each group as these represent different means than the LS means themselves.

Can someone can clear up our misconceptions?

Update

Here is the code used to generate the plot:

model1_grid <- ref.grid(model1)
emms_model1 <- emmeans(model1_grid, ~ Group | Visit)

model1_plot <- plot(emms_model1, comparisons = TRUE, adjust = "mvt", 
     horizontal = TRUE, plotit=FALSE)

I then take the above output to customize it a bit with ggplot to obtain the following. The orange line is the control group; the purple line is the treatment group.

Model 1 LS Means Plot

Lastly, Russ asked for clarification on Time 0. Time 0 was excluded prior to the analysis. This is because all the Time 0 data points are baseline scores, which are already contained in the BaselineScore variable in the model.

  • Show us what you have now that you are falling an LS mean plot, and perhaps the code for how you got that plot. And why do you say that tine 0 is not in the model? Did you exclude those cases in the data before fitting the model? – Russ Lenth Oct 09 '20 at 13:59
  • Hi Russ - I added code for the plot, included the plot, and clarified what I did with Time 0. – SometimesZero Oct 09 '20 at 19:10
  • Since baseline score is in the morel as a covariate, the reference grid shows predictions for the mean baseline score -- which seems a valid approach to me as it controls for baseline score. If you use `str(model1_grid)` you can find out what that mean is (or just get the mean from the data). Also, you could then add the baseline mean to model1_plot at time 0 for each group, then plot those data. – Russ Lenth Oct 09 '20 at 22:16
  • I think it's reasonable to show predictions for the mean baseline, too, and I knew this was going on. In this case, str(model1_grid) gives a mean baseline of 25.911. – SometimesZero Oct 10 '20 at 15:40
  • One conceptual note though: When you say I could add the baseline mean to model1_plot at time 0 for each group, I'm unclear what this means. Do both groups start from this mean baseline and then begin to differentiate at Time 1, or am I essentially creating a new reference grid with a Time 0 like the following: Group = 0, 1 Time = 0, 1, 2, 3 BaselineScore = 25.911 – SometimesZero Oct 10 '20 at 15:49
  • Add two more rows to that data frame, with Time = 0, LS mean equal to the baseline mean, and the different group IDs – Russ Lenth Oct 10 '20 at 16:05
  • Thank you for the clarification, Russ. Do you have any thoughts on my supervisor's intuition that the groups should start at the same baseline because it was controlled for in the model with random effects? – SometimesZero Oct 13 '20 at 14:02
  • Yes. BaselineScore is a covariate in the model, and the plot comprises predictions when BaselineScore is equal to its mean (*regardless* of group). So it definitely makes sense to incorporate that point in the plot for sake of comparison. – Russ Lenth Oct 13 '20 at 23:45

0 Answers0