So, we are doing a linear mixed effects model for analyzing some results of our study. In short, we have performed two different meal tests (i.e., two groups), and measured the response in various biomarkers at baseline as well as 1, 2, 3, and 4 hours after the meal.
I had a meeting with a statistician who explained that we should use linear mixed models for this and as such, using the nlme
package in R the syntax looks like this:
model <-lme(biomarker~ as.factor(group)*visit, random = ~1|ID, data=data, method="ML")
summary(model)
The output (abbreviated for readability):
Linear mixed-effects model fit by maximum likelihood
Data: data
AIC BIC logLik
137.593 149.0651 -62.79649
Random effects:
Formula: ~1 | ID
(Intercept) Residual
StdDev: 1.462879 0.6039689
Fixed effects: biomarker ~ as.factor(group) * visit
Value Std.Error DF t-value p-value
(Intercept) 7.869766 0.7157143 38 10.995681 0.0000
as.factor(group)3 1.295118 1.0121729 8 1.279542 0.2366
visit -0.096024 0.0679003 38 -1.414191 0.1654
as.factor(group)3:visit -0.358905 0.0960255 38 -3.737606 0.0006
Correlation:
(Intr) as.()3 visit
as.factor(group)3 -0.707
visit -0.247 0.174
as.factor(group)3:visit 0.174 -0.247 -0.707
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-3.107751422 -0.303320567 0.004573801 0.377750437 1.967646127
Number of Observations: 50
Number of Groups: 10
To summarize:
- Exposure = one of two meal tests (group in the syntax)
- Outcome = Biomarker
- Time variable = Visit (5 in total for each participant, continuous)
My questions are:
-
Am I correct in interpreting this that there is an interaction between group and visit?
-
I am unclear as to how I should interpret the estimates here. Am I correct in saying that at time = 0, then the group difference (3 vs. 2) is 1.29? And further that this effect depends on the visit? What about the other timepoints?
-
Is it sufficient to report this model or should we also include a model without the interaction term that is just including group and visit?
Best Answer
Yes.
Yes, that is the group difference at time = 0 and yes, it depends on time. You can calculate the estimate at any combination of the variables by using the formula:
$7.87 + 1.30*(I(\text{group} = 3)) - 0.10*\text{visit} - 0.36*(I(\text{group} = 3))*\text{visit}$
That depends on what you are interested in, but when there is an interaction, the model with only main effects can be misleading.