Dear Statalisters,
I am trying to extract group level means after using the mixed command.
Let me be more explicit: suppose there is a cross-sectional dataset constructed from a well-executed survey of pupils (10,000 observations) attending various schools (400 schools) in multiple counties (150 counties). That data has a three-level structure. Let's assume that my variable of interest is average_height. I could estimate the average height of pupils in each county, while taking into account the survey structure by estimating the following equation (assume that sampling_probability is the probability that a given pupil has been sampled for the survey):
How can I extract the estimated average heights for each of the 150 counties? I am looking to obtain 150 averages, one for the average height of the pupils attending schools in each of the 150 counties.
Thank you!
I am trying to extract group level means after using the mixed command.
Let me be more explicit: suppose there is a cross-sectional dataset constructed from a well-executed survey of pupils (10,000 observations) attending various schools (400 schools) in multiple counties (150 counties). That data has a three-level structure. Let's assume that my variable of interest is average_height. I could estimate the average height of pupils in each county, while taking into account the survey structure by estimating the following equation (assume that sampling_probability is the probability that a given pupil has been sampled for the survey):
Code:
mixed average_height [pweight=1/sampling_probability] || county: || school:, mle
Thank you!
Comment