Hoping to get some clarification on my understanding of interaction terms in a GLM model I have produced.
I have written the following model
interactionmodel <- lme(ChangeTotal ~ PreTotalCentre + SexCode
+ AgeCentre + SexCode*PreTotalCentre
+ AgeCentre*PreTotalCentre,
data = Fitness,
random = ~ 1|Class,
method = "ML",
na.action = na.exclude)
Where I am looking to explain the change in a physical fitness assessment with predictors of initial score (termed PreTotal), Sex, and Age. Age and PreTotal have been grand mean centred.
Sex has been coded as follows
SexCode = dplyr::recode(Sex, `0` = "Male", `1` = "Female")
The output of this model is as follows
Linear mixed-effects model fit by maximum likelihood
Data: Fitness_OAzc
Random effects:
Formula: ~1 | Class
(Intercept) Residual
StdDev: 13.42854 26.20813
Fixed effects: ChangeTotal ~ PreTotalCentre + SexCode + AgeCentre + SexCode * PreTotalCentre + AgeCentre * PreTotalCentre
Correlation:
(Intr) PrTtlC SxCdMl AgCntr PTC:SC
PreTotalCentre 0.629
SexCodeMale -0.759 -0.782
AgeCentre -0.034 -0.015 0.050
PreTotalCentre:SexCodeMale -0.530 -0.833 0.604 0.053
PreTotalCentre:AgeCentre 0.000 -0.087 -0.003 0.185 0.168
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-4.411066018 -0.514522220 0.003675318 0.532391577 4.837327085
Number of Observations: 354
Number of Groups: 7
Value Std.Error DF t-value p-value
(Intercept) -20.19162 8.386217 342 -2.407715 0.0166
PreTotalCentre -0.73703 0.045738 342 -16.114380 0.0000
SexCodeMale 41.61622 6.787769 342 6.131060 0.0000
AgeCentre -0.27988 0.338434 342 -0.826994 0.4088
PreTotalCentre:SexCodeMale 0.35325 0.055494 342 6.365576 0.0000
PreTotalCentre:AgeCentre 0.01218 0.004421 342 2.756044 0.0062
My understanding for interpreting the intercepts would be as follows:
- For every 1 point increase in PreTotal above the mean, its expected the Change would decrease by 0.73 points
- We'd expect Males to have a 40 point change compared to Females
- For every 1 year increase in Age, we'd expect a -0.27 decrease in the Change
- Assuming that the PreTotal score is the same distance from the mean, we'd expect Males to have a larger Change of approximately 0.35
- Assuming that the PreTotal score is the same distance from the mean, we'd expect a 1 year increase in age to result in a 0.01 increase
Are these interpretations correct? My dataset shows that females have a higher mean and percent change than males, and now I am thinking that if I coded the males as 0, and females a 1 that despite the output saying Males that math (bPreTotalSex) would mean that females would expect a greater change given the same PreTotal score since a 0 (male) would cancel out the term.
Would appreciate some confirmation and further insight! Thank you in advance!
All analysis done in R using NLME package for the model
Classeswith different random intercepts in females might be at work. Note that you probably should NOT be evaluating a change score anyway; best practice is to use pre-score as a predictor and post-score (not the change score) as the outcome. See this page and its links, including this page. – EdM Mar 21 '23 at 14:08