Linear mixed effects model standardization with Z score not giving consistent results
Show older comments
HI, I am running a mixed effects model with interaction terms, and when I run the model with the raw data, I essentialy get what I would expect
Linear mixed-effects model fit by ML
Model information:
Number of observations 44
Fixed effects coefficients 5
Random effects coefficients 22
Covariance parameters 2
Formula:
outcome ~ 1 + intervals + exposure*sessions + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
264 276.49 -125 250
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue Lower Upper
'(Intercept)' 26.899 2.6919 9.9926 39 2.6128e-12 21.454 32.344
'exposure' -1.6766 1.0159 -1.6504 39 0.10689 -3.7313 0.3782
'intervals' -0.19934 0.033912 -5.8783 39 7.6441e-07 -0.26794 -0.13075
'sessions' -0.73017 0.44687 -1.634 39 0.11031 -1.6341 0.17371
'exposure:sessions' 0.4013 0.14279 2.8105 39 0.0076969 0.11249 0.69012
Random effects covariance parameters (95% CIs):
Group: subject (22 Levels)
Name1 Name2 Type Estimate Lower Upper
'(Intercept)' '(Intercept)' 'std' 3.1621 1.9751 5.0624
Group: Error
Name Estimate Lower Upper
'Res Std' 3.1433 2.3339 4.2334
But when I standardize the predictor using the matlab zscore function I get something totally different, whether I also standardize the dependent variable or not
Linear mixed-effects model fit by ML
Model information:
Number of observations 44
Fixed effects coefficients 5
Random effects coefficients 22
Covariance parameters 2
Formula:
drinking ~ 1 + intervals + exposure*sessions + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
127.45 139.94 -56.727 113.45
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue Lower Upper
'(Intercept)' 0.0078404 0.17882 0.043845 39 0.96525 -0.35386 0.36954
'exposure' -0.020592 0.14613 -0.14091 39 0.88867 -0.31618 0.27499
'intervals' -0.1539 0.21666 -0.71034 39 0.48172 -0.59213 0.28433
'sessions' 0.3547 0.21217 1.6717 39 0.10258 -0.07446 0.78385
'exposure:sessions' -0.099309 0.24164 -0.41098 39 0.68334 -0.58807 0.38945
Random effects covariance parameters (95% CIs):
Group: subject (22 Levels)
Name1 Name2 Type Estimate Lower Upper
'(Intercept)' '(Intercept)' 'std' 0.6939 0.43148 1.1159
Group: Error
Name Estimate Lower Upper
'Res Std' 0.65418 0.4809 0.8899
When I look at plots of the individual predictors before and after z transformation, everything looks similar, just the values are (expectedly) different. I would not expect such a drastic difference in LME models. Grateful for any assistance! Thank you!
3 Comments
the cyclist
on 28 Sep 2022
Can you upload the data and the code you used to fit the models?
bsriv
on 28 Sep 2022
the cyclist
on 28 Sep 2022
Edited: the cyclist
on 28 Sep 2022
If anyone else happens to investigate, be aware that the attached files are MAT, not CSV.
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!