Hello,
I have panel household survey data that is a longitudinal study of individuals, so an unbalanced panel by design. Individuals observed in the baseline households were tracked over 3 rounds, following any that moved out to another household and adding any individuals that joined baseline households or new households baseline individuals were found in later rounds. As such, the individuals are not constant within households or primary sampling units (administrative) over time and are also not constant within the survey round since new individuals enter the sample in the second and third round. All variables in my model are at a household level, but the standard errors are assumed to be clustered at the individual level.

I want to estimate a linear mixed effects model but am struggling to find the appropriate way to do so in Stata. Ideally I would use xtreg, but it doesn't allow for survey weights. I am trying to use the mixed model instead. Theoretically, the levels would be individual, household, administrative unit, survey round, but since the individuals are not constant within those higher levels, I am getting errors. Can anyone help me figure out how to specify the mixed model appropriately? Here is the starting point I have tried, where the individual identifier is PID, the unique household identifier is case_id(but PID is not constant within case_id), the survey round is data_round (but not all individuals are present in all rounds), survey weights are pweight and are at the household level (constant within case_id per survey round). Some household and market level fixed effects are included to address potential endogeneity and then the empirical model is that there are random effects at the person and household level so the appropriate clustering of standard errors should be at the person-household level, I think, but would appreciate feedback with respect to that as well. Here is what I have initially tried, that produces an error that "highest-level groups are not nested within pid_caseid".

Code:
    egen pid_caseid=group(PID case_id)
    xi: mixed Y X1 X2 X3 i.X4 HHFixedEffects' [pw=pweight] || data_round:, vce(cluster pid_caseid)
Thank you very much,
Kate