Hello, I am dealing with a mixed model using long format data. Basically I have a variable _j which indicates the wave of the data and it has five numeric values (1-5). Then I have this two sets of measurement: one measurement is only measured at wave 1 and 2 and the other one was only measured at wave 3 and wave 4. Now I need to set up a mixed model predicting wave 3 and 4 performance based on a set of predictors and I want to include wave 1 and 2 measurement results as control variables. Please see below:
But STATA gives me an error said no observations, which make sense because outcome is only available when _j = 3 or 4 but baseline is only available when _j = 1 or 2. How should I deal with this kind of issue? Is there a way for me to add the baseline in the model? Thanks a lot!
Code:
mixed outcome AGEYEAR FEMALE baseline || DistrictID:, || ChildID: AGEYEAR, mle var pweight(PCT5LWGT0)
Comment