Residuals - matching

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
cazlo
Posts: 19
Joined: Mon May 23, 2011 6:20 pm

Residuals - matching

Post by cazlo »

Hi,

I am trying to extract the residuals from a cross-classified model I have estimated and match them back to their original LEA code, so I can draw a map of the residuals. I start by sorting the data by the classification from which I want to derive the residuals from. I then unreplicate the data, so that it goes back to its original (short) length. I then generate the residuals. My question is, how do I know when I 'view' the residuals alongside the LEAs, that the correct residuals are matched to the correct LEAs?

Many thanks,

Caroline.
ChrisCharlton
Posts: 1376
Joined: Mon Oct 19, 2009 10:34 am

Re: Residuals - matching

Post by ChrisCharlton »

For cross-classified models the residual number should correspond to the sorted ID numbers for that classification, i.e. if your classification is in column c1 and you wanted a short version in c2 to match the residual ordering then the command:

Code: Select all

UNIQ c1 c2
should give you a short ID column in the correct order.
cazlo
Posts: 19
Joined: Mon May 23, 2011 6:20 pm

Re: Residuals - matching

Post by cazlo »

Great stuff. Thanks, Chris.
harrybro
Posts: 1
Joined: Thu Oct 25, 2012 5:01 am

Re: Residuals - matching

Post by harrybro »

I then unreplicate the data, so that it goes back to its original (short) length. I then generate the residuals.
Post Reply