Three Way Nonhierarchical Log Linear Analysis

advertisement
Three-Way Nonhierarchical Log-Linear Analysis: Escalators and Obesity
Hierarchical analyses are the norm when one is doing multidimensional log-linear
analyses. The backwards elimination tests of significance are available because each
reduced model is nested within the next more complex model. With nonhierarchical
analysis one can exclude lower-order effects that are contained within retained
higher-order effects. One might wish to evaluate two nonhierarchical models when one
is not nested within the other. One cannot test the significance of the difference
between two such nonhierarchical models, but one can assess the adequacy of fit of
each such model.
The Data and the Program
We shall use data which I captured from the article "Stairs, Escalators, and
Obesity," by Meyers et al. (Behavior Modification 4: 355-359). A copy of the article is
available within BlackBoard. The (nonhierarchical) LOGLINEAR procedure is not
available by point and click in SPSS, you must use syntax. Since I needed to issue the
loglinear command by syntax, I also issued the rest of the commands by syntax. The
syntax file is ESCALATE.SPS on my SPSS Programs page, and the data file is
ESCALATE.SAV on my SPSS Data page. Download both. After downloading, doubleclick on the syntax file and PASW will boot and the syntax file will be displayed in the
syntax editor.
You will need to edit the File statement so that it points to the correct location of
the data file on your computer. Run the syntax file to produce the output. I exported
the output to a rtf document, edited it, and then converted it to a pdf document. You
can obtain the pdf document at http://core.ecu.edu/psyc/wuenschk/MV/LogLin/Log3NSPSS-Output.pdf.
An Initial Run with the Hiloglinear Procedure
Look at the program. With Hiloglinear I asked that the tests of partial
associations and the parameter estimates be listed. I did not ask for the frequencies or
residuals. Look at the output. The three-way interaction is significant. When the
highest-order effect is significant, one may attempt to eliminate one or more of the
Log3N.doc
2
lower-order effects while retaining the higher-order effect. The partial chi-squares may
suggest which effects to try deleting, and one can try deleting any effect which does not
have at least one highly significant .
For our data, every partial chi-square is significant, but the Weight x Device
effect has a relatively small 2, so I'll try removing it. Looking at the parameter
estimates, Weight x Device (neither parameter is significant) and Direct (not significant
at .01) appear to be candidates for removal.
Building a Reduced Model with the Loglinear Procedure
I used Loglinear to test two models, one with Weight x Device removed and one
with Direct removed. In both cases the goodness-of-fit chi-square was significant,
meaning that the reduced models do not fit the data well. This is in part due to the
great power we have with large sample sizes. We can look at the residuals to see
where the fit is poor. For the model with Weight x Device removed, none of the
standardized residuals is very large (> 2), but three are large enough to warrant
inspection (> 1). The model predicted that:

15.45 Obese folks would be observed Ascending Stairs, but only 10 were;

19.45 Obese folks would be observed Descending Stairs, but only 14 were; and

72.04 folks of normal weight would be observed Ascending Stairs, but 82 were.
For the model with Direct removed, the residuals are generally small, but two
cells have residuals worthy of some attention. For the Obese, the model predicted that:

14.3 would be observed Ascending Stairs, only 10 were, and

9.7 would be observed Descending Stairs, but 14 were.
Comparing Nested Models
When we have two models that are nested, with Model A being a subset of
Model B, with all of the effects in Model A also in Model B, then we can test the
significance of the difference between those two models. The difference 2 will equal
the Model A goodness-of-fit 2 minus the Model B goodness-of-fit 2, with df equal to
the difference between the two models' df. We do have two such pairs, the full model
versus that with Weight x Device removed and the full model versus that with Direct
removed. Since the full model always has 2 = 0 and df = 0, the difference chi-squares
are the reduced model chi-squares, and they are significant.
The Triple Interaction
Now we shall try to explain the triple interaction by looking at "simple two-way"
interactions at each level of the third variable. I decided to look at the Weight x Device
interaction at each level of Direction, but could have just as well looked at Weight x
Direction at each level of Device or Device x Direction at each level of Weight.
Look at the tables produced by the first Crosstabs command. I reproduce here
the row percentages for the Stairs column.
Percentage Using Stairs Within Each Weight x Direction Combination
3
Direction
Weight
Ascending
Descending
Obese
4.7
14.7
Overweight
3.9
27.8
Normal
7.6
23.1
The Direction x Device interaction is obvious here, with many more people using
the stairs going down than going up. Were we inspecting Direction x Device at each
level of Weight, we would do three 2 x 2 Direction x Device analyses, each determining
whether the rate of stairway use was significantly higher when descending than when
ascending for a given weight category. For example, among the obese, is 14.7%
significantly different from 4.7%? I decided to look at Weight x Device interaction at
each level of Direction. Crosstabs gave us the LR 2 for Weight x Device at each
direction, and they are both significant.
Breaking Up Each 3 x 2 Interaction Into Three 2 x 2 Interactions
To understand each 3 x 2 (Weight x Device) interaction better, I broke each into
three 2 x 2 interactions. If you will look at the program, you will see that I changed
WEIGHT(1,3) to WEIGHT(1,2) to get the comparison between the Obese (level 1) and
the Overweight (level 2). When ascending, they do not differ significantly on
percentage using the stairs, but when descending they do, with the overweight using
the stairs more often than do the obese.
The Obese versus Normal comparisons both fall short of significance, but just
barely. Note, in the program, how I used the TEMPORARY and the MISSING VALUES
commands to construct these comparisons. I declared the value 2 to be a missing
value for the weight variable, so when I indicated WEIGHT(1,3), the comparison was
only between weight group 1 and weight group 2. The TEMPORARY command made
this declaration of missing value status valid for only one procedure.
For Overweight versus Normal, the normal weight folks are significantly more
likely to use the stairs than are the overweight when ascending, but when descending
the overweight persons use the stairs more than do the normal weight persons, with the
difference not quite reaching statistical significance.
4
Percentage Use of Staircase Rather than Escalator Among Three Weight Groups
30
25
20
Ascending
Descending
15
10
5
0
Obese
Overweight
Normal
In summary, people use the stairs much less than the escalator, especially when
going up. The overweight are the least likely to use the stairs when going up, but the
most likely to use the stairs when going down. Perhaps these people know they have a
weight problem, know they need exercise, so they resolve to use the stairs more often,
but using them going up is just asking too much.
Karl L. Wuensch
Dept. of Psychology
East Carolina University
Greenville, NC 27858
November, 2009

SAS code to do the Model 1 analysis

How to get people to use the stairs -- http://www.youtube.com/watch?v=2lXh2n0aPyw

Return to Wuensch’s Statistics Lessons Page
Download