Research Design - - Topic 8 Hierarchical Designs in nalysis of Variance (Kirk, Chapter 11) 008 R.C. Gardner, Ph.D. Experimental Design pproach General Rationale and pplications Rules for Determining Sources of Variance Examples of Two factor Designs with B nested in Subjects nested in and B Subjects nested in Subjects crossed with and B Using SPSS GLM Tests of Means Variance ccounted for 1
General Rationale and pplications Hierarchical Design. t least one treatment factor is nested in at least one other factor. That is, a factor (B) is nested in another () if certain levels of B appear in only one level of. This means that the factors are not crossed and that consequently there is no interaction involving those two factors. Such designs are typically used when factor B is a nuisance variable. If it is a random factor it permits generalization to all possible levels of that factor and if this is the case the effects of other factors (e.g., ) apply to all possible levels of B.
Examples of nuisance variables (i.e., Factor B) are cages, hospitals, classrooms, individual words, target stimuli, etc... Thus, if one were studying the effects of different drugs (Factor ) on pain management and selected a number of hospitals at random with only one of the drugs applied in each hospital, this would be a case where Factor B is nested in, and subjects are nested in and B. The following data will be used for three examples varying the nesting of subjects but the names of the variables will be changed for illustrative purposes. 3
Example from Kirk, (1995, p. 480) B1 B B3 B4 1 3 6 3 3 1 5 6 5 6 3 4 3 X a1 = 3.50 B5 B6 B7 B8 Means 3.75 1.75 5.5 3.0 7 8 7 6 4 5 4 3 7 8 9 8 10 10 9 11 X a = 7.5 Means 7.0 4.0 8.0 10.0 Where: = Ionization, B = Cages. Dependent variable is activity level of rats. 4
Rules for Determining Sources of Variance 1. List all the factors, and their possible interactions indicating the nesting. Nesting is indicated by using a / between the factor and the one in which it is nested. For example, B nested in is written B/, Subjects nested in and B is written S/B/..Eliminate all interactions containing elements where a factor is identified as interacting with another that is nested in it. This is indicated when a factor is shown both preceding (or not being associated with a /) and following a /. 5
Example 1 has B nested in with subjects nested in and B. The sources of variance would be written as follows. B/ S/B/ *B/ B/*S/B/ *S/B/ *B/*S/B/ Following the second rule above, the following would be eliminated: *B/ - - because appears both before and after the / B/*S/B/ - - B appears both before and after a / *S/B/ - - appears both before and after a / *B/*S/B/ - - both and B appear before and after a / Thus, only the three main effect factors remain. 6
Kirk (1995, pp. 479-48) describes an example of this analysis where: defines two levels of ionization (positive vs negative) in rat cages B refers to 8 cages of rats in which 4 cages are randomly assigned to each level of. Thus: is a fixed factor with two levels, and B is a random factor with four levels of cages nested in. In the example there are 4 Subjects nested in each cage (i.e., in B which is nested in ). The following slide shows the defining formulae for this analysis, and the subsequent one presents the results obtained by applying these formulae to the data in Slide 4. 7
Example 1. B nested in, and Subjects nested in and B. (, B/, S/B/) Definitional Formulae Source nb a SS ( X G) a df ( a 1) B/ n a b ( X ) b a X a a( b 1) S/B/ a b n X abi ( X ) b / a ab( n 1) 8
Example 1. Numerical Example and Expected Mean Squares (Cornfield Tukey), B/, S/B/ Source SS df F E() 11.50 1 11.50 6.46 nb ( ) b σ σ σ + n 1 B / + ε B B/ 104.50 6 17.4.6 nσ + σ B / ε S/B/ 18.50 4 0.77 σ ε 9
Examination of the E() with B as a random factor yields the following F-ratios: F 11.50 = = = 6.46 @ 1,6 df, p 17.4 B / <.05 Conclusion: 1 (positive ionization) results in less activity (mean = 3.50) than (negative ionization) (mean = 7.5), and we can generalize this finding to all possible cages. F B B / 17.4 / = = =.6 @ 6,4 df, p <.77 S / B /.0001 Conclusion: There is significant variation among cages nested in. Because B is a random factor, there would be no interest in comparing means for B nested in. 10
Example. Subjects nested in. For example is two types of words, Concrete and bstract, presented tachistoscopically to measure recognition time. B is Words (i.e., 4 exemplars drawn at random), and Subjects receive either the Concrete or bstract lists. B/ S/ *B/ B/*S/ = BS/ *S/ *B/*S/ Following the second rule, the following would be eliminated: *B/ - - because appears both before and after a / *S/ - - appears both before and after a / *B/*S/ - - appears both before and after a / Thus, four sources remain. The following slide shows the defining formulae for this analysis, and the subsequent one presents the results obtained by applying these formulae to the data in Slide 4. 11
Example. B nested in and Subjects nested in (,B/, S/) Definitional formulae Source nb a SS ( X G) a df ( a 1) B/ n a b ( X ) b a X a a( b 1) S/ b a n ( P ) i a X a a( n 1) BS/ a b n ( X ) abi Pi a X b a + X a a( b 1)( n 1) 1
Example Numerical Example and Expected Mean Squares (Cornfield Tukey) (,B/, S/) Source SS df F E() 11.50 1 11.50 nbσ b b + B B + n 1 σ B / + 1 σ Bπ / σ ε ( ) ( ) 6.46 B/ 104.50 6 17.4 5.5 nσ + B / + σ Bπ / σ ε S/ 6.00 6 1.00 σ ε BS/ 1.50 18 0.69 0.69 σ + σ Bπ / ε 13
Examination of the E() with B as a random factor yields the following : F 11.50 = = = 6.46 @ 1,6 df, p 17.4 B / <.05 Conclusion: 1 (concrete words) recognized more quickly (mean = 3.50) than (abstract words) (mean = 7.5), and we can generalize this finding to all possible concrete and abstract words. F B B / 17.4 / = = = 5.5@ 6,18 df, p <.0001.69 BS / Conclusion: There is significant variation in recognition speed of words within concrete and abstract lists. Because B is a random factor, there would be no interest in comparing means within either of the lists. F.69 BS / BS / = = =. 69 S / 1.00 Conclusion: There is no interaction between Subjects and individual words nested in Concrete or bstract lists. 14 ns
Example 3. Subjects crossed with and B. For example words from both lists (Concrete and bstract) are administered tachistoscopically in random order to all subjects to measure recognition time. B/ S *B/ B/*S = BS/ *S *B/*S Following the second rule, the following would be eliminated: *B/ - - because appears both before and after a / *B/*S - - appears both before and after a / Thus, five sources remain. The following slide shows the defining formulae for this analysis, and the subsequent one shows the results obtained by applying these formulae to the data presented in Slide 4. 15
Example 3. B Subjects crossed with and B (,B/, S) Definitional formulae Source nb a SS ( X G) a df ( a 1) B/ n a b ( X ) b a X a a( b 1) S ab n ( P G) i ( n 1) S b a n ( P P X G) i a i a + ( a 1)( n 1) BS/ a b n ( X ) abi Pi a X b a + X a a( b 1)( n 1) 16
Example 3 Numerical Example and Expected Mean Squares (Cornfield Tukey) (,B/, S) Source SS df F E() 11.50 1 11.50 nbσ b b + B B + n 1 σ B / + 1 σ Bπ + bσ π σ ε ( ) ( ) 6.63 B/ 104.50 6 17.4 5.5 nσ + B / + σ B π σ ε S 5.5 3 1.75 ( ) ( ) b σ + b 1 a σ σ π + 1 Bπ π ε abσ + B bσ b + B π + 1 σ Bπ σ ε ( ) S 0.75 3 0.5.36 BS/ 1.50 18 0.69 σ + Bπ σ ε F ( = B / + S BS / ) df = + + B / + S BS / B / S BS / 17
Examination of the E() with B as a random factor yields the following : There is no clear F-ratio for, thus a quasi F-ratio must be computed using the formulae presented in Slide 17. F 11.50 = = = 6.63 @ 1,5.7 df, p 17.4 +.5.69 pooled <.05 Conclusion: 1 (concrete words) recognized more quickly (mean = 3.50) than (abstract words) (mean = 7.5), and we can generalize this finding to all possible concrete and abstract words. F B B / 17.4 / = = = 5.5@ 6,18 df, p <.69 BS /.0001 Conclusion: There is significant variation in recognition speed of words within concrete and abstract lists Because B is a random factor, there would be no interest in comparing means within either of the lists. 18
We could compute two other F-ratios, though they may not be of much interest. F S S = = =. 36 BS /.5.69 If it were significant this would indicate that there is an interaction between individual subjects and the type of word. Because Subject is a random factor, there would be no interest in testing differences between means. ns nd if is fixed: S 1.75 FS = = =.54 @3,18 df,.69 BS / ns Or if is random S 1.75 FS = = = 7.00 @3,3 df,.5 S ns If either were significant it would indicate that there are significant individual differences in recognition speed of words. 19
Using SPSS to nalyze Hierarchical Designs SPSS SPSS does not do analyses of hierarchical designs under GLM. They can be performed using MNOV in SPSS but we will not discuss that. Instead, we will show how to obtain the results using procedures discussed in previous lectures. For Example 1 (Subjects nested in and B), run GLM Univariate for a completely randomized X4 factorial design. Then compute the Sum of Squares and degrees of freedom for B/ as follows: SS = SS + SS df = df + B / B B B / B B df The following slide contains the output for this analysis. 0
Dependent Variable: X Source Corrected Model Intercept B * B Error Total Corrected Total Tests of Between-Subjects Effects Type III Sum of Squares df Mean Square F Sig. 17.000 a 7 31.000 40.16.000 94.500 1 94.500 1199.351.000 11.500 1 11.500 145.946.000 75.50 3 5.083 3.541.000 9.50 3 9.750 1.649.000 18.500 4.771 1160.000 3 35.500 31 a. R Squared =.91 (djusted R Squared =.899) 104.5 Thus: SS B / = 75.5 + 9.5 = 104.5 B / = = 17. 4 6 Where df B / = 3+ 3 = 6 11.50 nd F = = = 6.46, df = 1,6, p <. 05 17.4 B / 1
For Example, subjects nested in, analyze the data with SPSS GLM Repeated as if you were running a split plot design. This will produce the following results for the Within Subjects Effect. (Only the values from Sphericity ssumed are relevant.) Tests of Within-Subjects Effects Measure: MESURE_1 Source B B * Error(B) Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Type III Sum of Squares df Mean Square F Sig. 75.50 3 5.083 36.10.000 75.50.56 33.351 36.10.000 75.50 3.000 5.083 36.10.000 75.50 1.000 75.50 36.10.001 9.50 3 9.750 14.040.000 9.50.56 1.964 14.040.000 9.50 3.000 9.750 14.040.000 9.50 1.000 9.50 14.040.010 1.500 18.694 1.500 13.538.93 1.500 18.000.694 1.500 6.000.083 Compute values for B/ (i.e., SS and df) by summing the values for B and B*, and computing F as shown in Slide 1.
nd the following table for the Between Subjects Effects. Measure: MESURE_1 Transformed Variable: verage Source Intercept Error Tests of Between-Subjects Effects Type III Sum of Squares df Mean Square F Sig. 94.500 1 94.500 94.500.000 11.500 1 11.500 11.500.000 6.000 6 1.000 In this case: Error corresponds to S/ from Slide 13 Error(B) from the previous slide corresponds to BS/ (Slide 13) SS B/ = 75.5 + 9.5 from the previous slide. 11.5 17.4.69 1.00 Thus: F = 6.46; F = 5.5; F =. 69 = B / BS / = 3
For example 3, subjects crossed with and B, analyze the data with SPSS GLM Repeated as if you were running a randomized blocks factorial (repeated measures on both factors). This will yield the following Between Subjects table and the Within Subjects table on the next slide. Tests of Between-Subjects Effects Measure: MESURE_1 Transformed Variable: verage Type III Sum Source of Squares df Mean Square F Sig. Intercept 94.500 1 94.500 58.86.000 Error 5.50 3 1.750 The values for Error correspond to those for S in Example 3 (see Slide 17). 4
Output to be used for Example 3 (Only the values for Sphericity ssumed are relevant here) Tests of Within-Subjects Effects Measure: MESURE_1 Source Error() B Error(B) * B Error(*B) Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Sphericity ssumed Greenhouse-Geisser Huynh-Feldt Lower-bound Type III Sum of Squares df Mean Square F Sig. 11.500 1 11.500 450.000.000 11.500 1.000 11.500 450.000.000 11.500 1.000 11.500 450.000.000 11.500 1.000 11.500 450.000.000.750 3.50.750 3.000.50.750 3.000.50.750 3.000.50 75.50 3 5.083 37.65.000 75.50 1.138 66.105 37.65.006 75.50 1.37 54.865 37.65.003 75.50 1.000 75.50 37.65.009 6.000 9.667 6.000 3.415 1.757 6.000 4.115 1.458 6.000 3.000.000 9.50 3 9.750 13.500.001 9.50 1.788 16.356 13.500.009 9.50 3.000 9.750 13.500.001 9.50 1.000 9.50 13.500.035 6.500 9.7 6.500 5.365 1.1 6.500 9.000.7 6.500 3.000.167 5
For the material in the previous table: Error corresponds to S on Slide 17 B + *B corresponds to B/ on Slide 17 Error (B) + Error (*B) corresponds to BS/ on Slide 17 Thus, to compute F with fixed and B random, it is necessary to compute a quasi F-ratio. ll calculations will be as shown on Slides 17, 18, and 19. 6
Tests of Means Because is the only fixed factor in this example, only tests of the means can be computed. They would not be necessary for this example because there are only two levels of, but if there were more than two, the tests could be computed as follows (demonstrated only by the t-test, but the approach generalizes to all the tests of means). t = X a1 X bn a error Where: error = B/ for examples 1 and error = B/ + S BS/ for example 3 with Satterthwaite estimate of degrees of freedom. 7
Variance ccounted For In order to compute estimates for ω² and ρ for hierarchical models, it is necessary to evaluate the Expected Mean Square Table where appropriate. For Examples 1 and, there are F- based formulae, but they are not directly comparable to previous examples. Thus, the estimate for ω² for in example 1 is: ω² = v ( F 1) N v1 ( F 1) + F B / 1(5.46) = 3 1(5.46) +.59 1 =.79 The estimate for ω² for in example is: ω² = v ( F 1 v ( F 1) + 1) N( S / B / ) 1(5.46) = 3(1.00) 1(5.46) + 17.4 1 =.75 8