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
- I direct you to specific outcomes to examine
- I ask you to compare these results to what you
have from an SPSS aggregation procedure
- 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.
- I detail more closely exactly what I am asking you
to write up.
- I direct you to the portion of the output of
interest
- 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.
- 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
- Put in your CD
- At home – install HLM student
- Start HLM – it is under statistical applications
- 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
- CLICK MAKE NEW MDM FILE
- CLICK STAT PACKAGE INPUT
- CLICK OK when it says it will make an HLM2 file – that
means a plain old 2-level HLM file
- You are going to need to fill in lots of things here
- Accept the NESTING default
- Under LEVEL 1 SPECIFICATION CLICK BROWSE
- 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
- 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
- Be sure to tell it the file has missing data
- Tell it to delete missing data when running
analyses
- CLICK BROWSE to go find your Level 2 file
- Then add variables. Don’t forget ID.
- 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
- Save MDMT file –put it on a drive you can write to
– always make saving the template the last thing you do
- CLICK MAKE MDM
- CLICK CHECK STATS – look at these carefully and
save to file
- Peek in windows explorer and see if your mdm file
is where it should be
- CLICK DONE
FOR PURPOSE OF TODAY’S EXERCISE START HERE USING EXISTING
MDM
- BACK IN HLM MAIN WINDOW CLICK FILE
- CLICK CREATE A NEW MODEL USING AN EXISTING MDM FILE
- 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
- 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
- MCONF_CJ
- MPOL_DEM
- MPOL_ATT
- MPOL_EFF
- CLICK BASIC SETTINGS
- Tell it about the shape of your outcome – all of
these are NORMAL.
- Change title
- Change output file name – be sure to end this is
.OUT – and be sure to put it somewhere you can take it home
- Ditto for graph name
- CLICK LEVEL-2 RESIDUAL FILE – give it a name and a
place, and add other L2 variables if you want
- CLICK OK when all is set
- CLICK OTHER SETTINGS
- CLICK ESTIMATION SETTINGS
- CLICK WEIGHTING
- Under Level-1 Weight highlight PHILLYWT
- CLICK OK TWICE
- CLICK FILE
- CLICK SAVE AS
- You are now saving your command file – it should have
an extension .hlm. Put it where you can find it
- 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
- CLICK FILE
- 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?