CJ 605 – SP 06 2/2/06 Lab and assignment for 2/9/06 – MODIFIED 2/3/06 FOLLOWING THE 2/2 CLASS – PLEASE READ COMPLETELY

 

HOW THIS HAS CHANGED SINCE WHAT WAS HANDED OUT IN CLASS 2/2

  1. I direct you to specific outcomes to examine
  2. I ask you to compare these results to what you have from an SPSS aggregation procedure
  3. I ask you to complete this assignment using HLM STUDENT, which is on your disk and you can install on your home computers since THAT is the correct version.
  4. I detail more closely exactly what I am asking you to write up.
  5. I direct you to the portion of the output of interest
  6. You can go ahead and use the MDM file provided on disk; you do not need to create your own for this assignment. Of course, at some point you will want more experience with that.
  7. NOTE ON DUE DATE: if you can get this done, or at least struggle with this for next class, 2/9, that would be good. I would like you to hand this in by 2/9 but there will be NO penalty for handing it in on 2/16 instead. Of course there may (depending) be an additional assignment also due on 2/16.

 

ASSIGNMENT: In the short version, you use an existing multivariate data matrix (MDM) file to complete an HLM ANOVA run – this is a run where there are no predictors. In the long version, you also create an MDM file from L1 and L2 PAS 2003  Philadelphia data files on your CD

 

GOALS:

1) become familiar with basic data processing in hlm – constructing and checking MDM files, specifying your model;

2) Practice interpreting the basic output from an HLM ANOVA run, and think about that conceptually.

 

WHAT TO WRITE UP: In text (not list format) report: what is your outcome; what items is it made up of; what does a higher score mean; what is its total variance (FROM SPSS of LEVEL 1 file); what is its ecological variance (FROM LEVEL 2 SPSS FILE); what is the level 2 [HERE LEVEL 2 MEANS NEIGHBORHOOD LEVEL] variance reported by hlm, how does that differ from the level 2 SPSS variance,  what is the intraclass correlation;  and what does this intraclass correlation tell you about how scores on this variable are distributed within and between neighborhoods in Philadelphia with the PAS sample? (DO NOT worry about chi square test. ALL OF THIS IN NO MORE THAN ONE PAGE TYPED DOUBLE SPACED

 



 

STEPS

  1. Put in your CD
    1. At home – install HLM student
  2. Start HLM – it is under statistical applications
  3. CLICK FILE

 

SKIP DOWN FOR THE PURPOSES OF TODAY’S LAB EXERCISE AND USE AN EXISTING MDM FILE – YOU WILL FIND IT ON YOUR CD IN DATA

  1. CLICK MAKE NEW MDM FILE
  2. CLICK STAT PACKAGE INPUT
  3. CLICK OK when it says it will make an HLM2 file – that means a plain old 2-level HLM file
  4. You are going to need to fill in lots of things here
    1. Accept the NESTING default
    2. Under LEVEL 1 SPECIFICATION CLICK BROWSE
    3. Mouse your way to where your level 1 file is located. After you click on it you go back to make MDM page and now you should see your file name
    4. CLICK CHOOSE VARIABLES and then start putting them in. Be sure you put PHMC_NBH as the ID variable. DON’T FORGET THE WEIGHT VARIABLE PHILYWT
    5. Be sure to tell it the file has missing data
    6. Tell it to delete missing data when running analyses
    7. CLICK BROWSE to go find your Level 2 file
    8. Then add variables. Don’t forget ID.
    9. In top right box MDM FILE NAME put in a name for the data matrix it will create. Be sure to add .mdm. Like 20060202.mdm. BE SURE TO TELL IT TO PUT IT ON SOME PLACE YOU CAN TAKE HOME. E.g., you type

G:\20060202.mdm

    1. Save MDMT file –put it on a drive you can write to – always make saving the template the last thing you do
    2. CLICK MAKE MDM
    3. CLICK CHECK STATS – look at these carefully and save to file
    4. Peek in windows explorer and see if your mdm file is where it should be
    5. CLICK DONE

 

FOR PURPOSE OF TODAY’S EXERCISE START HERE USING EXISTING MDM

  1. BACK IN HLM MAIN WINDOW CLICK FILE
  2. CLICK CREATE A NEW MODEL USING AN EXISTING MDM FILE
  3. Point it to where your file is and click. Your L1 variables should come up in the window on the left. Notice how you can toggle back and forth between L1 and L2 variables. Be sure you have L1 variables highlighted
  4. The first on you click on it will assume is your OUTCOME. Notice how the basic ANOVA equation comes up. PLEASE USE ONE OF THE FOLLOWING AS YOUR OUTCOME
    1. MCONF_CJ
    2. MPOL_DEM
    3. MPOL_ATT
    4. MPOL_EFF
  5. CLICK BASIC SETTINGS
    1. Tell it about the shape of your outcome – all of these are NORMAL.
    2. Change title
    3. Change output file name – be sure to end this is .OUT – and be sure to put it somewhere you can take it home
    4. Ditto for graph name
    5. CLICK LEVEL-2 RESIDUAL FILE – give it a name and a place, and add other L2 variables if you want
    6. CLICK OK when all is set
  6. CLICK OTHER SETTINGS
  7. CLICK ESTIMATION SETTINGS
  8. CLICK WEIGHTING
  9. Under Level-1 Weight highlight PHILLYWT
  10. CLICK OK TWICE
  11. CLICK FILE
  12. CLICK SAVE AS
  13. You are now saving your command file – it should have an extension .hlm. Put it where you can find it
  14. CLICK RUN ANALYSIS – if you see a lot of iterations going by it means you have either something with little between neighborhood variance, or smeththing else screwy
  15. CLICK FILE
  16. CLICK VIEW OUTPUT

 

The portion of the output you are particularly interested in is toward the end and looks like this:

 

Final estimation of variance components:

 -----------------------------------------------------------------------------

 Random Effect           Standard      Variance     df    Chi-square  P-value

                         Deviation     Component

 -----------------------------------------------------------------------------

 INTRCPT1,       U0        0.22133       0.04899    44      75.61103    0.002

  level-1,       R         0.74838       0.56007

 -----------------------------------------------------------------------------

 

Look under the column VARIANCE COMPONENT. The first number you see (.04899) is HLM’S ADJUSTED (we will explain how later) Level 2 variance estimate for this variable. The second number (.56007) is Level 1 variance. These are NUMBERS NOT PERCENTAGES.

 

To compute the intraclass correlation (see Raudenbush and Bryk p 36, 71) compute

 

L2 variance / (L2 variance + L1 variance)

 

Does the L2 variance here look difference from the variance for the item you would get from SPSS descriptive statistics of your level 2 file?