+ Reply to Thread
Results 1 to 2 of 2

Thread: Hierarchical Linear Modeling (HLM) Explanation

  1. #1
    Points: 150, Level: 2
    Level completed: 50%, Points required for next Level: 50

    Thanked 0 Times in 0 Posts

    Hierarchical Linear Modeling (HLM) Explanation

    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:

    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;
    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.

  2. #2
    Omega Contributor
    Points: 39,173, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Not Ames, IA
    Thanked 1,196 Times in 1,157 Posts

    Re: Hierarchical Linear Modeling (HLM) Explanation

    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.
    Stop cowardice, ban guns!

+ Reply to Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Advertise on Talk Stats