Nested Designs

PVPS Example

Data Entry

Fully Nested Random Effect Model

Using MINITAB Fully Nested ANOVA

Setup

Do StatANOVAFully Nested ANOVA:

(PVPS01.png here)

Session Output

Nested ANOVA: score versus school, class 

Analysis of Variance for score

Source  DF        SS        MS      F      P
school   1  140.1667  140.1667  5.790  0.074
class    4   96.8333   24.2083  5.481  0.005
Error   18   79.5000    4.4167
Total   23  316.5000


Variance Components

                    % of
Source  Var Comp.  Total  StDev
school      9.663  50.78  3.109
class       4.948  26.00  2.224
Error       4.417  23.21  2.102
Total      19.028         4.362


Expected Mean Squares

1  school    1.00(3) +  4.00(2) + 12.00(1)
2  class     1.00(3) +  4.00(2)
3  Error     1.00(3)

Using MINITAB GLM

Setup

Do StatANOVAGeneral Linear Model:

(PVPS02.png here)
(PVPS03.png here)

Session Output

General Linear Model: score versus school, class 

Factor         Type    Levels  Values
school         random       2  1, 2
class(school)  random       6  1, 2, 3, 4, 5, 6


Analysis of Variance for score, using Adjusted SS for Tests

Source         DF   Seq SS   Adj SS   Adj MS     F      P
school          1  140.167  140.167  140.167  5.79  0.074
class(school)   4   96.833   96.833   24.208  5.48  0.005
Error          18   79.500   79.500    4.417
Total          23  316.500


S = 2.10159   R-Sq = 74.88%   R-Sq(adj) = 67.90%


Unusual Observations for score

Obs    score      Fit  SE Fit  Residual  St Resid
 12  17.0000  12.5000  1.0508    4.5000      2.47 R

R denotes an observation with a large standardized residual.

Expected Mean Squares, using Adjusted SS

   Source         Expected Mean Square for Each Term
1  school         (3) + 4.0000 (2) + 12.0000 (1)
2  class(school)  (3) + 4.0000 (2)
3  Error          (3)


Error Terms for Tests, using Adjusted SS

                                      Synthesis
                                      of Error
   Source         Error DF  Error MS  MS
1  school             4.00    24.208  (2)
2  class(school)     18.00     4.417  (3)


Variance Components, using Adjusted SS

               Estimated
Source             Value
school             9.663
class(school)      4.948
Error              4.417

Using MINITAB Balanced ANOVA

Data Requirement

Factors have to be balanced so that classes 4, 5, and 6 have to be recoded as 1, 2, and 3 (in class2 C4).

Setup

Do StatANOVABalanced ANOVA:

(PVPS04.png here)
(PVPS05.png here)

Session Output

ANOVA: score versus school, class2 

Factor          Type    Levels  Values
school          random       2  1, 2
class2(school)  random       3  1, 2, 3


Analysis of Variance for score

Source          DF       SS       MS     F      P
school           1  140.167  140.167  5.79  0.074
class2(school)   4   96.833   24.208  5.48  0.005
Error           18   79.500    4.417
Total           23  316.500


S = 2.10159   R-Sq = 74.88%   R-Sq(adj) = 67.90%

                                     Expected Mean Square
                    Variance  Error  for Each Term (using
   Source          component   term  unrestricted model)
1  school              9.663      2  (3) + 4 (2) + 12 (1)
2  class2(school)      4.948      3  (3) + 4 (2)
3  Error               4.417         (3)

Nested Fixed-Effect Model

Test for Homogeneous Variances

Classes in school 2 have to be coded the same as those for school 1. That is, can't use class (C3). We have to use class2. Do StatANOVATest for Equal Variances:

(PVPS08.png here)

Session Output
Test for Equal Variances: score versus school, class2 

95% Bonferroni confidence intervals for standard deviations

school  class2  N    Lower    StDev    Upper
     1       1  4  0.38882  0.81650   5.6162
     1       2  4  0.77765  1.63299  11.2324
     1       3  4  1.48059  3.10913  21.3859
     2       1  4  1.05592  2.21736  15.2519
     2       2  4  1.25993  2.64575  18.1986
     2       3  4  0.59922  1.25831   8.6552

Bartlett's Test (normal distribution)
Test statistic = 5.50, p-value = 0.358

Levene's Test (any continuous distribution)
Test statistic = 0.95, p-value = 0.474
Graphical Output

(PVPS09.png here)
The variances appear to be homogeneous from the graphs and the tests.

Using MINITAB GLM

Setup

Do StatANOVAGeneral Linear Model:

(PVPS06.png here)
(PVPS07.png here)
Not that you also select to display expected mean squares from Results sub-dialog box.

Session Output
General Linear Model: score versus school, class 

Factor         Type   Levels  Values
school         fixed       2  1, 2
class(school)  fixed       6  1, 2, 3, 4, 5, 6

Analysis of Variance for score, using Adjusted SS for Tests

Source         DF   Seq SS   Adj SS   Adj MS      F      P
school          1  140.167  140.167  140.167  31.74  0.000
class(school)   4   96.833   96.833   24.208   5.48  0.005
Error          18   79.500   79.500    4.417
Total          23  316.500

S = 2.10159   R-Sq = 74.88%   R-Sq(adj) = 67.90%

Unusual Observations for score
Obs    score      Fit  SE Fit  Residual  St Resid
 12  17.0000  12.5000  1.0508    4.5000      2.47 R

R denotes an observation with a large standardized residual.


Expected Mean Squares, using Adjusted SS
                  Expected Mean
                  Square for
   Source         Each Term
1  school         (3) + Q[1, 2]
2  class(school)  (3) + Q[2]
3  Error          (3)


Error Terms for Tests, using Adjusted SS
                                      Synthesis
                                      of Error
   Source         Error DF  Error MS  MS
1  school            18.00     4.417  (3)
2  class(school)     18.00     4.417  (3)


Variance Components, using Adjusted SS

        Estimated
Source      Value
Error       4.417


Tukey 95.0% Simultaneous Confidence Intervals
Response Variable score
All Pairwise Comparisons among Levels of school

school = 1  subtracted from:
school  Lower  Center  Upper    +---------+---------+---------+------
2       3.031   4.833  6.636    (-----------------*-----------------)
                                +---------+---------+---------+------
                              3.0       4.0       5.0       6.0


Tukey Simultaneous Tests
Response Variable score
All Pairwise Comparisons among Levels of school
school = 1  subtracted from:

        Difference       SE of           Adjusted
school    of Means  Difference  T-Value   P-Value
2            4.833      0.8580    5.633    0.0000


Tukey 95.0% Simultaneous Confidence Intervals
Response Variable score
All Pairwise Comparisons among Levels of class(school)

school = 1
class = 1  subtracted from:
school  class   Lower  Center   Upper  ---+---------+---------+---------+---
1       2       0.282  5.0000   9.718               (------*------)
1       3      -4.218  0.5000   5.218         (------*-----)
2       4       2.032  6.7500  11.468                  (------*-----)
2       5      -0.218  4.5000   9.218               (-----*------)
2       6       4.032  8.7500  13.468                     (------*-----)
                                       ---+---------+---------+---------+---
                                       -7.0       0.0       7.0      14.0

school = 1
class = 2  subtracted from:
school  class   Lower  Center   Upper  ---+---------+---------+---------+---
1       3      -9.218  -4.500  0.2181  (------*-----)
2       4      -2.968   1.750  6.4681           (------*-----)
2       5      -5.218  -0.500  4.2181        (-----*------)
2       6      -0.968   3.750  8.4681              (-----*------)
                                       ---+---------+---------+---------+---
                                       -7.0       0.0       7.0      14.0

school = 1
class = 3  subtracted from:
school  class    Lower  Center   Upper  ---+---------+---------+---------+---
2       4       1.5319   6.250  10.968                 (------*------)
2       5      -0.7181   4.000   8.718              (------*-----)
2       6       3.5319   8.250  12.968                    (------*------)
                                        ---+---------+---------+---------+---
                                        -7.0       0.0       7.0      14.0

school = 2
class = 4  subtracted from:
school  class   Lower  Center  Upper  ---+---------+---------+---------+---
2       5      -6.968  -2.250  2.468     (------*------)
2       6      -2.718   2.000  6.718           (------*------)
                                      ---+---------+---------+---------+---
                                      -7.0       0.0       7.0      14.0

school = 2
class = 5  subtracted from:
school  class    Lower  Center  Upper  ---+---------+---------+---------+---
2       6      -0.4681   4.250  8.968              (------*------)
                                       ---+---------+---------+---------+---
                                       -7.0       0.0       7.0      14.0

Tukey Simultaneous Tests
Response Variable score
All Pairwise Comparisons among Levels of class(school)

school = 1
class = 1  subtracted from:
               Difference       SE of           Adjusted
school  class    of Means  Difference  T-Value   P-Value
1       2          5.0000       1.486   3.3646    0.0344
1       3          0.5000       1.486   0.3365    0.9993
2       4          6.7500       1.486   4.5423    0.0029
2       5          4.5000       1.486   3.0282    0.0670
2       6          8.7500       1.486   5.8881    0.0002


school = 1
class = 2  subtracted from:
               Difference       SE of           Adjusted
school  class    of Means  Difference  T-Value   P-Value
1       3          -4.500       1.486   -3.028    0.0670
2       4           1.750       1.486    1.178    0.8416
2       5          -0.500       1.486   -0.336    0.9993
2       6           3.750       1.486    2.523    0.1689

school = 1
class = 3  subtracted from:
               Difference       SE of           Adjusted
school  class    of Means  Difference  T-Value   P-Value
2       4           6.250       1.486    4.206    0.0060
2       5           4.000       1.486    2.692    0.1257
2       6           8.250       1.486    5.552    0.0004

school = 2
class = 4  subtracted from:
               Difference       SE of           Adjusted
school  class    of Means  Difference  T-Value   P-Value
2       5          -2.250       1.486   -1.514    0.6602
2       6           2.000       1.486    1.346    0.7568

school = 2
class = 5  subtracted from:
               Difference       SE of           Adjusted
school  class    of Means  Difference  T-Value   P-Value
2       6           4.250       1.486    2.860    0.0923

Nested Mixed-Effect Model

Setup

Do StatANOVAGeneral Linear Model:

(PVPS10.png here)
Not that you also select to display expected mean squares from Results sub-dialog box.

Session Output
General Linear Model: score versus school, class 

Factor         Type    Levels  Values
school         fixed        2  1, 2
class(school)  random       6  1, 2, 3, 4, 5, 6

Analysis of Variance for score, using Adjusted SS for Tests
Source         DF   Seq SS   Adj SS   Adj MS     F      P
school          1  140.167  140.167  140.167  5.79  0.074
class(school)   4   96.833   96.833   24.208  5.48  0.005
Error          18   79.500   79.500    4.417
Total          23  316.500

S = 2.10159   R-Sq = 74.88%   R-Sq(adj) = 67.90%

Unusual Observations for score
Obs    score      Fit  SE Fit  Residual  St Resid
 12  17.0000  12.5000  1.0508    4.5000      2.47 R

R denotes an observation with a large standardized residual.

Expected Mean Squares, using Adjusted SS
                  Expected Mean Square
   Source         for Each Term
1  school         (3) + 4.0000 (2) + Q[1]
2  class(school)  (3) + 4.0000 (2)
3  Error          (3)

Error Terms for Tests, using Adjusted SS
                                      Synthesis
                                      of Error
   Source         Error DF  Error MS  MS
1  school             4.00    24.208  (2)
2  class(school)     18.00     4.417  (3)

Variance Components, using Adjusted SS
               Estimated
Source             Value
class(school)      4.948
Error              4.417