1

2

Making the MDM file.
For any given set ofvariables, you only need todo this once.
But if you need to add avariable, you will need torepeat the process.
HLM cannot transformvariables (e.g., a square of avariable), so if you need atransformed variable in youranalysis, it must be includedin the set of variables read
into HLM.

3

ASCII Input is a text file. Stat Package Input is easier.
With the student version, use SPSS .sav files. With theregular version Excel files can be read.

4

5As far as I can tell, selecting measures within
persons just changes the notation in the GUI.

More on missing data at
the end of the handout.

6

7Clicking Browse opens a WINDOWS dialog Box

8

9

10

This is a fragment of the level-1
file that will be read into HLM.
I included it so you can see
what the file looks. It would notbe displayed in the process ofcreating the mdm file.
The variable named ID a school(level-2 unit). It need not becalled ID.
Note that the file is sorted by ID.

11

12

13

14

15

16

`

17

This is a fragment of the level-2 filethat will be read into HLM.
I included it so you can see what thefile looks. It would not be displayed in
the process of creating the mdm file.
The variable named ID is a school(level-2 unit). It need not be called ID.

Note that the file is sorted by ID andincludes the mean of SES.

18

19

20

21

22

Clicking Save mdmt file opens a WINDOWS dialog Box

23

24

25

26

This screen is displayed for a few seconds.

27

28

These results should be compared with the descriptivestatistics produced by SPSS from the files you read intoHLM. If there is not agreement, something may have gonewrong in reading the data.
This a Notepad file. You may want to save this file under a
new name for future reference.

29

30

The >> << indicates that the level-1
variables are showing. After selecting level1 variables for the model, clicking level-2
displays the level-2 variables

31

32

33

This operation isoptional

34

35

This operation isoptional

36

37

38

Produces a Windows dialog box
to save your program.

39

40

This box will flash by indicating the program is running. After it runs click
file and view output

41

42

Creating a new model froman old mdm file

43

44

45

You can create a newmodel

46

Running an oldmodel or revising
an old model

47

You can re-run orrevise the existingmodel.

48

You can edit an existing file. This can be useful if you work on
different machines and the drive labels vary across themachines.
However if the drive labels change across machines, the GUI
will give you error messages and you can change the labels
through the GUI.

49

50

This is an example of the GUI whenpersons-within-measures isselected. See page 5
Note the change in the notation.
Compare to page 33.

51
How HLM handles Missing Data

HLM2 handles missing data at level-1 of the hierarchy as follows:
Observations with missing data will be deleted using listwise deletion at either
the MDM creation stage or when the analysis is run.

The Make MDM dialog box for 2-level (HLM2) allows the chooser to two
between these options.

•If deletion at the MDM creation stage is chosen, listwise deletion isperformed based on the level-1 variables selected for inclusion in theMDM file. Listwise deletion means that if there were any missing
scores in a row of the SPSS level-1 file on the variables selected

52inclusion in the MDM file, that row of data will be deleted when theMDM file is created.
•If deletion at the analysis stage is chosen, listwise deletion isperformed based on the variables included in the actual model to berun. Listwise deletion means that if there were any missing scores in arow of the SPSS level-1 file on the variables selected inclusion in theanalysis, that row of data will be deleted when the analysis isconducted.

Clearly deletion at the analysis stage is the better option.

Failure to acknowledge missing data.

If you have missing data but do not select yes, you get this message

Missing data found at level-1, unable to continue.

Non-matching Levl-1 and Level-2 Files

If you have cases in the level-1file for which there is not a matching ID in thelevel-2 file, the ids without the match will be deleted and the deleted ids willbe identified in the file that is displayed when you click check stats:Group52 not in level-2 file.

Group173 not in level-2 file.

Group180 not in level-2 file.

53
If you have cases in the level-2 file for which there is not matching ID in thelevel-1, the ids without the match will be deleted but there is no listing of theids that are deleted.