Page 1 of 1

Order of Predicted Residuals with Multiple Random Slopes

Posted: Wed Dec 02, 2020 8:30 pm
by erikruzek
Hi Chris, George, and everyone,

When running a model with multiple random slopes and getting the Empirical Bayes predictions, is there a way to tell how the newly produced residual variables map onto the intercept and slopes?

I am running the following model:

Code: Select all

runmlwin RIT time time2, level3(first_school: cons time time2) ///
level2(student: cons time time2, residuals(uc)) level1(obs: cons) nopause
Once MLwiN finishes running, I get six new variables corresponding to the residuals - uc0, uc1, and uc2. I assumed uc0 would be the intercept but it clearly is not given the range of values whereas it looks like uc2 gives the EB predictions for the intercept (cons). Is there a systematic way that MLwiN assigns the the variable names for residuals when transferring them to Stata?

Thanks,
Erik

Re: Order of Predicted Residuals with Multiple Random Slopes

Posted: Thu Dec 03, 2020 1:13 pm
by ChrisCharlton
These should be the order that the parameters appear in the model equation. You can see this by removing the nopause option so that this is displayed prior to fitting the model. This ordering will usually match the order in which runmlwin processes the variables, so in your case as you do not have cons in the fixed part this should be time, time2, cons.

Re: Order of Predicted Residuals with Multiple Random Slopes

Posted: Thu Dec 03, 2020 2:58 pm
by erikruzek
Thanks, Chris. That makes sense. I can see why I was confused - I did not mean to exclude the intercept from the fixed part of the model! Had I included it there, then uc0 would have been the random intercept.