2
$\begingroup$

I am considering the use of mixed models for an analysis of mine, but I may have a concern. Let's take an example from Wikipedia for introducing my question:

Suppose $m$ large elementary schools are chosen randomly from among thousands in a large country. Suppose also that $n$ pupils of the same age are chosen randomly at each selected school. Their scores on a standard aptitude test are ascertained. Let $Y_{ij}$ be the score of the $j$th pupil at the $i$th school.

With this in mind, consider $$Y_{ij} = \mu + \beta_1 \mathrm{Sex}_{ij} + U_i + W_{ij} \enspace ,$$ where $\mu$ is the average test score for the entire population, $\mathrm{Sex}_{ij}$ is the dummy variable for boys/girls, $U_i$ is the school-specific random effect, and $W_{ij}$ is the individual-specific random effect.

My question is: What if there are schools with only boys? Are they excluded from the analysis? Is the school-specific random effect 0 in those cases?

$\endgroup$

1 Answer 1

1
$\begingroup$

What if there are schools with only boys? Are they excluded from the analysis? Is the school-specific random effect 0 in those cases?

No, each school will still have it's own intercept. Although a school may be single sex, this does not mean that there is no variablility of the outcome for that school. The random intercepts capture the extent to which responses from one school are more similar to responses in the same school, than other schools.

You might want to introduce a new variable that indicates whether a school is mixed, single sex etc.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.