1One Between-Subjects Factor: Pairwise Comparisons
An educational psychologist investigated two study strategies: highlighting andsummarization. The materials in the experiment consisted of three versions of a 15-page
passage on operant conditioning. In the first key words and concepts werehighlighted in the text. In the second summarizations were provided at the end of threemajor sections in the passage. The third version was the original unmodified passage.
Subjects were randomly assigned to treatments. The criterion variable was scores on a30-item test. The psychologist is interested in comparing mean performance formembers of each pair of treatments. In the data the unmodified passage was coded TMT= 1, the highlighted passage TMT = 2 and the remaining passage TMT = 3.
The design is a between-subjects design with one factor. Input the data for thistype of design:2
Conduct a one-way between-subjects ANOVA. At the top of the out put your willfind the following SPSS syntax:
GET
FILE='G:\6481\spss\mcomp.1bet\pc1bet.sav'.
DATASET NAME DataSet2 WINDOW=FRONT.
UNIANOVATEST BY TMT/METHOD = SSTYPE(3)/INTERCEPT = INCLUDE/PRINT = DESCRIPTIVE/CRITERIA = ALPHA(.05)/DESIGN = TMT .

Double click in the text. Then highlight the text that begins with UNIANOVA and ends
with a period and copy the text. Then with the SPSS Data Editor displayed, click
File → New → Syntax to open the following window:

3
Paste the copied text into the window:

Put the curser in front of the period and make press Enter twice:4Type the following code after /DESIGN = TMT/LMATRIX =/LMATRIX =/LMATRIX =“U vs. H” TMT 1 -1 0
“U vs. S” TMT 1 0 -1
“H vs. S” TMT 0 1 -1

The text in the parentheses is a label for the printout. Typing TMT signals that you are
defining a contrast for the treatment means. The code 1 -1
compare the first and second treatments. The code 1
compare the first and third treatments. The code 00 in the first line says to0 -1 in the second line says to1 -1 in the third line says tocompare the second and third treatments. Here is what the widow should be:5Once the code is typed correctly go to the output and delete it because the newprogram will duplicate the output of the original program. If you wish you can save thesyntax so you can reuse it. To run the program, click Run → All. The results to test thecontrasts are labeled Custom Hypothesis Tests. Here is an example:

6

Custom Hypothesis Tests #1
Contrast Results (K Matrix)(a)Dependent
Variable
Contrast
L1

TEST-3.133Contrast Estimate
Hypothesized Value0

Difference (Estimate - Hypothesized)-3.133

Std. Error

1.212

Sig.

.013

95% Confidence Interval
for Difference

Lower Bound-5.580

Upper Bound-.687

a Based on the user-specified contrast coefficients (L') matrix: U vs. H

Test Results
Dependent Variable: TESTSource
ContrastError

Sum ofSquares
73.633462.933

df142

Mean Square
73.63311.022

F
6.680

Sig.
.013

L1 refers to the first LMATRIX command:/LMATRIX =“U vs. H” TMT 1 -10

This command generates a test comparing unmodified (TMT =1) highlighted (TMT =2).
To calculate the t statistic to test the null hypothesis of no linear trend, divide the estimate
by the standard error:t=−3.133= −2.58.
1.212

Alternatively, you can calculate t as the square root of F: t = 6.680 = 2.58.
Here are the results produced by the syntax:
UNIANOVATEST BY TMT/METHOD = SSTYPE(3)/INTERCEPT = INCLUDE

7/PRINT = DESCRIPTIVE/CRITERIA = ALPHA(.05)/DESIGN = TMT/LMATRIX = "U vs. H" TMT 1 -1 0/LMATRIX = "U vs. S" TMT 1 0 -1
/LMATRIX = "H vs. S" TMT 0 1 -1

Univariate Analysis of Variance[DataSet3]

Between-Subjects Factors
NTMT123151515Descriptive Statistics
Dependent Variable: TEST
TMT
123Total

Mean19.40
22.53
24.40
22.11

Std. Deviation
3.542
3.314
3.089
3.857

N15151545

Tests of Between-Subjects Effects
Dependent Variable: TEST
SourceCorrected Model
Intercept
TMT
Error
Total
Corrected Total

Type III Sumof Squares
191.511a
22000.556
191.511462.933
22655.000
654.444df
212424544

Mean Square
95.75622000.556
95.75611.022a. R Squared = .293 (Adjusted R Squared = .259)

F8.687
1996.018
8.687

Sig.
.001
.000.001

8

Custom Hypothesis Tests Index
1

Contrast Coefficients(L' Matrix)

Transformation
Coefficients (M Matrix)
Contrast Results (KMatrix)
Contrast Coefficients(L' Matrix)

2

Transformation
Coefficients (M Matrix)
Contrast Results (KMatrix)
Contrast Coefficients(L' Matrix)

3

Transformation
Coefficients (M Matrix)
Contrast Results (KMatrix)

LMATRIX
Subcommand 1:
U vs. H
Identity
MatrixZero
MatrixLMATRIX
Subcommand 2:
U vs. S
Identity
MatrixZero
MatrixLMATRIX
Subcommand 3:
H vs. S
Identity
MatrixZeroMatrix

Custom Hypothesis Tests #1
Contrast Results (K Matrix)aContrast
L1

Contrast Estimate
Hypothesized Value
Difference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference

Lower Bound
Upper Bound

Dependent
Variable
TEST-3.133
0-3.133
1.212.013-5.580-.687

a. Based on the user-specified contrast coefficients (L') matrix: U vs.
H

9

Test Results
Dependent Variable: TEST
SourceContrast
Error

Sum ofSquares
73.633462.933

df142

Mean Square
73.63311.022

F6.680

Sig.
.013

Custom Hypothesis Tests #2
Contrast Results (K Matrix)aContrast
L1

Contrast Estimate
Hypothesized Value
Difference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference

Dependent
Variable
TEST-5.000
0-5.000
1.212.000-7.446-2.554Lower Bound
Upper Bounda.
Based on the user-specified contrast coefficients (L') matrix: U vs. S

Test Results
Dependent Variable: TEST
SourceContrast
Error

Sum ofSquares
187.500
462.933

df142

Mean Square187.500
11.022Custom Hypothesis Tests #3F17.011

Sig.
.000

10

Contrast Results (K Matrix)a

Contrast
L1

Contrast Estimate
Hypothesized ValueDifference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference

Dependent
Variable
TEST-1.867
0-1.8671.212.131-4.313.580

Lower Bound
Upper Bounda.
Based on the user-specified contrast coefficients (L') matrix: H vs. S

Test Results
Dependent Variable: TEST
SourceContrastError.

Sum ofSquares
26.133462.933

df142

Mean Square
26.13311.022F2.371Sig.
.131

11One Between-Subjects Factor: Orthogonal Polynomial Analysis
Subjects are randomly assigned to practice a psychomotor task for one to sixtrials. Following completion of the practice trials, the subjects complete a criterion trial
on the task. For each number of practice trials, criterion trial data are available for foursubjects. The independent variable is the number of trials. The dependent variable is an
accuracy score on the criterion trial. Higher scores indicate greater accuracy.
The design is a between-subjects design with one factor. Input the data for thistype of design:12
Follow the directions for the pairwise comparisons. Here is what the first syntax
widow will look likeType the following code after /DESIGN = TRIALS/LMATRIX = “linear”
TRIALS -5 -3 -1 1 3/LMATRIX = “quadratic” TRIALS 5 -1 -4 -4 -1/LMATRIX = “cubic”
TRIALS -5 7
4 -4 -7/LMATRIX = “quartic” TRIALS 1 -3 2 2 -3
/LMATRIX = “quintic” TRIALS -1 5 -10 10 -555511

13Once the code is typed correctly go to the output and delete because the new program
will duplicate the output of the original program. If you wish you can save the syntax soyou can reuse it. To run the program, click Run → All. The results to test the contrasts
are labeled Custom Hypothesis Tests. Here is an example

Custom Hypothesis Tests #1

14

Contrast Results (K Matrix)aContrast
L1

Dependent
Variable
ACCURACY-286.750
0Contrast Estimate
Hypothesized Value
Difference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference-286.750
42.183.000-375.373-198.127

Lower Bound
Upper Bounda. Based on the user-specified contrast coefficients (L') matrix: linear
Test Results
Dependent Variable: ACCURACY
SourceContrastError

Sum ofSquares
4698.604
1830.250

df
118

Mean Square
4698.604
101.681

F46.209

Sig.
.000

L1 refers to the first LMATRIX command:/LMATRIX = “linear”

TRIALS -5 -3-1

1

3

5

This command generates a test of the linear trend. To calculate the t statistic to test thenull hypothesis of no linear trend, divide the estimate by the standard error:
t=−286.750= −6.80.
42.183

Alternatively you can calculate t = 46.208 = 6.80.
Here are the results produced by the syntax:

Univariate Analysis of Variance15

Between-Subjects Factors
NTRIALS

123456444444

Descriptive Statistics
Dependent Variable: ACCURACY
TRIALS
123456Total

Mean
97.75
64.50
60.25
53.50
52.00
49.25
62.88

Std. Deviation
8.770
4.655
16.82012.1796.976
5.620
18.997

N44444424

Tests of Between-Subjects Effects
Dependent Variable: ACCURACY
SourceCorrected Model
Intercept
TRIALS
Error
Total
Corrected Total

Type III Sum
of Squares
6470.375a
94878.375
6470.375
1830.250
103179.000
8300.625

df515182423

Mean Square
1294.075
94878.375
1294.075
101.681a. R Squared = .780 (Adjusted R Squared = .718)

F
12.727933.10212.727Sig.
.000.000.000

16Custom Hypothesis Tests Index
12

3

4

5

Contrast Coefficients(L' Matrix)

Transformation
Coefficients (M Matrix)
Contrast Results (KMatrix)
Contrast Coefficients(L' Matrix)

Transformation
Coefficients (M Matrix)
Contrast Results (KMatrix)
Contrast Coefficients(L' Matrix)

Transformation
Coefficients (M Matrix)
Contrast Results (KMatrix)
Contrast Coefficients(L' Matrix)

TransformationCoefficients (M Matrix)
Contrast Results (KMatrix)
Contrast Coefficients(L' Matrix)

Transformation
Coefficients (M Matrix)
Contrast Results (KMatrix)

Custom Hypothesis Tests #1

LMATRIX
Subcommand 1:linearIdentity
MatrixZero
MatrixLMATRIX
Subcommand 2:
quadratic
Identity
MatrixZero
MatrixLMATRIX
Subcommand 3:
cubic
Identity
MatrixZero
MatrixLMATRIX
Subcommand 4:quartic
Identity
MatrixZero
MatrixLMATRIX
Subcommand 5:quintic
Identity
MatrixZero
Matrix17

Contrast Results (K Matrix)aContrast
L1

Contrast EstimateHypothesized Value
Difference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference

Dependent
Variable
ACCURACY-286.750
0-286.750
42.183.000-375.373-198.127

Lower Bound
Upper Bounda. Based on the user-specified contrast coefficients (L') matrix: linear

Test Results
Dependent Variable: ACCURACY
SourceContrast
Error

Sum ofSquares
4698.604
1830.250

df1
18

Mean Square
4698.604
101.681F
46.209Sig.
.000

Custom Hypothesis Tests #2
Contrast Results (K Matrix)aContrast
L1

Contrast EstimateHypothesized Value
Difference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference

Dependent
Variable
ACCURACY
163.500
0Lower Bound
Upper Bounda. Based on the user-specified contrast coefficients (L') matrix:
quadratic

163.500
46.209.002
66.418260.582

18

Test Results
Dependent Variable: ACCURACY
SourceContrast
Error

Sum ofSquares
1272.964
1830.250

df
1
18

Mean Square
1272.964
101.681F
12.519Sig.
.002

Custom Hypothesis Tests #3
Contrast Results (K Matrix)aContrast
L1

Contrast EstimateHypothesized Value
Difference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference

Dependent
Variable
ACCURACY-128.000
0-128.000
67.643.075-270.113
14.113Lower Bound
Upper Bounda. Based on the user-specified contrast coefficients (L') matrix: cubic

Test Results
Dependent Variable: ACCURACY
SourceContrast
Error

Sum ofSquares
364.089
1830.250

df
1
18

Mean Square
364.089101.681

Custom Hypothesis Tests #4

F
3.581

Sig.
.075

19

Contrast Results (K Matrix)aContrast
L1

Contrast EstimateHypothesized Value
Difference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference

Dependent
Variable
ACCURACY
25.000025.000
26.679.361-31.050
81.050Lower Bound
Upper Bounda. Based on the user-specified contrast coefficients (L') matrix: quartic

Test Results
Dependent Variable: ACCURACY
SourceContrast
Error

Sum ofSquares
89.286
1830.250

df
118

Mean Square
89.286
101.681

F.878

Sig.
.361

Custom Hypothesis Tests #5
Contrast Results (K Matrix)aContrast
L1Contrast Estimate
Hypothesized ValueDifference (Estimate - Hypothesized)
Std. Error
Sig.
95% Confidence Interval
for Difference

Lower Bound
Upper Bound

Dependent
Variable
ACCURACY-53.500
0-53.500
80.037.512-221.651
114.651

a. Based on the user-specified contrast coefficients (L') matrix: quintic

20

Test Results
Dependent Variable: ACCURACY
SourceContrastError.

Sum ofSquares
45.4331830.250

df
118

Mean Square
45.433101.681

F.447

Sig.
.512