Dear all,
imagine this scenario: we have multilevel data where students are nested within schools. The outcome is a binary one, that indicates whether a student has failed the test or not. I would like to measure whether schools differ in their average success rates. However, I would like to adjust for factors, such as student composition or student IQ so the comparison of schools is "fair". My basic model looks like this:
Now I would like to compute the average and adjusted failure rate by school. One way is potentially like this:
However, the resulting BLUP is a normally distributed score with mean 0. Is there a way to transform this into a share between 0 and 1? Or is there a better way to do this?
EDIT:
As an alternative, what about
imagine this scenario: we have multilevel data where students are nested within schools. The outcome is a binary one, that indicates whether a student has failed the test or not. I would like to measure whether schools differ in their average success rates. However, I would like to adjust for factors, such as student composition or student IQ so the comparison of schools is "fair". My basic model looks like this:
Code:
melogit fail $controls || schoolid:
Code:
predict adrate, reffects
EDIT:
As an alternative, what about
Code:
predict pred, mu collapse pred, by(schoolid)
Comment