Hi all,
I am building a mixed model (longitudinal, data in long format, clustered by ID with a random slope for time) and am testing time-invariant predictors of change in the outcome variable over time as interactions of predictorXtime. In this model, the significance of the interaction indicates whether the predictor significantly predicts change in outcome over time. The significance of the time parameter indicates whether the outcome changed over time.
In Stata, something like this (MODEL 1):
However, I have seen other models testing the same thing in a different way - by dropping the first timepoint from the dataset, and including the initial value of the outcome variable as a covariate, like this (MODEL 2):
In this model, the significance of the predictor parameter indicates whether the predictor significantly predicts change in outcome over time.
I am wondering if someone could explain the different implications of these two ways of modeling predictors? Why would one be used over the other? Can the second model be used to test the simple effects of time, or would the time parameter in this model refer to something different to what I described in the first model?
Thanks in advance for your time.
I am building a mixed model (longitudinal, data in long format, clustered by ID with a random slope for time) and am testing time-invariant predictors of change in the outcome variable over time as interactions of predictorXtime. In this model, the significance of the interaction indicates whether the predictor significantly predicts change in outcome over time. The significance of the time parameter indicates whether the outcome changed over time.
In Stata, something like this (MODEL 1):
Code:
mixed outcomevar time predictor predictor#time || id: time
Code:
drop if time==0 mixed outcomevar time initialvalueoutcome predictor || id: time
I am wondering if someone could explain the different implications of these two ways of modeling predictors? Why would one be used over the other? Can the second model be used to test the simple effects of time, or would the time parameter in this model refer to something different to what I described in the first model?
Thanks in advance for your time.
Comment