SPSS Textbook Examples
Experimental Design by Roger Kirk
Chapter 5: Completely Randomized Design
This shows how to get the results of Chapter 5 using SPSS. Below is how to read the
first data file used in this chapter.
data list free / y a order.
begin data.
4 1 1
6 1 2
3 1 3
3 1 4
1 1 5
3 1 6
2 1 7
2 1 8
4 2 1
5 2 2
4 2 3
3 2 4
2 2 5
3 2 6
4 2 7
3 2 8
5 3 1
6 3 2
5 3 3
4 3 4
3 3 5
4 3 6
3 3 7
4 3 8
3 4 1
5 4 2
6 4 3
5 4 4
6 4 5
7 4 6
8 4 7
10 4 8
end data.
Table 5-2.1, part iii.
means tables=y by a.
Case Processing Summary
|
Cases |
| Included |
Excluded |
Total |
| N |
Percent |
N |
Percent |
N |
Percent |
| Y A |
32 |
100.0% |
0 |
.0% |
32 |
100.0% |
Report
Y
| A |
Mean |
N |
Std. Deviation |
| 1.00 |
3.0000 |
8 |
1.5119 |
| 2.00 |
3.5000 |
8 |
.9258 |
| 3.00 |
4.2500 |
8 |
1.0351 |
| 4.00 |
6.2500 |
8 |
2.1213 |
| Total |
4.2500 |
32 |
1.8837 |
Table 5.3-2, ANOVA table.
ONEWAY y BY a.
ANOVA
Y
|
Sum of Squares |
df |
Mean Square |
F |
Sig. |
| Between Groups |
49.000 |
3 |
16.333 |
7.497 |
.001 |
| Within Groups |
61.000 |
28 |
2.179 |
|
|
| Total |
110.000 |
31 |
|
|
|
Top of page 173, t-tests for three contrasts.
ONEWAY y BY a
/CONTRAST 1 -1 0 0
/CONTRAST 0 0 1 -1
/CONTRAST 1 1 -1 -1.
ANOVA
Y
|
Sum of Squares |
df |
Mean Square |
F |
Sig. |
| Between Groups |
49.000 |
3 |
16.333 |
7.497 |
.001 |
| Within Groups |
61.000 |
28 |
2.179 |
|
|
| Total |
110.000 |
31 |
|
|
|
Contrast Coefficients
|
A |
| Contrast |
1.00 |
2.00 |
3.00 |
4.00 |
| 1 |
1 |
-1 |
0 |
0 |
| 2 |
0 |
0 |
1 |
-1 |
| 3 |
1 |
1 |
-1 |
-1 |
Contrast Tests
|
Contrast |
Value of Contrast |
Std. Error |
t |
df |
Sig. (2-tailed) |
| Y |
Assume equal variances |
1 |
-.5000 |
.7380 |
-.678 |
28 |
.504 |
| 2 |
-2.0000 |
.7380 |
-2.710 |
28 |
.011 |
| 3 |
-4.0000 |
1.0437 |
-3.833 |
28 |
.001 |
| Does not assume equal variances |
1 |
-.5000 |
.6268 |
-.798 |
11.603 |
.441 |
| 2 |
-2.0000 |
.8345 |
-2.397 |
10.155 |
.037 |
| 3 |
-4.0000 |
1.0437 |
-3.833 |
19.431 |
.001 |
Table 5.4-1, Kirk illustrates all pairwise comparisons
using fisher hayter test. SPSS does not have this test, but
the most similar test is a "Tukey" test, which you can get
with the commands below. This does produce a table
like 5-4.1, but you would need to compute the "critical difference"
by hand using the formula on page 174.
ONEWAY y BY a
/POSTHOC = TUKEY ALPHA(.05).
ANOVA
Y
|
Sum of Squares |
df |
Mean Square |
F |
Sig. |
| Between Groups |
49.000 |
3 |
16.333 |
7.497 |
.001 |
| Within Groups |
61.000 |
28 |
2.179 |
|
|
| Total |
110.000 |
31 |
|
|
|
Multiple Comparisons
Dependent Variable: Y
Tukey HSD
|
Mean Difference (I-J) |
Std. Error |
Sig. |
95% Confidence Interval |
| (I) A |
(J) A |
Lower Bound |
Upper Bound |
| 1.00 |
2.00 |
-.5000 |
.7380 |
.905 |
-2.5150 |
1.5150 |
| 3.00 |
-1.2500 |
.7380 |
.346 |
-3.2650 |
.7650 |
| 4.00 |
-3.2500(*) |
.7380 |
.001 |
-5.2650 |
-1.2350 |
| 2.00 |
1.00 |
.5000 |
.7380 |
.905 |
-1.5150 |
2.5150 |
| 3.00 |
-.7500 |
.7380 |
.741 |
-2.7650 |
1.2650 |
| 4.00 |
-2.7500(*) |
.7380 |
.005 |
-4.7650 |
-.7350 |
| 3.00 |
1.00 |
1.2500 |
.7380 |
.346 |
-.7650 |
3.2650 |
| 2.00 |
.7500 |
.7380 |
.741 |
-1.2650 |
2.7650 |
| 4.00 |
-2.0000 |
.7380 |
.052 |
-4.0150 |
1.499E-02 |
| 4.00 |
1.00 |
3.2500(*) |
.7380 |
.001 |
1.2350 |
5.2650 |
| 2.00 |
2.7500(*) |
.7380 |
.005 |
.7350 |
4.7650 |
| 3.00 |
2.0000 |
.7380 |
.052 |
-1.4986E-02 |
4.0150 |
| The mean difference is significant at the .05 level.
|
Y
Tukey HSD
|
N |
Subset for alpha = .05 |
| A |
1 |
2 |
| 1.00 |
8 |
3.0000 |
|
| 2.00 |
8 |
3.5000 |
|
| 3.00 |
8 |
4.2500 |
4.2500 |
| 4.00 |
8 |
|
6.2500 |
| Sig. |
|
.346 |
.052 |
| Means for groups in homogeneous subsets are displayed. |
| a Uses Harmonic Mean Sample Size = 8.000.
|
On the middle of page 175, Kirk illustrates how to do
a Scheffe test. We can compute FS as illustrated by
Kirk as shown below. This gives a "t" value of -2.766, and
we can square that value to get the "FS" value of 7.651
You would need to compute the critical value of "FS" as
shown on page 175 of Kirk by hand.
ONEWAY y BY a
/CONTRAST= 3 -1 -1 -1.
ANOVA
Y
|
Sum of Squares |
df |
Mean Square |
F |
Sig. |
| Between Groups |
49.000 |
3 |
16.333 |
7.497 |
.001 |
| Within Groups |
61.000 |
28 |
2.179 |
|
|
| Total |
110.000 |
31 |
|
|
|
Contrast Coefficients
|
A |
| Contrast |
1.00 |
2.00 |
3.00 |
4.00 |
| 1 |
3 |
-1 |
-1 |
-1 |
Contrast Tests
|
Contrast |
Value of Contrast |
Std. Error |
t |
df |
Sig. (2-tailed) |
| Y |
Assume equal variances |
1 |
-5.0000 |
1.8077 |
-2.766 |
28 |
.010 |
| Does not assume equal variances |
1 |
-5.0000 |
1.8371 |
-2.722 |
11.459 |
.019 |
Section 5.5, pages 177-182. The only measure of
strength of effect that SPSS automatically computes is
eta squared (page 180) as illustrated below. For other measures
of strength of effect or effect size, you will need to compute these
as described by Kirk.
UNIANOVA y BY a
/PRINT = ETASQ.
Between-Subjects Factors
|
N |
| A |
1.00 |
8 |
| 2.00 |
8 |
| 3.00 |
8 |
| 4.00 |
8 |
Tests of Between-Subjects Effects
Dependent Variable: Y
| Source |
Type III Sum of Squares |
df |
Mean Square |
F |
Sig. |
Eta Squared |
| Corrected Model |
49.000(a) |
3 |
16.333 |
7.497 |
.001 |
.445 |
| Intercept |
578.000 |
1 |
578.000 |
265.311 |
.000 |
.905 |
| A |
49.000 |
3 |
16.333 |
7.497 |
.001 |
.445 |
| Error |
61.000 |
28 |
2.179 |
|
|
|
| Total |
688.000 |
32 |
|
|
|
|
| Corrected Total |
110.000 |
31 |
|
|
|
|
| a R Squared = .445 (Adjusted R Squared = .386)
|
In Table 5.7-2, page 194 Kirk shows how to test for linear
trend, and departure for linear trend. This can be done in SPSS
as shown below. The test of linear trend is shown by
"Linear Term, Contrast" and the departure from linearity is
shown right below labeled "Deviation". This also shows the
tests shown in table 5.7-3 for the test of "quadratic" and "cubic"
trend, and is summarized in Table 5.7-4, page 196.
ONEWAY y BY a
/POLYNOMIAL= 3.
ANOVA
Y
|
Sum of Squares |
df |
Mean Square |
F |
Sig. |
| Between Groups |
(Combined) |
49.000 |
3 |
16.333 |
7.497 |
.001 |
| Linear Term |
Contrast |
44.100 |
1 |
44.100 |
20.243 |
.000 |
| Deviation |
4.900 |
2 |
2.450 |
1.125 |
.339 |
| Quadratic Term |
Contrast |
4.500 |
1 |
4.500 |
2.066 |
.162 |
| Deviation |
.400 |
1 |
.400 |
.184 |
.672 |
| Cubic Term |
Contrast |
.400 |
1 |
.400 |
.184 |
.672 |
| Within Groups |
61.000 |
28 |
2.179 |
|
|
| Total |
110.000 |
31 |
|
|
|
Figure 5.7-3, page 199.
skipped for now.
Table 5.7-6 shows how to test for departure from linearity.
This can be done using the previous table, inspecting the
"Linear Term, Deviation" to get F=1.125.
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services
The content of this web site should not be
construed as an endorsement of any particular web site, book, or software
product by the University of California