Randomized Complete Block and Repeated Measures (Each Subject Receives Each Treatment) Designs KNNL – Chapters 21,27.1-2 Block Designs • Prior to treatment assignment to experimental units, we may have information on unit characteristics • When possible, we will create “blocks” of homogeneous units, based on the characteristics • Within each block, we randomize the treatments to the experimental units • Complete Block Designs have block size = number of treatments (or an integer multiple) • Block Designs allow the removal of block to block variation, for more powerful tests • When Subjects are blocking variable, use Repeated Measures Designs, with adjustments made to Block Analysis (in many cases, the analysis is done the same) Randomized Block Design – Model & Estimates Blocks made based on specified categories: age, gender, day of week, etc: Fixed Effects Model: Yij i j ij i 1,..., nb ; j 1,..., r where: overall mean i effect of i block (typically row effect) with: th nb i 1 i 0 j effect of j treatment (typically column effect) with: th ij ~ N 0, 2 independent Yij ~ N i j , 2 independent Least Squares Estimators: ^ ^ Y ^ i Y i Y ^ ^ ^ ^ j Y j Y Y ij i j Y Y i Y Y j Y Y i Y j Y ^ eij Yij Y ij Yij Y i Y j Y r j 1 j 0 Analysis of Variance nb nb Block (Row) Sum of Squares: SSBL r Y i Y i 1 2 E MSBL 2 df BL nb 1 r i2 i 1 nb 1 r r Treatment (Column) Sum of Squares: SSTR nb Y j Y j 1 nb r 2 dfTR r 1 Error (Block Trt) Sum of Squares: SSBL.TR Yij Y i Y j Y i 1 j 1 df BL.TR nb 1 r 1 E MSTR 2 nb 2j j 1 r 1 2 E MSBL.TR 2 Testing for Treatment Effects (Rarely interested in Block Effects, Except to reduce Experimental Error): H 0 : 1 ... r 0 (No Treatment Differences) H A : Not all j 0 Test Statistic: F * ANOVA (RCBD) Source Blocks Treatments Error=Blks*Trts Total MSTR MSBL.TR Rejection Region: F * F 0.95; r 1, nb 1 r 1 df n_b-1 r-1 (n_b-1)(r-1) (n_b)r-1 SS SSBL SSTR SSBL.TR SSTO MS F* P-Value MSBL (Printed by Programs) (Printed by Programs) MSTR F*=MSTR/MSBL.TR P(F(r-1,(nb-1)(r-1))>F*) MSBL.TR RBD -- Non-Normal Data Friedman’s Test • When data are non-normal, test is based on ranks • Procedure to obtain test statistic: Rank r treatments within each block (1=smallest, r=largest) adjusting for ties Compute rank sums for treatments (R•j ) across blocks H0: The r populations are identical HA: Differences exist among the r group means 12 r 2 T .S . : X R 3nb ( r 1) j 1 j nb r ( r 1) 2 F R.R. : X 2 F 2 , r 1 P val : P ( X ) 2 2 F Checking Model Assumptions • Strip plots of residuals versus blocks (equal variance among blocks – all blocks received all treatments) • Plots of residuals versus fitted values (and treatments – equal variances) • Plot of residuals versus time order (in many lab experiments, blocks are days – independent errors) • Block-treatment interactions – Tukey’s test for additivity Comparing Treatment Effects (All Pairs) Tukey's Method: HSD jj ' q 1 ; r , nb 1 r 1 MSBL.TR nb Conclude j j ' if Y j Y j ' HSD jj ' Simultaneous Confidence Intervals: Y j Y j ' HSD jj ' Bonferroni's Method: r ( r 1) / 2 # of Pairs of Treatment Means 2MSBL.TR BSD jj ' t 1 ; r (r 1) / 2; nb 1 r 1 nb 2 Conclude j j ' if Y j Y j ' BSD jj ' Simultaneous Confidence Intervals: Y j Y j ' BSD jj ' Extensions of RCBD • Can have more than one blocking variable Gender/Age among Human Subjects Region/Size among cities Observer/Day among Reviewers (Note: Observers are really subjects, same individual) • Can have more than one replicate per block, but prefer to have equal treatment exposure per block • Can have factorial structures run in blocks (usual breakdown of treatment SS). Problems with many treatments (non-homogeneous blocks). Main Effects Interaction Effects Relative Efficiency • Measures the ratio of the experimental error variance for the Completely Randomized Design (r2) to that for the Randomized Block Design (b2) • Computed from the Mean Squares for Blocks and Error • Represents how many observations would be needed per treatment in CRD to have comparable precision in estimating means (standard errors) as the RBD r2 E 2 b sr2 nb 1 MSBL nb r 1 MSBL.TR E 2 sb nb r 1 MSBL.TR ^ Sometimes the efficiency is modified to reflect differences in Error df: ^ ' E df 2 1 df1 3 ^ E df 2 3 df1 2 where df1 df CRD r nb 1 and df 2 df RBD r 1 nb 1 Repeated Measures Design • Subjects (people, cities, supermarkets, etc) are selected at random, and assigned to receive each treatment (in random order) • Unlike block effects, which were treated as fixed, subject effects are random variables (since the subjects were selected at random) • Measurements on subjects are correlated, however conditional on a subject being selected, they are independent (no carry-over effects or order effects) • The analysis is conducted in a similar manner to Randomized Complete Block Design Repeated Measures Design – Model Subjects Randomly Selected and Assigned to Each Treatment: Random Effects Model: Yij i j ij i 1,..., s; j 1,..., r where overall mean i effect of i th subject (typically row effect) with: i ~ N 0, 2 independent r j effect of j treatment (typically column effect) with: j 0 th j 1 ij ~ N 0, 2 independent , independent Y , Y i i ' Y 2 Y , Y Yij ~ N j , 2 2 Yij , Yij ' 2 j j' 2 ij 2 Yij Yij ' 2 Yij 2 2 Y j Y j' 2 2 s i' j' 2 ij ' ij s2 Y j Y j' ij ' 2 MSTR.S s 2 2 2 2 2 2 2 s Y j Y j' 2 MSTR.S s Repeated Measures Design – ANOVA s Subjects Sum of Squares: SSS r Y i Y i 1 2 df S s 1 E MSS 2 r 2 r r Treatment Sum of Squares: SSTR s Y j Y j 1 2 dfTR r 1 s r E MSTR 2 Error (Subject by Treatment) Sum of Squares: SSTR.S Yij Y i Y j Y i 1 j 1 dfTR.S r 1 s 1 j 1 r 1 2 E MSTR.S 2 Within Subjects Sum of Squares: SSW Yij Y i Testing for Treatment Effects: H 0 : 1 ... r 0 H A : Not all i 0 s r i 1 j 1 Test Statistic: F * s 2j MSTR MSTR.S ^ Relative Efficiency: E 2 SSTR SSTR.S Rejection Region: F * F 1 ; r 1, r 1 s 1 s 1 MSS s r 1 MSTR.S sr 1 MSTR.S ^ Completely Randomized Design needs n s E replicates per treatment for same s Y j Y j ' Comparing Treatment Effects (All Pairs) Tukey's Method: HSD jj ' q 1 ; r , r 1 s 1 MSTR.S s Conclude j j ' if Y j Y j ' HSD jj ' Simultaneous Confidence Intervals: Y j Y j ' HSD jj ' Bonferroni's Method: r ( r 1) / 2 # of Pairs of Treatment Means 2 MSTR.S BSD jj ' t 1 ; r (r 1) / 2; r 1 s 1 s 2 Conclude j j ' if Y j Y j ' BSD jj ' Simultaneous Confidence Intervals: Y j Y j ' BSD jj ' Within-Subject Variance-Covariance Matrix Common Assumptions for the Repeated Measures ANOVA • Variances of measurements for each treatment are equal: 12 ... r2 • Covariances of measurements for each pair treatments are the same Note: These will not hold exactly for sample data, should give a feel if reasonable Population Structure 1r 2 jj ' 2 r jj ' 2 12 12 2 2 21 r1 r 2 2 r Y s where: s 2j i 1 Sample Structure ij Y j s 1 jj ' jj ' jj ' jj ' 2 Y s 2 s jj ' s12 ^ s 21 sr1 i 1 ij Y j Yij ' Y j ' s 1 s12 s22 sr 2 s1r s2 r 2 sr