Analysis of Variance Methods

experimental design and the analysis of variance n.w
1 / 108
Embed
Share

Explore Experimental Design, ANOVA, and Variance Analysis techniques for comparing multiple groups, identifying sources of variation, and testing hypotheses about group means in controlled experiments and observational studies.

  • Analysis of Variance
  • Experimental Design
  • ANOVA
  • Variance Analysis
  • Statistical Methods

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Experimental Design and the Analysis of Variance

  2. Comparing t > 2 Groups - Numeric Responses Extension of Methods used to Compare 2 Groups Independent Samples and Paired Data Designs Normal and non-normal data distributions Data Design Normal Non- normal Independent Samples (CRD) Paired Data (RBD) F-Test 1-Way ANOVA F-Test 2-Way ANOVA Kruskal- Wallis Test Friedman s Test

  3. Completely Randomized Design (CRD) Controlled Experiments - Subjects assigned at random to one of the t treatments to be compared Observational Studies - Subjects are sampled from t existing groups Statistical model yijis measurement from the jthsubject from group i: = + + = + ij y i ij i ij where is the overall mean, i is the effect of treatment i , ij is a random error, and i is the population mean for group i

  4. 1-Way ANOVA for Normal Data (CRD) For each group obtain the mean, standard deviation, and sample size: j i s n j 2 ( ) y y y ij ij . i = = y i . 1 n i i Obtain the overall mean and sample size y + + ... n y n y ij i j = + + = = 1 t . 1 . ... t N n n y 1 t .. N N

  5. Analysis of Variance - Sums of Squares Total Variation t n = = 2 1( = ) 1 TSS y y df N i .. ij Total = 1 i j Between Group (Sample) Variation = i t n t = = = 2 2 ( ) ( ) 1 SST y y n y y df t i i T . .. . .. i i = = 1 1 1 j i Within Group (Sample) Variation = = 1 1 ( t n t = = = 2 2 ) ( ) 1 SSE y y n s df N t i ij i i E . i = 1 i j i = + = + TSS SST SSE df df df Total T E

  6. Analysis of Variance Table and F-Test Source of Variation Degrres of Freedom t-1 N-t N-1 Sum of Squares SST SSE TSS Mean Square MST=SST/(t-1) MSE=SSE/(N-t) F Treatments Error Total F=MST/MSE Assumption: All distributions normal with common variance H0: No differences among Group Means ( = = t =0) HA: Group means are not all equal (Not all i are 0) MST F S T = . : . obs MSE . : . val ( ) 9 R R F F Table , , 1 F obs t N t : ( ) P P F obs

  7. Expected Mean Squares Model: yij= + i+ ij with ij~ N(0, 2), niai= 0: ) ( = = t t 2 E MSE t i 2 i n = + 2 1 ( ) i E MST = i 1 i 2 i n t = i i 2 i n + 2 1 t ( ) E MST 1 = = + 1 1 ) 1 MST 2 2 ( ) ( E MSE t ( ) E = = = = When : 0 is true, 1 H 0 1 t ( ) E MSE ( ) E MST otherwise ( is a true), 1 H ( ) E MSE

  8. Expected Mean Squares 3 Factors effect magnitude of F-statistic (for fixed t) True group effects ( 1, , t) Group sample sizes (n1, ,nt) Within group variance ( 2) Fobs = MST/MSE When H0 is true ( 1= = t=0), E(MST)/E(MSE)=1 Marginal Effects of each factor (all other factors fixed) As spread in ( 1, , t) E(MST)/E(MSE) As (n1, ,nt) E(MST)/E(MSE) (when H0 false) As 2 E(MST)/E(MSE) (when H0 false)

  9. 0.09 0.09 0.08 0.08 0.07 0.07 0.06 0.06 0.05 0.05 0.04 0.04 ( ) E MST 0.03 0.03 0.02 0.02 0.01 0.01 ( ) E MSE 0 0 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200 A) =100, 1=-20, 2=0, 3=20, = 20 B) =100, 1=-20, 2=0, 3=20, = 5 n 4 8 12 20 A 9 17 25 41 B C 1.5 2 2.5 3.5 D 9 17 25 41 129 257 385 641 0.09 0.08 0.09 0.07 0.08 0.06 0.07 0.05 0.06 0.04 0.05 0.03 0.04 0.02 0.03 0.01 0.02 0 0.01 0 20 40 60 80 100 120 140 160 180 0 0 20 40 60 80 100 120 140 160 180 200 C) =100, 1=-5, 2=0, 3=5, = 20 D) =100, 1=-5, 2=0, 3=5, = 5

  10. Example - Seasonal Diet Patterns in Ravens Treatments - t= 4 seasons of year (3 replicates each) Winter: November, December, January Spring: February, March, April Summer: May, June, July Fall: August, September, October Response (Y) - Vegetation (percent of total pellet weight) Transformation (For approximate normality): Y = ' arcsin Y 100 Source: K.A. Engel and L.S. Young (1989). Spatial and Temporal Patterns in the Diet of Common Ravens in Southwestern Idaho, The Condor, 91:372-378

  11. Seasonal Diet Patterns in Ravens - Data/Means Y Winter(i=1) Fall(i=2) j=1 94.3 80.7 j=2 90.3 90.5 j=3 83.0 91.8 Summer(i=3) 80.5 74.3 32.4 Fall (i=4) 67.8 91.8 89.3 Y' j=1 j=2 j=3 . 1 Winter(i=1) 1.329721 1.254080 1.145808 329721 Fall(i=2) 1.115957 1.257474 1.280374 254080 . 1 + Summer(i=3) 1.113428 1.039152 0.605545 . 1 + Fall (i=4) 0.967390 1.280374 1.237554 145808 = 24203 . 1 = y . 1 3 . 1 + 280374 . 1 + 115957 . 1 257474 = . 1 = 217935 y . 2 3 039152 . 1 + 605545 . 0 + 113428 . 1 = = 919375 . 0 y . 3 3 280374 . 1 + . 1 + 967390 . 0 237554 = 16773 . 1 = y . 4 3 + . 1 + . 1 329721 ... 237554 = 135572 . 1 = y .. 12

  12. Seasonal Diet Patterns in Ravens - Data/Means Plot of Transformed Data by Season 1.500000 1.400000 1.300000 1.200000 Transformed % Vegetation 1.100000 1.000000 0.900000 0.800000 0.700000 0.600000 0.500000 0 1 2 3 4 5 Season

  13. Seasonal Diet Patterns in Ravens - ANOVA = = Total Variation = (df : 12 1 - 11) Total 135572 . 1 + + 135572 . 1 = 2 2 329721 . 1 ( ) ... = 27554 . 1 ( = ) 438425 . 0 TSS Between Group Variation (df : 1 - 4 + 3) T Group = 135572 . 1 + 135572 . 1 = 2 2 24203 . 1 ( 3 ) ... 161773 . 1 ( = ) 197387 . 0 SST = Within Variation : (df 12 - 4 8) E = 243203 . 1 + 237554 . 1 ( + 161773 . 1 = 2 2 329721 . 1 ( ) ... ) 241038 . 0 SSE ANOVA Source of Variation Between Groups Within Groups SS df 3 8 MS F P-value F crit 4.06618 0.197387 0.241038 0.065796 2.183752 0.167768 0.03013 Total 0.438425 11 Do not conclude that seasons differ with respect to vegetation intake

  14. Seasonal Diet Patterns in Ravens - Spreadsheet Month NOV DEC JAN FEB MAR APR MAY JUN JUL AUG SEP OCT Season 1 1 1 2 2 2 3 3 3 4 4 4 Y' Season MeanOverall Mean 1.243203 1.243203 1.243203 1.217935 1.217935 1.217935 0.919375 0.919375 0.919375 1.161773 1.161773 1.161773 TSS SST SSE 1.329721 1.254080 1.145808 1.115957 1.257474 1.280374 1.113428 1.039152 0.605545 0.967390 1.280374 1.237554 1.135572 1.135572 1.135572 1.135572 1.135572 1.135572 1.135572 1.135572 1.135572 1.135572 1.135572 1.135572 Sum 0.037694 0.014044 0.000105 0.000385 0.014860 0.020968 0.000490 0.009297 0.280928 0.028285 0.020968 0.010400 0.438425 0.011584 0.011584 0.011584 0.006784 0.006784 0.006784 0.046741 0.046741 0.046741 0.000687 0.000687 0.000687 0.197387 0.007485 0.000118 0.009486 0.010400 0.001563 0.003899 0.037657 0.014346 0.098489 0.037785 0.014066 0.005743 0.241038 Total SS Between Season SS Within Season SS (Y -Overall Mean)2 (Group Mean-Overall Mean)2(Y -Group Mean)2

  15. CRD with Non-Normal Data Kruskal-Wallis Test Extension of Wilcoxon Rank-Sum Test to t > 2 Groups Procedure: Rank the observations across groups from smallest (1) to largest ( N = n1+...+nt), adjusting for ties Compute the rank sums for each group: T1,...,Tt . Note that T1+...+Tt = N(N+1)/2

  16. Kruskal-Wallis Test H0: The t population distributions are identical (M1=...=Mt) HA: Not all t distributions are identical (Not all Mi are equal) 12 . .: ( 1) N N 2 T n t = + 3( 1) i T S H N + = 1 i i 2 . .: R R H , 1 t 2 : ( ) P val P H An adjustment to H is suggested when there are many ties in the data. Formula is given on page 344 of O&L.

  17. Example - Seasonal Diet Patterns in Ravens Month NOV DEC JAN FEB MAR APR MAY JUN JUL AUG SEP OCT Season 1 1 1 2 2 2 3 3 3 4 4 4 Y' Rank 12 8 6 5 9 10.5 4 3 1 2 10.5 7 1.329721 1.254080 1.145808 1.115957 1.257474 1.280374 1.113428 1.039152 0.605545 0.967390 1.280374 1.237554 T1 = 12+8+6 = 26 T2 = 5+9+10.5 = 24.5 T3 = 4+3+1 = 8 T4 = 2+10.5+7 = 19.5 : seasonal No difference Seasonal : Difference s H H 0 a 2 2 2 2 12 ( 26 ) ( 24 ) 5 . ) 8 ( 19 ( ) 5 . = + + + ( 3 ) 1 + = = . : . S 12 44 12 . 39 . 5 12 T H ) 1 + 12 12 ( 3 3 3 3 = = 2 05 . = . .( . 0 05 : ) . 7 815 R R H 4 , 1 = 2 value : ( . 5 12 ) 1632 . P P H

  18. Transformations for Constant Variance ( ) = = = + = 2 or 0.375 Used for Poisson Distribution 1 k y y y y k T T ( ) y ( ) = = = + 2 2 ln or ln 1 k y y y T T ( ) 1 n ^ ( ) = = = = 2 1 1 sin Used for Binomial Distrbution , k y y k y T Box-Cox Transformation: Power Transf and often constant variance ormation used to obtain normality 0 = y = y ( ) y T ln 0

  19. Welchs Test Unequal Variances n s t = = i w w w i i 2 i = 1 i 2 t w y i i 1 t 2 = = 1 i * F w y i i 1 t w = 1 i ( t ) 1 2 2 2 1 t 1 w w t = = + 1 1 i C m C W W W 2 1 n = 1 i i 1 3 approx ~ = = * C F m F F 1, W W W W t 2 1 t W

  20. Example Seasonal Diet Patterns in Ravens Season n_i s_i ybar_i s_i^2 w_i w_iyb_i w_iyb_i^2C_Wi 1 2 3 4 3 0.092438 1.243203 0.008545 3 0.089055 1.217935 0.007931 3 0.274311 0.919375 0.075246 39.86905 3 0.169696 1.161773 0.028797 104.1779 121.0311 140.6106 0.387837 873.4129 1054.877 = = = + = 1 3 1.1827 4.23 4 1 qf(.95,3,4.23) in R 351.091 436.4773 542.6298 0.178816 378.275 460.7145 561.1204 0.160688 36.6546 33.69932 0.455394 Sum 1278.06 1.182735 2 t w y ( ) 2 i i 1054.877 873.4129 1 1 t 2 = = = 1 i * 1278.06 1.3390 F w y i i 1 4 1 t w = 1 i 2 1 w w t = 1 1 1.1827 i C W 1 n = 1 i i ( t ) ( 4 ) 1 2 2 1 2 4 2 t = + 1 1 1.1827 0.7602 m C W W 2 2 1 1 3 = = = = = = = * 0.7602(1.3390) 1.0179 C F m F W W W W 2 2 1 6.4231 t ( ) 0.05,3,4.23 F

  21. Linear Contrasts Linear functions of the treatment means (population and sample) such that the coefficients sum to 0. Used to compare groups or pairs of treatment means, based on research question(s) of interest t t = + + = where = Population Contrast: ... 0 l a a a a 1 1 t t i i i = = 1 1 i i t ^ l = + + = Estimated Contrast: ... a y a y a y 1 1 t i t i = 1 i MSE n 2 i 2 i 2 i 2 2 a n a n a n t t t ^ ^ ^ ^ ^ = + + = = = 2 1 2 t 2 ... V l a a V l MSE SE l MSE n n = = = 1 1 1 i i i 1 t i i i t t MSE n ^ ^ ^ ^ = = = = = 2 i 2 i ... n n n V l a SE l a 1 t = = 1 1 i i

  22. Orthogonal Contrasts & Sums of Squares t t t t = = = = Two Contrasts: 0 l a l b a b 1 2 i i i i i i = = = = 1 1 1 1 i i i i ab t t = = , are orthogonal if: l l 0 for balanced data, 0 i i n ab 1 2 i i = = 1 1 i i i 2 2 2 t t ^ l ^ a y n l i i = = = = 1 i Contrast Sum of Squares: for balanced data, SSC SSC 2 i 2 i t t a n a n 2 i a = 1 = = i 1 1 i i i i Among treatments, we can obtain Then, we can decompose the Between Treatment Sum of Squares into the ... where each of the Contrast Sums of Squares has 1 degree of freedom For any contrast: Testing : 0 : k k Ak k H l H l = 1 pairwise orthogonal Contrasts: ,..., t t l l 1 1 t Contrasts: = + + SST SSC SSC 1 1 t 0 0 ^ l SSC MSE k = = F-Test: : : t-Test: :| | k TS F RR F F t RR t t N t N t ,1, /2; k k k k ^ ^ l SE k

  23. Simultaneous Tests of Multiple Contrasts Using m contrasts for comparisons among t treatments Each contrast to be tested at significance level, which we label as I for individual comparison Type I error rate Probability of making at least one false rejection of one of the m null hypotheses is the experimentwise Type I error rate, which we label as E Tests are not independent unless the error (Within Group) degrees are infinite, however Bonferroni inequality implies that E m I Choose I = E / m

  24. Scheffes Method for All Contrasts Can be used for any number of contrasts, even those suggested by data. Conservative (Wide CI s, Low Power) t t = = . . 0 l a st a i i i = = 1 1 i i 2 i a n t t ^ l ^ ^ = = a y SE l MSE i i = = 1 1 i i i t t = = = : 0 : 0 H l a H l a 0 i i A i i = = 1 1 i i ^ l ^ ^ = = = Reject if ( 1) 1, H SE l t F df t df df N t 0 , , 1 2 df df Error 1 2 E ^ l SE l ^ ^ ( ) Simultaneous 1 100% Confidence Intervals: ( 1) t Edf df F , , 1 2

  25. Post-hoc Comparisons of Treatments If differences in group means are determined from the F- test, researchers want to compare pairs of groups. Three popular methods include: Fisher s LSD - Upon rejecting the null hypothesis of no differences in group means, LSD method is equivalent to doing pairwise comparisons among all pairs of groups as in Chapter 6. Tukey s Method - Specifically compares all t(t-1)/2 pairs of groups. Utilizes a special table (Table 11, p. 701). Bonferroni s Method - Adjusts individual comparison error rates so that all conclusions will be correct at desired confidence/significance level. Any number of comparisons can be made. Very general approach can be applied to any inferential problem

  26. Fishers Least Significant Difference Procedure Protected Version is to only apply method after significant result in overall F-test For each pair of groups, compute the least significant difference (LSD) that the sample means need to differ by to conclude the population means are not equal 1 n 1 n = + = with df LSD t MSE N t /2 ij i j Conclude if y y LSD . . i j ij i j

  27. Tukeys W Procedure More conservative than Fisher s LSD (minimum significant difference and confidence interval width are higher). Derived so that the probability that at least one false difference is detected is (experimentwise error rate) MSE n = = ( , ) given in Table 11, p. 701 with W q t q N -t ij Conclude if y y W . . i j ij i j ( ) Tukey's Confidence Interval: y y W . . ij i j ( , ) 2 1 n 1 n q t = + When the sample sizes are unequal, use W MSE ij i j

  28. Bonferronis Method (Most General) Wish to make C comparisons of pairs of groups with simultaneous confidence intervals or 2-sided tests When all pair of treatments are to be compared, C = t(t-1)/2 Want the overall confidence level for all intervals to be correct to be 95% or the overall type I error rate for all tests to be 0.05 For confidence intervals, construct (1-(0.05/C))100% CIs for the difference in each pair of group means (wider than 95% CIs) Conduct each test at =0.05/C significance level (rejection region cut-offs more extreme than when =0.05) Critical t-values are given in table on class website, we will use notation: t /2,C, where C=#Comparisons, = df

  29. Bonferronis Method (Most General) 1 1 = + B t MSE , 2 / , ij C v n n i j = given ( on class website with ) t v N-t Conclude if y y B i j ij . . i j ( ) Bonferroni Confidence s ' Interval : y y B ij . . i j

  30. Example - Seasonal Diet Patterns in Ravens Note: No differences were found, these calculations are only for demonstration purposes = = = = = . 0 03013 3 . 2 306 . 4 53 . 3 479 MSE n 025 . t q 025 . t , 4 = = , 6 = = 8 , 05 . , 8 , 8 i t df C df E E 1 1 = + = . 2 306 . 0 ( 03013 ) 3268 . 0 LSD ij 3 3 1 = = . 4 53 . 0 ( 03013 ) . 0 4540 W ij 3 1 1 = + = . 3 479 . 0 ( 03013 ) 4930 . 0 B ij 3 3 Comparison(i vs j) Group i MeanGroup j MeanDifference 1 vs 2 1.243203 1 vs 3 1.243203 1 vs 4 1.243203 2 vs 3 1.217935 2 vs 4 1.217935 3 vs 4 0.919375 1.217935 0.919375 1.161773 0.919375 1.161773 1.161773 0.025267 0.323828 0.081430 0.298560 0.056162 -0.242398

  31. Randomized Block Design (RBD) t > 2 Treatments (groups) to be compared b Blocks of homogeneous units aresampled. Blocks can be individual subjects. Blocks are made up of t subunits Subunits within a block receive one treatment. When subjects are blocks, receive treatments in random order. Outcome when Treatment i is assigned to Block j is labeled Yij Effect of Trt i is labeled i Effect of Block j is labeled j Random error term is labeled ij Efficiency gain from removing block-to-block variability from experimental error

  32. Randomized Complete Block Designs = + + + = + + Y ij i j ij i j ij t = = = 2 0 ( ) 0 ( ) E V i ij ij = 1 i Note: 1 b 1 b ( ) ( ) = + + = + + + + + + + + = ... ... Y Y Y 1 11 1 1 1 11 1 1 b b b = + = + + 1 1 + + + Y 2 2 2 ( ) ( ) ( ) ( ) = + + + + + + = + Y Y 1 2 1 2 1 2 1 2 1 2 Test for differences among treatment effects: H0: 1 = = t = 0 ( 1 = = t ) HA: Not all i = 0 (Not all i are equal)

  33. RBD - ANOVA F-Test (Normal Data) Data Structure: (t Treatments, b Blocks) . iy Mean for Treatment i: Mean for Subject (Block) j: y. j Overall Mean: ..y Overall sample size: N = bt ANOVA:Treatment, Block, and Error Sums of Squares ( ) ( ) ( ) ( ) . . .. 1 1 i j = = 2 t b = = 1 TSS y y df bt .. ij Total = = 1 1 i j 2 t = = 1 SST b y y df t . .. T i = 1 i 2 b = = 1 SSB t y y df b . .. B j = 1 j 2 t b = + = = ( 1)( 1) SSE y y y y TSS SST SSB df b t ij E i j t 2 i b = = + 2 2 = 1 1 i E MSE E MST t

  34. RBD - ANOVA F-Test (Normal Data) ANOVA Table: F Source SS SST SSB SSE TSS df t-1 b-1 MS Treatments Blocks Error Total MST = SST/(t-1) MSB = SSB/(b-1) MSE = SSE/[(b-1)(t-1)] F = MST/MSE (b-1)(t-1) bt-1 H0: 1 = = t = 0 ( 1 = = t ) HA: Not all i = 0 (Not all i are equal) MST = . : . S T F obs MSE . : . val R R F F , ( , 1 F 1 )( 1 ) obs t b t : ( ) P P F obs

  35. Pairwise Comparison of Treatment Means Tukey s Method- q in Studentized Range Table with = (b-1)(t-1) MSE = ( , ) W q t v ij b Conclude if y y W i j ij . . i j ( ) Tukey' Confidence s Interval : y y W ij . . i j Bonferroni s Method - t-values from table on class website with = (b-1)(t-1) and C=t(t-1)/2 2 MSE = B t , 2 / , ij C v b Conclude if y y B i j ij . . i j ( ) Bonferroni Confidence s ' Interval : y y B ij . . i j

  36. Expected Mean Squares / Relative Efficiency Expected Mean Squares: As with CRD, the Expected Mean Squares for Treatment and Error are functions of the sample sizes (b, the number of blocks), the true treatment effects ( 1, , t) and the variance of the random error terms ( 2) By assigning all treatments to units within blocks, error variance is (much) smaller for RBD than CRD (which combines block variation&random error into error term) Relative Efficiency of RBD to CRD (how many times as many replicates would be needed for CRD to have as precise of estimates of treatment means as RBD does): ) 1 + ) 1 ( ( MSE b MSB b t MSE = = ( , ) CR RE RCB CR ) 1 bt ( MSE MSE RCB

  37. Example - Caffeine and Endurance Treatments: t=4 Doses of Caffeine: 0, 5, 9, 13 mg Blocks: b=9 Well-conditioned cyclists Response: yij=Minutes to exhaustion for cyclist j @ dose i Data: Dose \ Subject 1 2 3 4 5 6 7 8 9 0 5 9 13 36.05 42.47 51.50 37.55 52.47 85.15 65.00 59.30 56.55 63.20 73.10 79.12 45.20 52.10 64.40 58.33 35.25 66.20 57.45 70.54 66.38 73.25 76.49 69.47 40.57 44.50 40.55 46.48 57.15 57.17 66.47 66.35 28.34 35.05 33.17 36.20

  38. Plot of Y versus Subject by Dose 90.00 80.00 70.00 60.00 Time to Exhaustion 50.00 0 mg 5 mg 9mg 13 mg 40.00 30.00 20.00 10.00 0.00 0 1 2 3 4 5 6 7 8 9 10 Cyclist

  39. Example - Caffeine and Endurance Subject\Dose 0mg 36.05 52.47 56.55 45.20 35.25 66.38 40.57 57.15 28.34 46.44 -8.80 77.38 5mg 42.47 85.15 63.20 52.10 66.20 73.25 44.50 57.17 35.05 57.68 2.44 5.95 9mg 51.50 65.00 73.10 64.40 57.45 76.49 40.55 66.47 33.17 58.68 3.44 11.86 13mg 37.55 59.30 79.12 58.33 70.54 69.47 46.48 66.35 36.20 58.15 2.91 8.48 Subj Mean Subj Dev Sqr Dev 41.89 -13.34 65.48 10.24 67.99 12.76 55.01 -0.23 57.36 2.12 71.40 16.16 43.03 -12.21 61.79 6.55 33.19 -22.05 55.24 1 2 3 4 5 6 7 8 9 178.07 104.93 162.71 0.05 4.51 261.17 149.12 42.88 486.06 1389.50 Dose Mean Dose Dev Squared Dev 103.68 TSS 7752.773 = + + = = = 2 2 36 ( 05 . 55 24 . ) 36 ( + 20 . 55 24 . ) 7752 = 773 . ) 9 ( 4 1 35 TSS df Total 36 ( SST = + = = = 2 2 9 ( 46 44 . 55 24 . ) 58 ( 15 . 55 24 . ) ( 9 103 68 . ) 933 = 12 . 4 1 3 SST df T = + + = = = 2 2 4 ( 41 89 . 55 24 . ) 33 ( 19 . 55 + 24 . + ) 1389 ( 4 50 . ) 5558 00 . + 9 1 8 SSB df B = + = 2 2 05 . 41 SSB 89 . = 46 44 . 55 24 . ) 36 ( 20 . = 33 19 . 58 df 15 . = 55 24 . ) SSE = ) 1 = 7752 773 . 933 12 . 5558 1261 653 . 4 ( 1 )( 9 24 TSS E

  40. Example - Caffeine and Endurance Source Dose Cyclist Error Total H df 3 8 24 35 SS MS F 933.12 5558.00 1261.65 7752.77 ( 311.04 694.75 52.57 5.92 = = = : Caffeine No Dose Effect ) 0 0 1 4 Difference : Exist s Among Doses H A 311 04 . MST = = = . : . S . 5 92 T F obs 52 57 . F MSE = = . .( 0.05) P : . 3 01 R R F 05 . = , 3 , 24 obs value : ( . 5 92 ) 0036 . (From EXCEL) P F Conclude that true means are not all equal

  41. Example - Caffeine and Endurance 1 = = = Tukey' s : . 3 90 . 3 90 52 57 . . 9 43 W q W 05 . , 4 , 24 9 2 = = = Bonferroni B s ' : . 2 875 . 2 875 52 57 . . 9 83 05 . t B , 6 , 2 / 24 9 Doses 5mg vs 0mg 9mg vs 0mg 13mg vs 0mg 9mg vs 5mg 13mg vs 5mg 13mg vs 9mg High Mean 57.6767 58.6811 58.1489 58.6811 58.1489 58.1489 Low Mean Difference Conclude 46.4400 11.2367 46.4400 12.2411 46.4400 11.7089 57.6767 1.0044 57.6767 0.4722 58.6811 -0.5322 5 0 5 0 9 0 9 0 3 0 3 0 NSD NSD NSD

  42. Example - Caffeine and Endurance Relative = t Efficiency = of = Randomized Block to = MSE Completely Randomized Design : 4 9 694 MSB 75 . 52 57 . b MSB MSE ) 1 + ) 1 3 ( 9 + ( ( ( 8 694 75 . ) )( 52 57 . ) 6977 39 . b b t = = = = ( , ) . 3 79 RE RCB CR ) 1 ( ) 4 ( 9 ( 1 )( 52 57 . ) 1839 95 . bt MSE Would have needed 3.79 times as many cyclists per dose to have the same precision on the estimates of mean endurance time. 9(3.79) 35 cyclists per dose 4(35) = 140 total cyclists

  43. RBD -- Non-Normal Data Friedman s Test When data are non-normal, test is based on ranks Procedure to obtain test statistic: Rank the t treatments within each block (1=smallest, t=largest) adjusting for ties Compute rank sums for treatments (Ti) across blocks H0: The t populations are identical (M1=...=Mt) HA: Differences exist among the t group medians 12 ( t = + 2 . .: T S F 3 ( b t 1) T r i + = 1) bt t 1 i 2 . .: R R F , 1 r t P val P 2 : ( ) F r

  44. Example - Caffeine and Endurance Subject\Dose 1 2 3 4 5 6 7 8 9 0mg 36.05 52.47 56.55 45.2 35.25 66.38 40.57 57.15 28.34 5mg 42.47 85.15 63.2 52.1 66.2 73.25 44.5 57.17 35.05 9mg 51.5 65 73.1 64.4 57.45 76.49 40.55 66.47 33.17 13mg 37.55 59.3 79.12 58.33 70.54 69.47 46.48 66.35 36.2 Ranks 0mg 1 1 1 1 1 1 2 1 1 10 5mg 3 4 2 2 3 3 3 2 3 25 9mg 4 3 3 4 2 4 1 4 2 27 13mg 2 2 4 3 4 2 4 3 4 28 Total : No Dose Differences : Dose Differences Exist 12 . .: 9(4)(4 1) . .( 0.05): R R = H H 0 a 26856 180 = + + + = 135 14.2 = 2 2 (10) (28) 3(9)(4 1) T S F r + = 2 .05,4 1 .0026 (From EXCEL) = are not all equal 7.815 F r 2 -value: ( Conclude Medians 14.2) P P

  45. Latin Square Design Design used to compare t treatments when there are two sources of extraneous variation (types of blocks), each observed at t levels Best suited for analyses when t 10 Classic Example: Car Tire Comparison Treatments: 4 Brands of tires (A,B,C,D) Extraneous Source 1: Car (1,2,3,4) Extraneous Source 2: Position (Driver Front, Passenger Front, Driver Rear, Passenger Rear) Car\Position 1 2 3 4 DF A B C D PF B C D A DR C D A B PR D A B C

  46. Latin Square Design - Model Model (t treatments, rows, columns, N=t2) : = + + + + y ijk k i j ijk ^ = Overall Mean y ... ^ = Effect of Treatment k y y k k .. ... k ^ = Effect due to row i y y i .. ... i i ^ = Effect due to Column j y y j . . j ... j Random Error Term ijk

  47. Latin Square Design - ANOVA & F-Test ( ) 2 t t = i = = 2 Total Sum of Squares : 1 TSS y y df t ijk ... = 1 1 j ( ) 2 t = k = = Treatment Sum of Squares 1 SST t y y df t T .. ... k 1 ( ) 2 t = i = = Row Sum of Squares 1 SSR t y y df t R .. ... i 1 ( ) 2 t = j = = Column Sum of Squares 1 SSC t y y df t C . . ... j 1 = = ) 1 ( 3 ) 1 = 2 Error Sum of Squares ( ( 1 )( ) 2 SSE TSS SST SSR SSC df t t t t E H0: 1= = t = 0 Ha: Not all k = 0 TS: Fobs = MST/MSE = (SST/(t-1))/(SSE/((t-1)(t-2))) RR: Fobs F , t-1, (t-1)(t-2)

  48. Pairwise Comparison of Treatment Means Tukey s Method- q in Studentized Range Table with = (t-1)(t-2) MSE = ( , ) W q t v ij t Conclude if y y W i j ij . . i j ( ) Tukey' Confidence s Interval : y y W ij . . i j Bonferroni s Method - t-values from table on class website with = (t-1)(t-2) and C=t(t-1)/2 2 MSE = B t , 2 / , ij C v t Conclude if y y B i j ij . . i j ( ) Bonferroni Confidence s ' Interval : y y B ij . . i j

  49. Expected Mean Squares / Relative Efficiency Expected Mean Squares: As with CRD, the Expected Mean Squares for Treatment and Error are functions of the sample sizes (t, the number of blocks), the true treatment effects ( 1, , t) and the variance of the random error terms ( 2) By assigning all treatments to units within blocks, error variance is (much) smaller for LS than CRD (which combines block variation&random error into error term) Relative Efficiency of LS to CRD (how many times as many replicates would be needed for CRD to have as precise of estimates of treatment means as LS does): + + ) 1 ( MSE MSR MSC ( + t MSE = = ( , ) CR RE LS CR ) 1 MSE t MSE LS

  50. Power Approach to Sample Size Choice R Code When the means are not all equal, the -statistic is non-central : F F t t ( ) 2 n n i i i i ( ) = = * = = 1 1 ~ 1, , where where i i F F t N t 2 N t t ( ) 2 n i i = = = = 1 1 When all sample sizes are equal: where i i 2 t T he power of the test, when conducted at the significance level of : ( ) ( ) * * Pr 1 ; 1, | ~ 1, , F F t N t F F t N t In R: F ( ) = 1 ; 1, (1 , 1, ) t N t qf t N t ( ) = Power = 1 1 (1 , 1, ), 1, , pf qf t N t t N t

Related


More Related Content