+ 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

    Posts
    12
    Thanks
    0
    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:

    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.

  2. #2
    Omega Contributor
    Points: 39,128, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,085
    Thanks
    402
    Thanked 1,194 Times in 1,155 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