The classical case for Multi-Level Models are data domains where each 'individual' belongs to some group, like pupils to school classes. In such a case, the individuals are distributed into disjoint buckets like this:
---------------------------------------------
| Class1 | Class2 | Class3 | Class4 |
---------------------------------------------
I need a way to extend that concept to a domain where multiple categorical variables are present, like pupils that belong to classes and gender:
| Class1 | Class2 | Class3 | Class4 |
-------------------------------------------------------
Female | 0.71 | 0.42 | 0.67 | 0.65 |
-------------------------------------------------------
Male | 0.75 | 0.44 | 0.82 | ? (*) |
-------------------------------------------------------
Here, every pupil belongs to one 'gender bucket', as well as one 'school class bucket'.
I need that to predict missing values based on the known data. In the example above, we can see that the performance of the male pupils is slightly above the performance of the females (for example in Maths). The performance of class 4 is about average, and it's very similar to class 3, so we expect the missing value for the males in class 4 to be about 0.75
.
The model should be able to recognize such patterns, like the general performance difference between males and females, as well as the performance difference between the school classes. The prediction should be based on these differences.
Is there a generalization of Multi-Level Models for such a case? Or maybe some other tool?
To be clear: I need a model with much more than two categorical variables, and I don't know which of those variables are more important than others.
EDIT: To make it clear, I don't want to generalize among any of these categories. I'm not interested in any aggregated value (total performance of all females, or total performance of class 4). I'm interested in predicting the performance of the males in class 4. Both my sex
and class
variables are fixed effects. Maybe this question doesn't have anything to do with MLMs.