I am doing a logistic regression analysis. My outcome is mathematics achievemnet (0 is fail and 1 is pass). I am using as predictors, type of school, size of school and area (rural or urban).
I first ran it in a single level in R (using log likelihood), then I switched to MLwiN to do multilevel analysis. Level 1 is students and level 2 are schools.
When I fit that model all the signs of my predictors go the other way in comparison to my level fitted in R (go from plus to minus). My reference categories are the following: small schools, public school, rural area schools.
When I calculate the residuals the schools that achieve the most have a positive logit and the underachievers a negative. So the problem is not codification of the outcome variable.
Can somebody help me explain what could be happening? I know that MLwiN uses quasi likelihood to calculate this and that it can be biased when there is a small amount of units in level 2 (not the case i have more than a thousand schools). I have to admit that the response rate is to the left were the proportion of people failing is much bigger than the ones passing. Could that be the problem? Any suggestions to solve this?
Thanks a lot!