We conducted a study and the results submitted to a journal and one of the reviewers suggested me to conduct a hierarchical logistic regression. Basically I know how to conduct multilevel regression analysis (based on Ronald H. Heck book: Multilevel Modeling of Categorical Outcomes). Briefly our aim was to analyse the relationship between explanatory variables (e.g. age, gender, socioeconomic status) and health behaviour among children’s (e.g. smoking). We have got data from only one school, but from three classrooms. We also analysed the differences between classrooms (classroom was an explanatory variable).
The reviewers problems was the students are nested into classrooms, and he suggested to conduct a mixed model where the hierarchic nature of the data is considered.
My problem is: I don’t know how to specify the model (mixed model) correctly. I have got only one variable which specify and measured on the second level (classroom ID: A, B and C), but I need to use this variable also as an explanatory variable. To the best of my knowledge I can’t use (I familiar with Stata and SPSS) the classroom variable as a level identifier (or a random effect, which classify the hierarchic nature of the data) and a fixed variable (explanatory variable) in the same time.
If we had several classes and the qualifications of the teachers were different, then the hierarchical model would make sense because I specify the classes as a level ID (random effect variable) and I can use the teachers qualifications as a 2nd level explanatory variable (fixed effect). Am I right? Or the model can be defined with this variables to? Thank you very much for the suggestions.
$\begingroup$
$\endgroup$
2
-
$\begingroup$ With only three classes I would just use it as a fixed effect. $\endgroup$– mdeweyCommented Apr 13, 2021 at 16:01
-
$\begingroup$ I agree with mdewey. A random effect is useful with a lot of levels because having 10 different binary variables is unrealistic. But with only three levels, a fixed effect only takes two binaries. Definitely don't do both though! If you're reviewer is being difficult and you can't find a good citation to refute this, I'd whip up a quick simulation study to show why a fixed effect is a better choice. I recall seeing something to this effect is Faraway' "Extending the linear model with R" if you're willing to search for it. $\endgroup$– Tanner PhillipsCommented Apr 13, 2021 at 16:38
Add a comment
|