Hi Everyone,
I'm learning to use mixed models with longitudinal data but I am unclear with what exactly the random effect portion of the Stata mixed command is doing.
The fixed portion of the command is looking at an interaction between the experimental condition and which period of data collection they were in (T1, T2, T3, T4).
The random portion is including participant id and allows the slope for period to change across each respondent.
I understand that autocorrelation needs to be avoided, and I know that y (@T1) correlates with y (@T2) , y (@T2) correlates with y (@T3), etc.
I want to adjust for this issue, but I <think> that this is being addressed by identifying id in the 'id:' portion of the command. Is this correct?
Thanks!
David.
I'm learning to use mixed models with longitudinal data but I am unclear with what exactly the random effect portion of the Stata mixed command is doing.
The fixed portion of the command is looking at an interaction between the experimental condition and which period of data collection they were in (T1, T2, T3, T4).
The random portion is including participant id and allows the slope for period to change across each respondent.
Code:
mixed y condition##period || id:period, vce(cluster id) cov(unstructured)
I want to adjust for this issue, but I <think> that this is being addressed by identifying id in the 'id:' portion of the command. Is this correct?
Thanks!
David.
Comment