Cross Validated
2023-10-17 12:53 UTC
By Ed9012
AI-113-20231017-social-media-2f4101b7
lme models yielding different coefficients for the same fixed effect but different random effects
I'm doing a linear mixed model. I have six repeated measures of subjects which correspond to different time's instants of some dependent variables. Using the lme function of the nlme package in R, I've fitted two linear mixed models with one fixed effect, one using the time variable as a random effect, and another using the IDs as a random effect variable. So that: model_1 However, I find that the two models differ in the coefficient estimates, those still remaining very similar. Particularly, the coefficients of the first model, the one with time as random effect, corresponds to the mean of the observations within each times as in the original dataset. However, when modelling ID as a random effect, I don't find these estimates to be the same. I'm a bit perplexed by this and would greatly appreciate some guidance on understanding this behavior.
I'm doing a linear mixed model. I have six repeated measures of subjects which correspond to different time's instants of some dependent variables. Using the lme function of the nlme package in R, I've fitted two linear mixed models with one fixed effect, one using the time variable as a random effect, and another using the IDs as a random effect variable. So that: model_1 However, I find that the two models differ in the coefficient estimates, those still remaining very similar. Particularly, the coefficients of the first model, the one with time as random effect, corresponds to the mean of the observations within each times as in the original dataset. However, when modelling ID as a random effect, I don't find these estimates to be the same. I'm a bit perplexed by this and would greatly appreciate some guidance on understanding this behavior.
Full article content could not be extracted automatically. Read the original below.
Source:
Cross Validated
· stats.stackexchange.com