Sample SPSS Programs



One-factor ANOVA  TO TOP 
  • This program reads data from within the program in free format.
set width=80. 
data list list 
  /y group. 
begin data 
16 1 
18 1 
10 1 
12 1 
19 1 
4 2 
6 2 
8 2 
10 2 
2 2 
2 3 
10 3 
9 3 
13 3 
11 3 
end data. 
manova y by group (1,3). 
 

For HP-UX 10.0          Arizona State University                SPSS ID 198670 

   1  0  set width=80. 
   2  data list list 
   3    /y group. 
   4  begin data 
  19  end data. 

Preceding task required .02 seconds CPU time;  .38 seconds elapsed. 

  20  manova y by group (1,3). 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
The default error term in MANOVA has been changed from WITHIN CELLS to 
WITHIN+RESIDUAL.  Note that these are the same for all full factorial 
designs. 
13 Oct 98 SPSS for Unix, Release 6.1 (HP9000 xxx )                        Page 2 
11:54:26  Arizona State University       HP 9000          HP-UX 10.0 

* * * * * * A n a l y s i s   o f   V a r i a n c e * * * * * * 
 

        15 cases accepted. 
         0 cases rejected because of out-of-range factor values. 
         0 cases rejected because of missing data. 
         3 non-empty cells. 

         1 design will be processed. 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
13 Oct 98 SPSS for Unix, Release 6.1 (HP9000 xxx )                        Page 3 
11:54:27  Arizona State University       HP 9000          HP-UX 10.0 

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * * 

 Tests of Significance for Y using UNIQUE sums of squares 
 Source of Variation          SS      DF        MS         F  Sig of F 

 WITHIN CELLS             170.00      12     14.17 
 GROUP                    210.00       2    105.00      7.41      .008 

 (Model)                  210.00       2    105.00      7.41      .008 
 (Total)                  380.00      14     27.14 

 R-Squared =           .553 
 Adjusted R-Squared =  .478 



One-factor ANOVA with contrasts TO TOP 
  • This program reads data from the file 'kep1.dat' in fixed format.
  • In SPSS, each contrast subcommand must contain a vector of ones (one for each group) and a-1 contrasts.
set width=80. 
title 'one factor with contrasts'. 
data list file='kep1.dat' 
   /y 1-2 group 4. 
manova y by group (1,3) 
    /contrast (group) = special (1 1 1, 1 -1 0, 0 1 -1) 
    /design=group(1) group(2) 
    /contrast (group) = special (1 1 1, -1 -1 2, 1 0 -1) 
    /design=group(1) group(2). 

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * * 
 Tests of Significance for Y using UNIQUE sums of squares 
 Source of Variation          SS      DF        MS         F  Sig of F 

 WITHIN+RESIDUAL          170.00      12     14.17 
 GROUP(1)                 202.50       1    202.50     14.29      .003 
 GROUP(2)                  22.50       1     22.50      1.59      .232 

 (Model)                  210.00       2    105.00      7.41      .008 
 (Total)                  380.00      14     27.14 

 R-Squared =           .553 
 Adjusted R-Squared =  .478 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Estimates for Y --- Individual univariate .9500 confidence intervals 
 GROUP(1) 
  Parameter     Coeff.  Std. Err.    t-Value     Sig. t Lower -95%  CL- Upper 

        2   9.00000000    2.38048    3.78076     .00262    3.81339   14.18661 

 GROUP(2) 
  Parameter     Coeff.  Std. Err.    t-Value     Sig. t Lower -95%  CL- Upper 

        3   -3.0000000    2.38048   -1.26025     .23153   -8.18661    2.18661 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   2 * * * * * * 
 Tests of Significance for Y using UNIQUE sums of squares 
 Source of Variation          SS      DF        MS         F  Sig of F 

 WITHIN+RESIDUAL          170.00      12     14.17 
 GROUP(1)                   7.50       1      7.50       .53      .481 
 GROUP(2)                  90.00       1     90.00      6.35      .027 

 (Model)                  210.00       2    105.00      7.41      .008 
 (Total)                  380.00      14     27.14 

 R-Squared =           .553 
 Adjusted R-Squared =  .478 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Estimates for Y --- Individual univariate .9500 confidence intervals 
 GROUP(1) 
  Parameter     Coeff.  Std. Err.    t-Value     Sig. t Lower -95%  CL- Upper 

        2   -3.0000000    4.12311    -.72761     .48081  -11.98348    5.98348 

 GROUP(2) 
  Parameter     Coeff.  Std. Err.    t-Value     Sig. t Lower -95%  CL- Upper 

        3   6.00000000    2.38048    2.52050     .02688     .81339   11.18661 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 


One-factor ANOVA with correction for alpha inflation TO TOP 

  • This program reads data from the file 'kep1.dat' in fixed format.
  • Note that the correction for experimentwise error in SPSS must be done using the oneway command.
set width=80. 
title 'Corrections for experimentwise error'. 
data list file='kep1.dat' 
  /y 1-2 group 4. 
oneway y by group (1,3) 
  /ranges=scheffe 
  /ranges=tukey 
  /ranges=lsd. 

30 Sep 98 Corrections for experimentwise error                            Page 2 
10:19:56  Arizona State University       HP 9000          HP-UX 10.0 
 

                       - - - - -  O N E W A Y  - - - - - 
 

      Variable  Y 
   By Variable  GROUP 

                                  Analysis of Variance 
 

                                  Sum of         Mean             F      F 
        Source           D.F.    Squares       Squares          Ratio  Prob. 

Between Groups             2      210.0000      105.0000       7.4118  .0080 
Within Groups             12      170.0000       14.1667 
Total                     14      380.0000 
      - - - - -  O N E W A Y  - - - - - 
      Variable  Y 
   By Variable  GROUP 

Multiple Range Tests:  Scheffe test with significance level .05 

The difference between two means is significant if 
  MEAN(J)-MEAN(I)  >= 2.6615 * RANGE * SQRT(1/N(I) + 1/N(J)) 
  with the following value(s) for RANGE: 3.94 

   (*) Indicates significant differences which are shown in the lower triangle 
                          G G G 
                          r r r 
                          p p p 

                          2 3 1 
     Mean      GROUP 

     6.0000    Grp 2 
     9.0000    Grp 3 
    15.0000    Grp 1      * 

 Homogeneous Subsets (highest and lowest means are not significantly different) 

Subset 1 
Group       Grp 2         Grp 3 
Mean        6.0000        9.0000 
- - - - - - - - - - - - - - - - - 

Subset 2 
Group       Grp 3         Grp 1 
Mean        9.0000       15.0000 
- - - - - - - - - - - - - - - - -         - - - - -  O N E W A Y  - - - - - 
      Variable  Y 
   By Variable  GROUP 

Multiple Range Tests:  Tukey-HSD test with significance level .05 

The difference between two means is significant if 
  MEAN(J)-MEAN(I)  >= 2.6615 * RANGE * SQRT(1/N(I) + 1/N(J)) 
  with the following value(s) for RANGE: 3.77 

   (*) Indicates significant differences which are shown in the lower triangle 
                          G G G 
                          r r r 
                          p p p 

                          2 3 1 
     Mean      GROUP 

     6.0000    Grp 2 
     9.0000    Grp 3 
    15.0000    Grp 1      * 

 Homogeneous Subsets (highest and lowest means are not significantly different) 

Subset 1 
Group       Grp 2         Grp 3 
Mean        6.0000        9.0000 
- - - - - - - - - - - - - - - - - 

Subset 2 
Group       Grp 3         Grp 1 
Mean        9.0000       15.0000 
- - - - - - - - - - - - - - - - -        - - - - -  O N E W A Y  - - - - - 
      Variable  Y 
   By Variable  GROUP 

Multiple Range Tests:  LSD test with significance level .05 

The difference between two means is significant if 
  MEAN(J)-MEAN(I)  >= 2.6615 * RANGE * SQRT(1/N(I) + 1/N(J)) 
  with the following value(s) for RANGE: 3.08 

   (*) Indicates significant differences which are shown in the lower triangle 
                          G G G 
                          r r r 
                          p p p 

                          2 3 1 
     Mean      GROUP 

     6.0000    Grp 2 
     9.0000    Grp 3 
    15.0000    Grp 1      * * 

 Homogeneous Subsets (highest and lowest means are not significantly different) 

Subset 1 
Group       Grp 2         Grp 3 
Mean        6.0000        9.0000 
- - - - - - - - - - - - - - - - - 

Subset 2 
Group       Grp 1 
Mean       15.0000 
- - - - - - - - - - 


Two-factor ANOVA TO TOP 

  • This program reads the data from the program in fixed format.
  • This program also asks for cell means to be printed.
set width=80. 
title 'Two factor ANOVA'. 
data list 
  /facta 1 factb 3 y 5-6. 
begin data 
1 1 1 
1 1 4 
1 1 0 
1 1 7 
2 1 13 
2 1 5 
2 1 7 
2 1 15 
3 1 9 
3 1 16 
3 1 18 
3 1 13 
1 2 15 
1 2 6 
1 2 10 
1 2 13 
2 2 6 
2 2 18 
2 2 9 
2 2 15 
3 2 14 
3 2 7 
3 2 6 
3 2 13 
end data. 
manova y by facta (1,3) factb (1,2) 
  /print=cellinfo(means). 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Cell Means and Standard Deviations 
 Variable .. Y 
      FACTOR           CODE                  Mean  Std. Dev.          N 

  FACTA                  1 
   FACTB                  1                 3.000      3.162          4 
   FACTB                  2                11.000      3.916          4 
  FACTA                  2 
   FACTB                  1                10.000      4.761          4 
   FACTB                  2                12.000      5.477          4 
  FACTA                  3 
   FACTB                  1                14.000      3.916          4 
   FACTB                  2                10.000      4.082          4 
 For entire sample                         10.000      5.150         24 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
05 Oct 98 Two factor ANOVA                                  &nb sp;             Page 3 
11:27:38  Arizona State University       HP 9000          HP-UX 10.0 

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * * 

 Tests of Significance for Y using UNIQUE sums of squares 
 Source of Variation          SS      DF        MS         F  Sig of F 

 WITHIN CELLS             330.00      18     18.33 
 FACTA                    112.00       2     56.00      3.05      .072 
 FACTB                     24.00       1     24.00      1.31      .268 
 FACTA BY FACTB           144.00       2     72.00      3.93      .038 

 (Model)                  280.00       5     56.00      3.05      .036 
 (Total)                  610.00      23     26.52 

 R-Squared =           .459 
 Adjusted R-Squared =  .309 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 


Three-factor ANOVA TO TOP 

  • This program reads the data from the program in free format.
  • Note that all effects are listed, including three 2-way interactions and one 3-way interaction.
set width=80. 
title 'Three factor between subjects design'. 
data list list 
  /facta factb factc y. 
begin data 
1 1 1 7 
1 1 1 4 
1 1 1 5 
1 1 1 6 
1 1 2 7 
1 1 2 5 
1 1 2 5 
1 1 2 6 
1 2 1 2 
1 2 1 4 
1 2 1 3 
1 2 1 3 
1 2 2 2 
1 2 2 3 
1 2 2 4 
1 2 2 1 
1 3 1 4 
1 3 1 3 
1 3 1 0 
1 3 1 3 
1 3 2 1 
1 3 2 3 
1 3 2 2 
1 3 2 2 
2 1 1 10 
2 1 1 7 
2 1 1 6 
2 1 1 8 
2 1 2 6 
2 1 2 5 
2 1 2 5 
2 1 2 6 
2 2 1 4 
2 2 1 6 
2 2 1 3 
2 2 1 5 
2 2 2 1 
2 2 2 3 
2 2 2 4 
2 2 2 5 
2 3 1 7 
2 3 1 4 
2 3 1 5 
2 3 1 5 
2 3 2 1 
2 3 2 3 
2 3 2 3 
2 3 2 0 
3 1 1 13 
3 1 1 10 
3 1 1 13 
3 1 1 8 
3 1 2 12 
3 1 2 13 
3 1 2 11 
3 1 2 12 
3 2 1 9 
3 2 1 8 
3 2 1 9 
3 2 1 10 
3 2 2 7 
3 2 2 6 
3 2 2 7 
3 2 2 6 
3 3 1 8 
3 3 1 5 
3 3 1 6 
3 3 1 6 
3 3 2 7 
3 3 2 7 
3 3 2 4 
3 3 2 6 
end data. 
manova y by facta (1,3) factb (1,3) factc(1,2) 
  /print=cellinfo(means). 
 
* * * * * * A n a l y s i s   o f   V a r i a n c e * * * * * * 
 

        72 cases accepted. 
         0 cases rejected because of out-of-range factor values. 
         0 cases rejected because of missing data. 
        18 non-empty cells. 

         1 design will be processed. 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Cell Means and Standard Deviations 
 Variable .. Y 
      FACTOR           CODE                  Mean  Std. Dev.          N 

  FACTA                  1 
   FACTB                  1 
    FACTC                  1                5.500      1.291          4 
    FACTC                  2                5.750       .957          4 
   FACTB                  2 
    FACTC                  1                3.000       .816          4 
    FACTC                  2                2.500      1.291          4 
   FACTB                  3 
    FACTC                  1                2.500      1.732          4 
    FACTC                  2                2.000       .816          4 
  FACTA                  2 
   FACTB                  1 
    FACTC                  1                7.750      1.708          4 
    FACTC                  2                5.500       .577          4 
   FACTB                  2 
    FACTC                  1                4.500      1.291          4 
    FACTC                  2                3.250      1.708          4 
   FACTB                  3 
    FACTC                  1                5.250      1.258          4 
    FACTC                  2                1.750      1.500          4 
  FACTA                  3 
   FACTB                  1 
    FACTC                  1               11.000      2.449          4 
    FACTC                  2               12.000       .816          4 
   FACTB                  2 
    FACTC                  1                9.000       .816          4 
    FACTC                  2                6.500       .577          4 
   FACTB                  3 
    FACTC                  1                6.250      1.258          4 
    FACTC                  2                6.000      1.414          4 
 For entire sample                          5.556      3.112         72 
13 Oct 98 Three factor between subjects design                            Page 3 
12:07:33  Arizona State University       HP 9000          HP-UX 10.0 

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * * 

 Tests of Significance for Y using UNIQUE sums of squares 
 Source of Variation          SS      DF        MS         F  Sig of F 

 WITHIN CELLS              94.50      54      1.75 
 FACTA                    318.53       2    159.26     91.01      .000 
 FACTB                    209.03       2    104.51     59.72      .000 
 FACTC                     20.06       1     20.06     11.46      .001 
 FACTA BY FACTB            12.22       4      3.06      1.75      .153 
 FACTA BY FACTC            15.03       2      7.51      4.29      .019 
 FACTB BY FACTC             4.69       2      2.35      1.34      .270 
 FACTA BY FACTB BY FA      13.72       4      3.43      1.96      .114 
 CTC 

 (Model)                  593.28      17     34.90     19.94      .000 
 (Total)                  687.78      71      9.69 

 R-Squared =           .863 
 Adjusted R-Squared =  .819 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 


Four-factor ANOVA TO TOP 

  • The data are read in from the program in fixed format.
set width=80. 
data list 
  /facta 1 factb 2 factc 3 factd 4 y 5. 
begin data 
11113 
11112 
11127 
11125 
11212 
11211 
11226 
11225 
12119 
12118 
12123 
12123 
12217 
12214 
12228 
12226 
21111 
21112 
21124 
21124 
21217 
21213 
21222 
21221 
22116 
22115 
22129 
22127 
22215 
22214 
22223 
22226 
end data. 
manova y by facta (1,2) factb (1,2) factc (1,2) factd (1,2). 
 

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * * 

 Tests of Significance for Y using UNIQUE sums of squares 
 Source of Variation          SS      DF        MS         F  Sig of F 

 WITHIN CELLS              27.00      16      1.69 
 FACTA                      3.12       1      3.12      1.85      .192 
 FACTB                     45.13       1     45.13     26.74      .000 
 FACTC                      2.00       1      2.00      1.19      .292 
 FACTD                      3.12       1      3.12      1.85      .192 
 FACTA BY FACTB              .50       1       .50       .30      .594 
 FACTA BY FACTC             1.13       1      1.13       .67      .426 
 FACTA BY FACTD              .50       1       .50       .30      .594 
 FACTB BY FACTC             1.12       1      1.12       .67      .426 
 FACTB BY FACTD             8.00       1      8.00      4.74      .045 
 FACTC BY FACTD              .12       1       .12       .07      .789 
 FACTA BY FACTB BY FA       8.00       1      8.00      4.74      .045 
 CTC 
 FACTA BY FACTB BY FA      28.12       1     28.12     16.67      .001 
 CTD 
 FACTA BY FACTC BY FA      32.00       1     32.00     18.96      .000 
 CTD 
 FACTB BY FACTC BY FA      12.50       1     12.50      7.41      .015 
 CTD 
 FACTA BY FACTB BY FA       1.12       1      1.12       .67      .426 
 CTC BY FACTD 

 (Model)                  146.50      15      9.77      5.79      .001 
 (Total)                  173.50      31      5.60 

 R-Squared =           .844 
 Adjusted R-Squared =  .698 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

9448 bytes of memory are needed for MANOVA execution. 
13 Oct 98 SPSS for Unix, Release 6.1 (HP9000 xxx )                        Page 4 
12:11:03  Arizona State University       HP 9000          HP-UX 10.0 
 

Preceding task required .08 seconds CPU time;  .11 seconds elapsed. 

  38 

    37 command lines read. 
     0 errors detected. 
     0 warnings issued. 
     0 seconds CPU time. 
     0 seconds elapsed time. 
       End of job. 
 



One-factor within ANOVA

set width=80.
title 'Repeated measures with contrasts, ch16'.
data list
  /score1 1-2 score2 3-4 score3 5-6.
begin data
081209
081314
091506
001812
131518
101707
end data.
manova score1 score2 score3
  /wsfactors=score(3)
  /omeans
  /design.
manova score1 score2 score3
  /wsfactors=score(3)
  /print=signif(univ)
  /contrast(score)=special(1 1 1, 1 -2 1, 1 0 -1)
  /rename=mean first second
  /design.
manova score1 score2 score3
  /print=signif(univ)
  /transform(score1 score2 score3)=special(1 1 1, 1 -2 1, 0 1 1)
  /rename=mean first second
  /design.
 

* * * * * * A n a l y s i s   o f   V a r i a n c e * * * * * *
 

         6 cases accepted.
         0 cases rejected because of out-of-range factor values.
         0 cases rejected because of missing data.
         1 non-empty cell.

         1 design will be processed.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Cell Means and Standard Deviations
 Variable .. SCORE1
                                        ;      Mean  Std. Dev.          N

 For entire sample                          8.000      4.336          6

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Variable .. SCORE2
                                        ;      Mean  Std. Dev.          N

 For entire sample                         15.000      2.280          6

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Variable .. SCORE3
                                        ;      Mean  Std. Dev.          N

 For entire sample                         11.000      4.561          6

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                          Page 3
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests of Between-Subjects Effects.

 Tests of Significance for T1 using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS              67.33       5     13.47
 CONSTANT                2312.00       1   2312.00    171.68      .000

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                          Page 4
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'SCORE' Within-Subject Effect.
 

 Mauchly sphericity test, W =      .98732
 Chi-square approx. =              .05103 with 2 D. F.
 Significance =                      .975

 Greenhouse-Geisser Epsilon =      .98748
 Huynh-Feldt Epsilon =            1.00000
 Lower-bound Epsilon =             .50000

AVERAGED Tests of Significance that follow multivariate tests are equivalent to
univariate or split-plot or mixed-model approach to repeated measures.
Epsilons may be used to adjust d.f. for the AVERAGED results.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                          Page 5
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

 EFFECT .. SCORE
 Multivariate Tests of Significance (S = 1, M = 0, N = 1 )

 Test Name         Value    Exact F Hypoth. DF   Error DF  Sig. of F

 Pillais          .65613    3.81623       2.00       4.00       .118
 Hotellings      1.90812    3.81623       2.00       4.00       .118
 Wilks            .34387    3.81623       2.00       4.00       .118
 Roys             .65613
 Note.. F statistics are exact.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                          Page 6
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'SCORE' Within-Subject Effect.

 AVERAGED Tests of Significance for SCORE using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS             156.67      10     15.67
 SCORE                    148.00       2     74.00      4.72      .036

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

5736 bytes of memory are needed for MANOVA execution.
04 Nov 98 Repeated measures with contrasts, ch16                          Page 7
12:57:11  Arizona State University       HP 9000          HP-UX 10.0
 

Preceding task required .05 seconds CPU time;  .26 seconds elapsed.

  16  manova score1 score2 score3
  17    /wsfactors=score(3)
  18    /print=signif(univ)
  19    /contrast(score)=special(1 1 1, 1 -2 1, 1 0 -1)
  20    /rename=mean first second
  21    /design.

>Warning # 12252 on line 19 in column 20.  Text: SPECIAL
>Special contrasts were requested for a WSFACTOR.  MANOVA automatically
>orthonormalizes contrast matrices for WSFACTORS.  If the special contrasts
>that were requested are nonorthogonal, the contrasts actually fitted are
>not the contrasts requested.  See the transformation matrix for the actual
>contrasts fitted.  Use TRANSFORM instead of WSFACTORS to produce
>nonorthogonal contrasts for within subjects factors.  Multivariate and
>averaged tests remain valid.

The default error term in MANOVA has been changed from WITHIN CELLS to
WITHIN+RESIDUAL.  Note that these are the same for all full factorial
designs.
04 Nov 98 Repeated measures with contrasts, ch16                          Page 8
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e * * * * * *
 

         6 cases accepted.
         0 cases rejected because of out-of-range factor values.
         0 cases rejected because of missing data.
         1 non-empty cell.

         1 design will be processed.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                          Page 9
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests of Between-Subjects Effects.

 Tests of Significance for MEAN using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS              67.33       5     13.47
 CONSTANT                2312.00       1   2312.00    171.68      .000

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Estimates for MEAN
 --- Individual univariate .9500 confidence intervals

 CONSTANT

  Parameter     Coeff.  Std. Err.    t-Value     Sig. t Lower -95%  CL- Upper

        1   19.6299092    1.49815   13.10279     .00005   15.77880   23.48102

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                         Page 10
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'SCORE' Within-Subject Effect.
 

 Mauchly sphericity test, W =      .98732
 Chi-square approx. =              .05103 with 2 D. F.
 Significance =                      .975

 Greenhouse-Geisser Epsilon =      .98748
 Huynh-Feldt Epsilon =            1.00000
 Lower-bound Epsilon =             .50000

AVERAGED Tests of Significance that follow multivariate tests are equivalent to
univariate or split-plot or mixed-model approach to repeated measures.
Epsilons may be used to adjust d.f. for the AVERAGED results.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                         Page 11
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

 EFFECT .. SCORE
 Multivariate Tests of Significance (S = 1, M = 0, N = 1 )

 Test Name         Value    Exact F Hypoth. DF   Error DF  Sig. of F

 Pillais          .65613    3.81623       2.00       4.00       .118
 Hotellings      1.90812    3.81623       2.00       4.00       .118
 Wilks            .34387    3.81623       2.00       4.00       .118
 Roys             .65613
 Note.. F statistics are exact.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 EFFECT .. SCORE (Cont.)
 Univariate F-tests with (1,5) D. F.

 Variable   Hypoth. SS   Error SS Hypoth. MS   Error MS          F  Sig. of F

 FIRST       121.00000   71.66667  121.00000   14.33333    8.44186       .034
 SECOND       27.00000   85.00000   27.00000   17.00000    1.58824       .263

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                         Page 12
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'SCORE' Within-Subject Effect.

 AVERAGED Tests of Significance for SCORE using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS             156.67      10     15.67
 SCORE                    148.00       2     74.00      4.72      .036

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Estimates for FIRST
 --- Individual univariate .9500 confidence intervals

 SCORE

  Parameter     Coeff.  Std. Err.    t-Value     Sig. t Lower -95%  CL- Upper

        1   -4.4907312    1.54560   -2.90549     .03358   -8.46383    -.51763

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Estimates for SECOND
 --- Individual univariate .9500 confidence intervals

 SCORE

  Parameter     Coeff.  Std. Err.    t-Value     Sig. t Lower -95%  CL- Upper

        1   -2.1213203    1.68325   -1.26025     .26319   -6.44825    2.20561

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

5808 bytes of memory are needed for MANOVA execution.
04 Nov 98 Repeated measures with contrasts, ch16                         Page 13
12:57:11  Arizona State University       HP 9000          HP-UX 10.0
 

Preceding task required .04 seconds CPU time;  .15 seconds elapsed.

  22  manova score1 score2 score3
  23    /print=signif(univ)
  24    /transform(score1 score2 score3)=special(1 1 1, 1 -2 1, 0 1 1)
  25    /rename=mean first second
  26    /design.
The default error term in MANOVA has been changed from WITHIN CELLS to
WITHIN+RESIDUAL.  Note that these are the same for all full factorial
designs.
04 Nov 98 Repeated measures with contrasts, ch16                         Page 14
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e * * * * * *
 

         6 cases accepted.
         0 cases rejected because of out-of-range factor values.
         0 cases rejected because of missing data.
         1 non-empty cell.

         1 design will be processed.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
04 Nov 98 Repeated measures with contrasts, ch16                         Page 15
12:57:11  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

 EFFECT .. CONSTANT
 Multivariate Tests of Significance (S = 1, M = 1/2, N = 1/2)

 Test Name         Value    Exact F Hypoth. DF   Error DF  Sig. of F

 Pillais          .98885   88.67165       3.00       3.00       .002
 Hotellings     88.67165   88.67165       3.00       3.00       .002
 Wilks            .01115   88.67165       3.00       3.00       .002
 Roys             .98885
 Note.. F statistics are exact.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 EFFECT .. CONSTANT (Cont.)
 Univariate F-tests with (1,5) D. F.

 Variable   Hypoth. SS   Error SS Hypoth. MS   Error MS          F  Sig. of F

 MEAN       6936.00000  202.00000 6936.00000   40.40000  171.68317       .000
 FIRST       726.00000  430.00000  726.00000   86.00000    8.44186       .034
 SECOND     4056.00000  120.00000 4056.00000   24.00000  169.00000       .000

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

5232 bytes of memory are needed for MANOVA execution.
04 Nov 98 Repeated measures with contrasts, ch16                         Page 16
12:57:11  Arizona State University       HP 9000          HP-UX 10.0
 

Preceding task required .02 seconds CPU time;  .09 seconds elapsed.

  27

    26 command lines read.
     0 errors detected.
     1 warnings issued.
     0 seconds CPU time.
     1 seconds elapsed time.
       End of job.



Two-factor within ANOVA

set width=80.
title 'Two-factor within subjects, ch 21'.
data list list
  /a1b1 a1b2 a1b3 a1b4 a2b1 a2b2 a2b3 a2b4.
begin data
03 04 03 07 05 06 07 11
06 08 09 12 10 12 15 18
07 13 11 11 10 15 14 15
00 03 06 06 05 07 09 11
end data.
manova a1b1 a1b2 a1b3 a1b4 a2b1 a2b2 a2b3 a2b4
  /wsfactors=freq(2) trials(4)
  /print=signif(univ)
  /wsdesign
  /design.

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests of Between-Subjects Effects.

 Tests of Significance for T1 using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS             272.59       3     90.86
 CONSTANT                2432.53       1   2432.53     26.77      .014

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 Nov 98 Two-factor within subjects, ch 21                               Page 4
11:15:03  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'FREQ' Within-Subject Effect.

 Tests of Significance for T2 using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS               5.84       3      1.95
 FREQ                     116.28       1    116.28     59.70      .005

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 Nov 98 Two-factor within subjects, ch 21                               Page 5
11:15:03  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'TRIALS' Within-Subject Effect.
 

 Mauchly sphericity test, W =      .11105
 Chi-square approx. =             3.78502 with 5 D. F.
 Significance =                      .581

 Greenhouse-Geisser Epsilon =      .58676
 Huynh-Feldt Epsilon =            1.00000
 Lower-bound Epsilon =             .33333

AVERAGED Tests of Significance that follow multivariate tests are equivalent to
univariate or split-plot or mixed-model approach to repeated measures.
Epsilons may be used to adjust d.f. for the AVERAGED results.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 Nov 98 Two-factor within subjects, ch 21                               Page 6
11:15:03  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

 EFFECT .. TRIALS
 Multivariate Tests of Significance (S = 1, M = 1/2, N = -1/2)

 Test Name         Value    Exact F Hypoth. DF   Error DF  Sig. of F

 Pillais          .99231   43.01657       3.00       1.00       .112
 Hotellings    129.04970   43.01657       3.00       1.00       .112
 Wilks            .00769   43.01657       3.00       1.00       .112
 Roys             .99231
 Note.. F statistics are exact.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 EFFECT .. TRIALS (Cont.)
 Univariate F-tests with (1,3) D. F.

 Variable   Hypoth. SS   Error SS Hypoth. MS   Error MS          F  Sig. of F

 T3          124.25625    7.56875  124.25625    2.52292   49.25103       .006
 T4             .78125   17.84375     .78125    5.94792     .13135       .741
 T5            4.55625    6.36875    4.55625    2.12292    2.14622       .239

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 Nov 98 Two-factor within subjects, ch 21                               Page 7
11:15:03  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'TRIALS' Within-Subject Effect.

 AVERAGED Tests of Significance for MEAS.1 using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS              31.78       9      3.53
 TRIALS                   129.59       3     43.20     12.23      .002

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 Nov 98 Two-factor within subjects, ch 21                               Page 8
11:15:03  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'FREQ BY TRIALS' Within-Subject Effect.
 

 Mauchly sphericity test, W =      .00000
 Chi-square approx. =              .      with 5 D. F.
 Significance =                      .

 Greenhouse-Geisser Epsilon =      .34752
 Huynh-Feldt Epsilon =             .36956
 Lower-bound Epsilon =             .33333

AVERAGED Tests of Significance that follow multivariate tests are equivalent to
univariate or split-plot or mixed-model approach to repeated measures.
Epsilons may be used to adjust d.f. for the AVERAGED results.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *                   *                                          &n bsp;      *
 *   W A R N I N G   * The WITHIN CELLS error matrix is SINGULAR.      *
 *                   * These variables are LINEARLY DEPENDENT          *
 *                   * on preceding ones ..                            *
 *                   *   T8                                         ;    *
 *                   * Multivariate tests will be skipped.             *
 *                   *                                          &n bsp;      *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 Nov 98 Two-factor within subjects, ch 21                               Page 9
11:15:03  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

 EFFECT .. FREQ BY TRIALS
 Univariate F-tests with (1,3) D. F.

 Variable   Hypoth. SS   Error SS Hypoth. MS   Error MS          F  Sig. of F

 T6            2.25625    1.36875    2.25625     .45625    4.94521       .113
 T7             .78125     .84375     .78125     .28125    2.77778       .194
 T8             .30625     .81875     .30625     .27292    1.12214       .367

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 Nov 98 Two-factor within subjects, ch 21                              Page 10
11:15:03  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'FREQ BY TRIALS' Within-Subject Effect.

 AVERAGED Tests of Significance for MEAS.1 using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS               3.03       9       .34
 FREQ BY TRIALS             3.34       3      1.11      3.31      .071

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

18072 bytes of memory are needed for MANOVA execution.
18 Nov 98 Two-factor within subjects, ch 21                              Page 11
11:15:03  Arizona State University       HP 9000          HP-UX 10.0
 

Preceding task required .07 seconds CPU time;  .38 seconds elapsed.

  15

    14 command lines read.
     0 errors detected.
     0 warnings issued.
     0 seconds CPU time.
     1 seconds elapsed time.
       End of job.



Two-factor mixed ANOVA

set width=80.
title 'one within, one between --ch17'.
data list list
  /facta b1 b2 b3 b4.
begin data
1 13 14 17 20
1 10 11 15 14
1 13 19 18 21
1 04 12 14 15
2 05 10 17 21
2 08 15 22 24
2 14 16 23 23
2 12 21 26 26
3 13 24 28 30
3 09 22 22 24
3 14 22 28 28
3 08 18 27 28
end data.
manova b1 b2 b3 b4 by facta(1,3)
  /wsfactors=factb(4)
  /print=signif(avonly)
  /wsdesign
  /design.

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests of Between-Subjects Effects.

 AVERAGED Tests of Significance for B using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS             302.13       9     33.57
 FACTA                    414.13       2    207.06      6.17      .021

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22 Nov 98 one within, one between --ch17                                & nbsp; Page 4
10:51:49  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'FACTB' Within-Subject Effect.
 

 Mauchly sphericity test, W =      .64018
 Chi-square approx. =             3.44415 with 5 D. F.
 Significance =                      .632

 Greenhouse-Geisser Epsilon =      .82977
 Huynh-Feldt Epsilon =            1.00000
 Lower-bound Epsilon =             .33333

AVERAGED Tests of Significance that follow are equivalent to
univariate or split-plot or mixed-model approach to repeated measures.
Epsilons may be used to adjust d.f. for the AVERAGED results.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22 Nov 98 one within, one between --ch17                                & nbsp; Page 5
10:51:49  Arizona State University       HP 9000          HP-UX 10.0

* * * * * * A n a l y s i s   o f   V a r i a n c e -- design   1 * * * * * *

Tests involving 'FACTB' Within-Subject Effect.

 AVERAGED Tests of Significance for B using UNIQUE sums of squares
 Source of Variation          SS      DF        MS         F  Sig of F

 WITHIN CELLS              90.38      27      3.35
 FACTB                   1152.42       3    384.14    114.76      .000
 FACTA BY FACTB           130.21       6     21.70      6.48      .000

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



Back to the ANOVA HomePage