Factorial ANOVA in SPSS - Denver, Colorado · Factorial ANOVA in SPSS In the dataset to be used for...
Transcript of Factorial ANOVA in SPSS - Denver, Colorado · Factorial ANOVA in SPSS In the dataset to be used for...
Factorial ANOVA in SPSS
In the dataset to be used for this example, there are two N-level variables (“treatment”
and “problem”) for each person—“treatment” has two levels (CBT [cognitive-behavioral
therapy] vs. IPT [interpersonal psychotherapy]), and “problem” has three levels (anxiety
disorder vs. depression vs. eating disorder). Each person (row in the table) has one type
of diagnosis, and receives one treatment. Then each person also has a “symptom” score,
indicating their level of symptom severity after treatment (so this is your outcome
variable, to see if the treatment was effective—lower scores on “symptom” mean the
treatment helped). The goal of this two-way ANOVA is to determine whether people who
receive different treatments have different outcomes, and whether the type of diagnosis
that the person is being treated for moderates the effect of treatment types on symptom
levels. (In other words, the question is whether there’s an interaction between treatment
type and problem type, in terms of these two variables’ effects on symptom levels).
To do this analysis, we start (as usual) from the “Analyze” menu. One way to get a basic
F-test is to use the “Compare Means” command, but there’s another way to do it: select
“General Linear Model,” and then select “Univariate.” (A “univariate” ANOVA has one
dependent variable—that’s true in this case, where the only dependent variable is
“symptom” level). For this example (as well as ANCOVA, MANOVA, and other
procedures) it’s necessary to use the “General Linear Model” instead of the “Compare
Means/ANOVA” command. This is because it’s a more generalized procedure.
The dialog window asks you to select your independent and dependent variables. There
are two N-level predictors as independent variables—they go in the “Fixed Factors” box
(this term refers to any N-level predictor in an ANOVA procedure). Then your criterion
variable—“symptom”—goes in the DV spot:
Hit the “Model” button to continue.
The “model” dialog box gives you a chance to customize the list of predictors that you
want to test out. The default model is a “full factorial” model, which means that SPSS
will test all of the possible main effects, and also all of the possible interactions among
the fixed factors you selected in the previous step. If you leave the “full factorial” setting
in place for this example, you’ll get exactly the same result as I do by customizing the
model. However, I’m going to do the customization, to show you exactly what we’re
testing for.
To set up a custom model, I select the predictors that I’m interested in from the list on the
left, select the type of test that I want to run from the drop-down menu in the middle of
the screen, and then use the arrow to move the predictors to the right-hand list. First, I
select “main effects” from the drop-down menu, and use the arrow to create a “main
effect” test for each individual predictor’s effect on the criterion variable. Next, I select
“interaction” from the drop-down menu. This time, I have to select both variables that I
want an interaction for, and use the arrow with both of these predictors selected. This
gives me the interaction term, which looks like this: “treatment*problem”.
When you’ve duplicated what I have shown above (or if you just left the “full factorial”
default setting in place), click “Continue” to go on.
Note: For now, leave this other drop down menu set to “Type III”
sums of squares. Next week we’ll change this setting, and look at
the difference between “Type I” and “Type III” sums of squares,
when we start to work with ANCOVA (analysis of covariance).
Back in the main dialog box for univariate ANOVA, click on the “Plots” button to see
this dialog box:
This dialog allows you to generate the type of line graph that we saw in the lecture notes.
One of the predictor variables goes on the horizontal axis of the graph, and the other is
used to define separate lines (refer to lecture notes for an example of the line graphs that
show main effects and interaction effects). Let’s put “treatment” on the horizontal axis,
and use “problem” as the variable to define three separate lines on the graph. The y-axis
of the graph will automatically be the dependent variable (“symptom”).
Click “Continue” to go on.
Once you have put the variables into the correct
boxes in the dialog, you have to hit the “Add”
button, and get the graph to show on this list, in
order for it to appear on your output.
Back in the main dialog window, click on “Options” to see this sub-dialog:
This window lets you get various types of descriptive statistics. First, select the variables
you want summary statistics on from the left-hand list, and use the arrow to move them to
the right-hand list. Then use the check boxes down below to select the types of summary
statistics you want to see. Let’s get “descriptive statistics” and also the “observed power”
for each statistical test.
Click “Continue” to go on. Then, back in the main dialog box, we’re ready to see the
results, so click “OK” in the main window for this analysis.
Here are some highlights of the output:
This table (“Tests of Between-Subjects Effects”) gives you the results of the F-tests for the two main effects and the interaction. Tests of Between-Subjects Effects Dependent Variable: Symptom Severity (higher = worse)
Source Type III Sum of
Squares
df Mean Square
F Sig. Noncent. Parameter
Observed Power
Corrected Model
238.938 5 47.788 23.894 .000 119.469 1.000
Intercept 9642.857 1 9642.857 4821.429 .000 4821.429 1.000TREATMNT 61.714 1 61.714 30.857 .000 30.857 .999
PROBLEM 77.169 2 38.585 19.292 .000 38.585 .998TREATMNT *
PROBLEM71.631 2 35.815 17.908 .000 35.815 .997
Error 20.000 10 2.000Total 10209.000 16
Corrected Total
258.938 15
a Computed using alpha = .05 b R Squared = .923 (Adjusted R Squared = .884)
p-value for the first main effect (effect of “treatment” type on symptom levels)
p-value for the second main effect (effect of “problem” type on symptom levels)
p-value for the interaction of the two predictors (effect of the 6 possible combinations of
“treatment” type and “problem” type on symptom levels)
As before, “Error” is the within-groups sum of squares (it’s the same for all three F-tests
reported in this table). “Corrected Total” is the total sum of squares (equal to the SS for
each of the three variables tested—the two main effects and the interaction—plus the
Error SS).
Finally, notice this R-squared value. This tells you the “total percentage of variability in
the criterion variable that can be accounted for by all three predictors together.” It’s a
“total” R2 because it’s measuring the effect of all of the predictors together (the two main
effects and the interaction) on the dependent variable.
These are the
power for each
test, shown
here because of
the “option”
we selected in
the analysis
The next three tables that you see give the different averages, standard deviations, etc. for
each sub-group. Here’s the example of averages by diagnosis:
2. Patient Diagnosis Dependent Variable: Symptom Severity (higher = worse)
Mean Std. Error 95% Confidence Interval
Patient Diagnosis
Lower Bound Upper Bound
Anx 23.000 .645 21.562 24.438Depr 24.000 .645 22.562 25.438
Eating 28.000 .577 26.714 29.286
Finally, here’s the graph that we selected using the “Plots” command:
Estimated Marginal Means of Symptom Severity (higher = worse)
Type of Therapy
IPTCBT
Estim
ate
d M
arg
inal M
eans
34
32
30
28
26
24
22
20
18
Patient Diagnosis
Anx
Depr
Eating
You can see the “X” pattern created by the lines—it means there’s a significant
interaction. Similarly, the difference in height between the blue and red lines shows a
significant main effect for “diagnosis,” and the upward slope of the lines shows a
significant main effect for “treatment.” Depression is the oddball diagnosis, where IPT
has a better effect than CBT. With the other dx groups, CBT has better results.
Patients with eating
disorders still had higher
levels of symptom severity
after treatment