I am running a multilevel mixed model (meologit) for an ordered categorical variable (placement = low, med, high). I have interaction terms in the fixed part of the model and want to see if these vary across the level 2 units (schools) in the model. Running random slopes is computationally difficult and time consuming, so I created dummies for the main effect random slopes with the following code:
where rural is one category of the 4 category urbanicity variable (rural, urban, suburban, town). This ran fine (and much faster!). I am really on running this to get a rough idea of what the random slopes would look like, and am really only interested in the variation across the level 2 units for selected groups only. So I feek that the single dummy makes sense in this context. But I interested in seeing if the slopes vary for one part of the rural group (as specified by the 3 category test_result_lag variable).
So I guess I have two questions:
1) Am I specifying the the random slope for rural properly? Again, the alternative - putting ib(4).urbanicity after school_id takes forever to run.
2) How can I create an interaction term for a random slope? The interaction term in the fixed part of the model is:
I hope I have expressed my problem clearly. I would appreciate any suggestions.
Code:
meologit placement ib(8).race i.test_result_lag ib(8).race i.frl i.gen pctblhis frl0 enroll0 ib(4).urbanicity i.year, ||school_id: rural, covariance (unstructured) or
So I guess I have two questions:
1) Am I specifying the the random slope for rural properly? Again, the alternative - putting ib(4).urbanicity after school_id takes forever to run.
2) How can I create an interaction term for a random slope? The interaction term in the fixed part of the model is:
Code:
meologit placement ib(8).race i.test_result_lag##ib(4).urbanicity i.frl i.gen pctblhis frl0 enroll0 i.year, ||school_id:, or

Comment