STARTING UP HLM - THE DIFFERENT PIECES

WHAT YOU NEED TO GET STARTED:
- Level 1 data file, sorted by your grouping variable (also called ID variable)
- Level 2 data file, sorted similarly

WHAT YOU WILL CREATE
- SSM file (sufficient statistics matrix)
- Response file
- Statistics about the SSM

The level 1 data file
* sorted by ID variable
* ID variable must be alphanumeric
* not allowed any missing data when we get to the generalized model for dichotomous or poisson-distributed outcomes; if you have missing data now you want deletion to be pairwise rather than listwise
* may or may not have a weighting variable
* format: SPSS or SYSTAT; if you are working with the student version of HLM your file must be in SYSTAT format ALREADY before you start your work at home. The program TRANSYS available on the department computers makes those translations for you (see below on making the translation)
* what it will do when there is no variance on a variable that is being used to construct the SSM at Level I. If you have a Level 1 variable where there is no variance within one or more of your groups (i.e., a neighborhood where all residents are white), you need to decide how to deal with that. Your options are:
   - drop the variable
   - randomly change at least 2 cases within the group
We will talk about the pros and cons of each

The level 2 data file
* sorted by ID variable
* need all of the Level 1 ID variables represented
* ID variable must be alphanumeric
* in Level 1 and Level 2 file the n of columns and column format must be identical for ID variable. I guarantee this will hang you up when you are creating your own files so pay attention here.

The location of the files
Although it does not matter now, when we get to the nonlinear models (also called generalized HLM), HLM will want to go back and read the individual level data file. Therefore it is essential that you always keep the original Level 1 file from which you created your SSM, and your SSM file, in exactly the same directories where they were originally created. This will save you a lot of grief and wasted time later on.

Doing it

Start up HLM. Go to SSM, go to FILE, go to NEW and you are off and running.
What needs to be specified:
- name and location of Level 1 file
- click on specific variables to be included
- one will be an ID variable
- name and location of Level 2 file
- click on specific variables to be included
- one will be an ID variable
- name of SSM file (*.ssm)
- name of response file (*.rsp)

What you will create

- you will create a sufficient statistics matrix (SSM) that has all the information you need for the linear models (binary file - you can translate it to ascii in the dos version of the program if you need to look at it)

- you will create some statistics about the SSM file (HLM2ssm.sts). This is an extremely important file and you need to look at it to be sure your number of cases are ok and your descriptive information for your variables makes sense. (ascii file)

- a response file (response.rsp) - this is just the command file HLM generated to do your work. You must name this and save it before creating the SSM.

On the file I have uploaded (99250215.ssm) I have included the STS file. Here it is:

Fi=hlm2ssm.sts

  LEVEL-1 DESCRIPTIVE STATISTICS

 

 VARIABLE NAME N MEAN SD MINIMUM MAXIMUM

  V3 402 2.49 1.20 1.00 9.00

  V4 402 1.12 0.81 0.00 5.00

  V5 402 3.30 1.08 1.00 4.00

  V6 402 2.54 1.04 1.00 5.00

  V21 386 1.70 0.81 1.00 3.00

  V22 392 1.80 0.81 1.00 3.00

  V23 357 2.36 0.79 1.00 3.00

  V27 347 1.81 0.81 1.00 3.00

  V28 336 1.76 0.81 1.00 3.00

  V29 375 1.80 0.40 1.00 2.00

  V33 397 2.71 1.12 1.00 4.00

  V48 379 1.70 0.46 1.00 2.00

  V56 360 2.10 0.86 1.00 3.00

  V57 353 2.20 0.81 1.00 3.00

  V58 359 1.58 0.76 1.00 3.00

  V59 355 1.94 0.82 1.00 3.00

  V60 377 1.83 0.79 1.00 3.00

  V61 362 1.90 0.80 1.00 3.00

  V62 400 41.78 18.19 18.00 97.00

  V63 401 2.88 1.22 1.00 5.00

  V78 330 2.35 0.82 1.00 3.00

  V82 318 2.40 0.81 1.00 3.00

  V86 370 1.51 0.74 1.00 3.00

  V98 363 2.93 0.32 1.00 3.00

  V160 359 1.78 0.42 1.00 2.00

  V167 401 1.58 0.49 1.00 2.00

  V168 402 1.84 0.84 1.00 4.00

  V169 401 1.13 0.37 1.00 3.00

  V170 401 1.20 0.45 1.00 3.00

  RPTDRU 402 0.00 0.93 -1.88 0.85

  RPTDRUPL 402 0.00 0.80 -1.49 1.27

  ZRPTDRU 402 0.00 1.00 -2.03 0.92

  ZRPTDRUP 402 0.00 1.00 -1.86 1.58

  FEMALE 401 0.58 0.49 0.00 1.00

  AFRICAM 402 0.44 0.50 0.00 1.00

  HISPANIC 402 0.30 0.46 0.00 1.00

  ORIENTAL 402 0.01 0.09 0.00 1.00

  DCOMPROB 402 0.00 0.69 -1.60 1.09

  DMUNI 402 -0.01 0.65 -1.52 1.75

  DSOCIAL 402 0.01 0.77 -1.48 2.36

  DDRUGAC 383 0.04 0.87 -1.25 1.53

  DPOLCOM 392 0.00 0.84 -1.12 1.54

  DCOMMORG 402 0.00 2.26 -0.91 25.91

  LEVEL-2 DESCRIPTIVE STATISTICS

 VARIABLE NAME N MEAN SD MINIMUM MAXIMUM

  NEWARK 8 0.25 0.46 0.00 1.00

  ELPASO 8 0.25 0.46 0.00 1.00

  CHICAGO 8 0.25 0.46 0.00 1.00

  AVRPTDRU 8 0.00 0.32 -0.62 0.36

  AVRPTPL 8 0.00 0.27 -0.48 0.28

  AVCOMORG 8 0.00 0.37 -0.56 0.54

  AVCMPROB 8 0.00 0.29 -0.54 0.35

  AVDRUACT 8 0.04 0.26 -0.44 0.47

  AVMUNI 8 -0.01 0.15 -0.22 0.15

  AVPOLCOM 8 0.01 0.32 -0.35 0.54

  AVSOCIAL 8 0.01 0.23 -0.25 0.36

  PCTFEMAL 8 0.58 0.09 0.42 0.66

  PCTHISP 8 0.30 0.41 0.00 0.98

  PCTAFRAM 8 0.44 0.41 0.00 1.00

  AVAGE 8 41.77 2.43 38.58 46.57

  AVEDU 8 2.88 0.42 2.06 3.42