Hierarchical Linear Modeling (HLM) Explanation

Weibull

New Member
I sought help actually doing an HLM a few weeks ago and found the assistance very helpful. Now, I'm curious about more of the actual meaning of certain parts of the model, specifically relating to the RANDOM statement.

Let me just use a hypothetical example I've seen in a few examples online. Let's say there's data about test scores. We have student level data (their pre-test score, age, sex) and classroom level data (size of classroom, number years teacher has taught, classroom ID). Let's just say we are only focused on 1 school to ignore any school effect for now.

So I might write SAS code like:

Code:
proc mixed data=school;
class sex(ref='F') classroom_ID;

model post_test = pre_test age sex experience class_size;

random intercept experience class_size / subject=classroom_ID;
run;
Can someone provide some layman's explanation as to what exactly is happening with the RANDOM statement? Is it just that a different slope is being created for each classroom and it also accounts for the classroom level effects? Or is there more to it?

I think part of my confusion is that the resulting output only shows one intercept effect so I'm not sure how to interpret the multiple intercepts thing.

Any assistance is much appreciated.

hlsmith

Omega Contributor
Yes, your description is correct. The above code gives you the random effects (slopes) along with random intercepts for classroom IDs. Though, you are also correct that the output only provides you with one intercept, which happens to be the base case intercept, so for when variables are set to "0". I get this is confusing. I imagine there is an option to get the other intercept values.