Descriptions of post-hoc tests

Size: px
Start display at page:

Download "Descriptions of post-hoc tests"

Transcription

1 Experimental Statistics II Page 81 Descriptions of post-hoc tests Post-hoc or Post-ANOVA tests! Once you have found out some treatment(s) are different, how do you determine which one(s) are different? For the moment we will be concerned only with examining for differences among the treatment levels. We will assume that we have already detected a significant difference among treatments levels with ANOVA. So, having rejected the Null hypothesis we wish to determine how the treatment levels interrelate. This is the post-anova part of the analysis. These tests fall into two general categories. Post hoc tests (LSD, Tukey, Scheffé, Duncan's, Dunnett's, etc.) A priori tests or pre-planned comparisons (contrasts) A priori tests are better. These are tests that the researcher plans on doing before they gather data, and if we dedicate 1 d.f. to each one we generally feel comfortable doing each at some specified level of alpha. However, since multiple tests do entail risks of higher experiment wide error rates, it would not be unreasonable to apply some technique, like Bonferroni's adjustment, to insure an experimentwise error rate of the desired level of alpha ( ). So how might we do these post hoc tests? The simplest approach would be to do pairwise test of the treatments using something like the two-sample t-test. If you are interested in testing between treatment level means, then you probably have fixed effects. If the levels were randomly selected from a large number of possible choices we would probably not be interested in the individual levels chosen. This tests examines the null hypothesis H 0 : or H 0 : 0, against the alternative H 0 : 0 or H 0 : 0 or H 0 : 0. Recall two things about the two-sample t-test. First, in a t-test we had to determine if the variance was equal for the two populations tested. We tested H : with an F test to determine if this was the case Second, the variance of the test (variance of the difference between 1 and 2) was equal to 2 2. This is a variance for the linear combination from our null hypothesis, that is, the n n variance of is ( 1), if the variables are independent. If the variance are equal (as they are often assume to be for ANOVA) then the variance is We estimate 2 with the mean square error (MSE). n n

2 Experimental Statistics II Page 82 Y1 Y2 So, we would test each pair of means using the two sample t-test as t S n n p( ). For ( Y1 Y2 ) ANOVA, using the MSE as our variance estimate, we have t. If the design 1 1 MSE n n ( Y1 Y2 ) is balanced this simplifies this to t. 2MSE n Notice that if the calculated value of t is greater than the tabular value of t, we would reject the null hypothesis. To the contrary, if the calculated value of t is less than the tabular value we would fail to reject. ( Y Call the tabular value t*, and write the case for rejection of H 0 as 1 Y2 ) t. 2MSE n ( Y So we would reject H 0 if 1 Y2 ) t ( Y 2 1 Y2 ) t MSE n. or if t 2 MSE 2MSE ( Y Y n ) n or So, for any difference ( Y1 Y 2) that is greater than t 2MSE n we find the difference between the means to be statistically significant (reject H 0 ), and for any value less than this value we find the difference to be consistent with the null hypothesis. Right? This value of t 2MSE n is what R. A. Fisher called the Least Significant Difference, commonly called the LSD (not to be confused with the Latin Square Design = LSD). 1 1 LSD tcritical MSE( n n ) or LSD tcriticals Y1 Y2 This value is the exact width of an interval Y1 Y 2 which would give a t-test equal to t critical. Any larger values would be significant and any smaller values would not. This is called the Least Significant Difference. LSD t S critical Y1 Y2 We calculate this value for each pair of differences and if the observed difference is less, the treatments are not significantly different. If greater they are significantly different. One last detail. I have used the simpler version of the variance assuming that n 1 = n 2. If the experiment is unbalanced (i.e. there are unequal numbers of observations in the treatment 1 1 levels) then the value is MSE. n n

3 Experimental Statistics II Page 83 The property of balance is nice because all of the pairwise tests have the same sample sizes and the same standard error. However, balance is not necessary. For an 1 1 unbalanced design we must calculate the standard error ( MSE ) for each n n pairwise test because they will be different. This is the first of our post ANOVA tests, it is called the LSD. But hey, wait a minute! Didn't Fisher invent ANOVA in the first place to avoid doing a bunch of separate t-tests? So, now we are doing a bunch of separate t-tests. What is wrong with this picture? So, this is Fishers solution. When we do a bunch of separate t-tests, we don't know if there are any real differences at the level. After we do the ANOVA test we know that there are some differences. So we only do the LSD if the ANOVA says that there are actually differences, otherwise, don't do the LSD. This is called Fisher's Protected LSD: we use the LSD ONLY if the ANOVA shows differences, otherwise we are NOT justified in using the LSD. Makes sense. But there were still a lot of nervous statisticians looking for something a little better. As a result there are MANY alternative calculations. We will discuss the classic solutions. This least significant difference calculation can be used to either do pairwise tests on observed differences or to place a confidence interval on observed differences. The LSD can be done in SAS in one of two ways. The MEANS statement produces a range test (LINES option) or confidence intervals (CLDIFF option), while the LSMEANS statement gives pairwise comparisons. Other Post ANOVA tests Basically, we calculate the LSD with our chosen value of. We then do our mean comparisons. Each test has a pairwise error rate of. We have already seen one alternative, the Bonferroni adjustment. If we do 5 tests, or 10 tests, our error rate is no more than 5( /2) or 10( /2). Generally, for g tests our error rate is no more than g( /2). To keep an experiment wide error rate of, we simply do each comparison using a t value for an a equal to /2g. For two tailed tests (which are the most common) we do each test at /2 and the Bonferroni test would use a t for an error rate of Dunnetts test discussed below.. One tailed tests are possible, but usually only done with 2g The Bonferroni adjustment is fine if we are only doing a few tests. However, it is an upper boundary of the error, the highest that the error can be. The real probability of error is actually less, perhaps much less. So if we are doing very many tests, Bonferroni gets very conservative, giving us an actual error rate much lower than the we really want. So we seek alternatives. The major applications are Tukey's and Scheffé's. We will also consider Dunnett's and Duncan's since they are fairly commonly. Each of the tests is discussed below.

4 Experimental Statistics II Page 84 The LSD has an probability of error on each and every test or for each comparison. It is called to as a comparisonwise error rate. The whole idea of ANOVA is to give a probability of error that is for the whole experiment, so, much work in statistics has been dedicated to this problem. Some of the most common and popular alternatives are discussed below. Most of these are also discussed in your textbook. The LSD is the LEAST conservative of those discussed, meaning it is the one most likely to detect a difference and it is also the one most likely to make a Type I error when it finds a difference. However, since it is unlikely to miss a difference that is real, it is also the most powerful. The probability distribution used to produce the LSD is the t distribution. Bonferroni's adjustment. Bonferroni pointed out that in doing k tests, each at a probability of Type I error equal to, the overall experimentwise probability of Type I error will be NO MORE than k*, where k is the number of tests. Therefore, if we do 7 tests, each at =0.05, the overall rate of error will be NO MORE than =0.35, or 35%. So, if we want to do 7 tests and keep an error rate of 5% overall, we can do each individual test at a rate of /k = 0.05/7 = For the 7 tests we have an overall rate of 7* = The probability distribution used to produce the LSD is the t distribution. Duncan's multiple range test. This test is intended to give groupings of means that are not significantly different among themselves. The error rate is for each group, and has sometimes been called a familywise error rate. This is done in a manner similar to Bonferroni, except the calculation used to calculate the error rate is [1(1 ) r1 ] instead of the sum of. For comparing two means that are r steps apart, where for adjacent means r=2. Two means separated by 3 other means would have r = 5, and the error rate would be [1(1 ) r1 ] = [1(1 0.05) 4 ] = The value of a needed to keep an error rate of is the reverse of this calculation, [1(10.05) 1/4 ] = The Student-Neuman-Keuls test The value of is calculated as similar test to Duncans, controlling the familywise error rate. 1 1 r /2. It is Tukey's adjustment. This test seems to be most appropriate in most cases since it keeps an error rate for all possible pairwise tests for the whole experiment, which is often what an investigator wants to do. This test basically allows for all pairwise tests and keeps an experimentwise error rate of for all pairwise tests. The Tukey adjustment allows for, Tukey developed his own tables (see Appendix table A.7 in your book, Percentage points of the studentized range). For t treatments and a given error degrees of freedom the table will provide 5% and 1% error rates that give an experimentwise rate of Type I error. Note SAS puts HSD by Tukey's. This stands for Honest Significant Difference. Scheffé's adjustment This test is the most conservative. It allows the investigator to do all possible tests, and still maintain an experimentwise error rate of. All possible tests includes not only all pairwise tests, but comparisons of all possible combinations of treatments with other combinations of treatments (e.g. H 0 : 2 3, CONTRASTS will be covered later). The calculation is based on a square root of the F distribution, and can be used for range type tests or confidence intervals. The test is more general than the others mentioned, for the special case of pairwise comparisons.

5 Experimental Statistics II Page 85 The critical value for Scheffés test is based on the F distribution. The statistic is given by t 1 *F t 1, n(t 1) for a balanced design with t treatments and n observations per treatment. This test is appropriate for data dredging. Place the post-hoc tests above in order from the one most likely to detect a difference (and the one most likely to be wrong) to the one least likely to detect a difference (and the one least likely to be wrong). LSD is first, followed by Duncan's test, Tukey's and finally Scheffé's. Dunnett's is a special test that is similar to Tukey's, but for a specific purpose, so it does not fit well in the ranking. The Bonferroni approach produces an upper bound on the error rate, so it is conservative for a given number of tests. It is a useful approach if you want to do a few tests, fewer than allowed by one of the others (e.g. you may want to do just a few and not all possible pairwise). In this case, the Bonferroni may be better. Note that if you want to do a couple of pairwise tests you can calculate Bonferroni and compare the critical value to Tukey's. Tukey's is for all pairwise tests and would be conservative for fewer than all pairwise tests. Bonferroni may be overly conservative because it is a bound. For other sets of tests including some that are not pairwise, compare Bonferroni to Scheffé. Post ANOVA test comparison Comparisonwise error rate: LSD Experimentwise error rate: Tukey (all pairwise), Bonferroni (selected tests), Scheffé (all possible contrasts). When doing pairwise tests, the LSD is the test most likely to find differences, and the one most likely to be wrong when it finds a difference. However, power is the ability to find differences, so although error prone in the type I error sense, the LSD is the most powerful of the tests. Scheffé is the test least likely to find a difference, and least likely to be wrong with respect to type I error. Other tests that are used in particular circumstances. We will mention only Dunnett's, which is used to compare one treatment (usually a control) to all other treatments. This is the only post hoc test in SAS that has one-tailed tests (e.g. DUNNETTL and DUNNETTU). Applying Post ANOVA test comparisons All of these tests can be expressed in one of two ways. If the analysis is BALANCED, then there is a popular expression of pairwise tests that starts with ranked means. Suppose we calculate a value of the LSD equal to 8, and we have sorted the means of treatment levels and have 5, 14, 17, 23, 29, and 38. Treatment Level Mean Groups If the critical value of the LSD = 8 then means below that differ by less than 8 do not differ statistically. This is represented by giving them a common letter so they share a letter.

6 Experimental Statistics II Page 86 For an LSD critical value of 8 Same means compared with a Tukey adjusted critical value of 10 Same means compared with a Scheffé adjusted critical value of 15 Treatment Level Mean Groups 3 38 A 9 B 6 23 B C 5 17 D C 2 14 D 4 5 E Treatment Level Mean Groups 3 38 A 9 A B 6 23 B C 5 17 C 2 14 C D 4 5 D Treatment Level Mean Groups 3 38 A 9 A B 6 23 A B 5 17 B C 2 14 B C 4 5 C SAS Example (Appendix 12a) Note the test of homogeneity of variance (random or repeated statement). Test the effects of TREATMENTS. Post hoc tests : They can be done from MIXED using the LSMeans statement. In GLM either the MEANS or LSMeans statement can be used. SAS statements results to compare (post ANOVA or post hoc tests ) Results with the LSD Results with Tukey's. Results with Scheffé's. Results with Dunnett's. NOTE that normally only one post-anova examination would be done. We have done several here in order to compare. Note the use of a macro to get sorted and labeled means to indicate significant differences.

7 ANOVA & Post ANOVA tests CRD and RBD examples Page dm'log;clear;output;clear'; 2 options ps=512 ls=99 nocenter nodate nonumber; 3 TITLE1 'Appendix12: Comparing Cuckoo egg sizes'; 4 5 ODS HTML style=minimal body='c:\sas\appendix12 Cuckoo.HTML' ; NOTE: Writing HTML Body file: C:\SAS\Appendix12 Cuckoo.HTML 6 *ODS rtf style=minimal body='c:\sas\appendix12 Cuckoo.RTF' ; 7 *ODS PDF style=minimal body='c:\sas\appendix12 Cuckoo.PDF' ; 8 filename input1 'C:\SAS\Appendix12 Cuckoo.dat'; 9 FILENAME OUT1'C:\SAS\Appendix12 Cuckoo01.CGM'; 10 FILENAME OUT2'C:\SAS\Appendix12 Cuckoo02.CGM'; 11 FILENAME OUT3'C:\SAS\Appendix12 Cuckoo03.CGM'; ****************************************************************************; 14 *** Source: L.H.C. Tippett, The Methods of Statistics, 4th Edition, ****; 15 *** John Wiley and Sons, Inc., 1952, p ****; 16 *** Description: L.H.C. Tippett ( ) was one of the pioneers ****; 17 *** in the field of statistical quality control, This data on the ****; 18 *** lengths of cuckoo eggs found in the nests of other birds (drawn ****; 19 *** from the work of O.M. Latter in 1902) is used by Tippett in his ****; 20 *** fundamental text. Cuckoo are knows to lay their eggs in the nests ****; 21 *** of other (host) birds. The eggs are then adopted and hatched by ****; 22 *** the host birds. ****; 23 ****************************************************************************; 24 *** That cuckoo eggs were peculiar to the locality where found was ****; 25 *** already known in A study by E.B. Chance in 1940 called The ****; 26 *** Truth About the Cuckoo demonstrated that cuckoos return year after ****; 27 *** year to the same territory and lay their eggs in the nests of a ****; 28 *** particular host species. Further, cuckoos appear to mate only within****; 29 *** their territory. Therefore, geographical sub-species are developed, ****; 30 *** each with a dominant foster-parent species, and natural selection ****; 31 *** has ensured the survival of cuckoos most fitted to lay eggs that ****; 32 *** would be adopted by a particular foster-parent species. ****; 33 ****************************************************************************; data cuckoo; infile input1 missover; 37 Input S1 S2 S3 S4 S5 S6; 38 HostSpecies='Meadow Pipit'; EggLt=s1; if egglt ne. then output; 39 HostSpecies='Tree Pipit'; EggLt=s2; if egglt ne. then output; 40 HostSpecies='Hedge Sparrow'; EggLt=s3; if egglt ne. then output; 41 HostSpecies='Robin'; EggLt=s4; if egglt ne. then output; 42 HostSpecies='Pied Wagtail'; EggLt=s5; if egglt ne. then output; 43 HostSpecies='Wren'; EggLt=s6; if egglt ne. then output; 44 keep HostSpecies EggLt; 45 datalines; NOTE: The infile INPUT1 is: File Name=C:\SAS\Appendix12 Cuckoo.dat, RECFM=V,LRECL=256 NOTE: 45 records were read from the infile INPUT1. The minimum record length was 45. The maximum record length was 45. NOTE: The data set WORK.CUCKOO has 120 observations and 2 variables. NOTE: DATA statement used (Total process time): 0.01 seconds 0.00 seconds 45! run; 46 ; proc sort data=cuckoo; by HostSpecies; run; NOTE: There were 120 observations read from the data set WORK.CUCKOO. NOTE: The data set WORK.CUCKOO has 120 observations and 2 variables. NOTE: PROCEDURE SORT used (Total process time): 0.00 seconds 0.00 seconds

8 ANOVA & Post ANOVA tests CRD and RBD examples Page proc print data=cuckoo; run; NOTE: There were 120 observations read from the data set WORK.CUCKOO. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): 0.09 seconds 0.01 seconds 50 TITLE2 'RAW DATA LISTING'; RUN; Appendix12: Comparing Cuckoo egg sizes Obs hostspecies EggLt 1 Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Hedge Sparrow Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Meadow Pipit Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Pied Wagtail Robin Robin Robin Robin Robin Robin Robin Robin Robin Robin Robin Robin Robin Robin Robin Robin Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Tree Pipit Wren Wren Wren Wren Wren Wren Wren Wren Wren Wren Wren Wren Wren Wren Wren goptions reset=all device=cgmlt97l gsfname=out2 gsfmode=replace 53 ftext='swissx' ftitle='swissx'; GOPTIONS GSFNAME=OUT2; 56 proc boxplot data = cuckoo; plot EggLt * HostSpecies; run ; NOTE: Processing beginning for PLOT statement number 1. NOTE: 172 RECORDS WRITTEN TO C:\SAS\Appendix12 Cuckoo02.CGM NOTE: 59 RECORDS WRITTEN TO C:\SAS\sasgraph\boxplot.gif NOTE: There were 120 observations read from the data set WORK.CUCKOO. NOTE: PROCEDURE BOXPLOT used (Total process time): 0.48 seconds 0.14 seconds

9 ANOVA & Post ANOVA tests CRD and RBD examples Page Egg length Hedge Sparrow Meadow Pipit Pied Wagtail Robin Host species Tree Pipit Wren 58 PROC MIXED DATA=Cuckoo cl covtest; CLASSES HostSpecies; 59 TITLE2 'Analysis of Variance with PROC MIXED'; 60 TITLE3 'This model tests for non-homogeniety'; 61 MODEL EggLt = HostSpecies / htype=3 DDFM=Satterthwaite; 62 repeated / group=hostspecies; 63 LSMEANS HostSpecies / ADJUST=Dunnett pdiff; 64 run; NOTE:Convergence criteria met. NOTE: The PROCEDURE MIXED printed page 2. NOTE: PROCEDURE MIXED used (Total process time): 0.12 seconds 0.04 seconds Analysis of Variance with PROC MIXED This model tests for non-homogeniety The Mixed Procedure Model Information Data Set Dependent Variable Covariance Structure Group Effect Estimation Method Residual Variance Method Fixed Effects SE Method Degrees of Freedom Method WORK.CUCKOO EggLt Variance Components hostspecies REML None Model-Based Satterthwaite Class Level Information Class Levels Values hostspecies 6 Hedge Sparrow Meadow Pipit Pied Wagtail Robin Tree Pipit Wren Dimensions Covariance Parameters 6 Columns in X 7 Columns in Z 0 Subjects 120 Max Obs Per Subject 1

10 ANOVA & Post ANOVA tests CRD and RBD examples Page 243 Number of Observations Number of Observations Read 120 Number of Observations Used 120 Number of Observations Not Used 0 Iteration History Iteration Evaluations -2 Res Log Like Criterion Convergence criteria met. Covariance Parameter Estimates Z Cov Parm Group Estimate Error Value Pr Z Alpha Lower Upper Residual hostspecies Hedge Sparrow Residual hostspecies Meadow Pipit < Residual hostspecies Pied Wagtail Residual hostspecies Robin Residual hostspecies Tree Pipit Residual hostspecies Wren FitStatistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F hostspecies <.0001 Testing for a difference between full and reduced models. Full model -2LL = Reduced model -2LL = d.f. difference = 5 (i.e. 6 variance model versus 1 variance model) Chi sq = = 4.6 P > Chi Sq = Least Squares Means Effect hostspecies Estimate Error DF t Value Pr > t hostspecies Hedge Sparrow <.0001 hostspecies Meadow Pipit <.0001 hostspecies Pied Wagtail <.0001 hostspecies Robin <.0001 hostspecies Tree Pipit <.0001 hostspecies Wren <.0001 Differences of Least Squares Means Effect hostspecies _hostspecies Estimate Error DF t Value Pr > t Adjustment Adj P hostspecies Meadow Pipit Hedge Sparrow Dunnett hostspecies Pied Wagtail Hedge Sparrow Dunnett hostspecies Robin Hedge Sparrow Dunnett hostspecies Tree Pipit Hedge Sparrow Dunnett hostspecies Wren Hedge Sparrow <.0001 Dunnett < PROC MIXED DATA=Cuckoo cl covtest; CLASSES HostSpecies; 67 TITLE2 'Analysis of Variance with PROC MIXED'; 68 TITLE3 'This model assumes homogeniety'; 69 MODEL EggLt = HostSpecies / htype=3 DDFM=Satterthwaite outp=resids; 70 LSMeans HostSpecies / pdiff adjust=tukey CL; 71 LSMEANS HostSpecies / ADJUST=Scheffe pdiff; 72 LSMEANS HostSpecies / ADJUST=Bon pdiff; 73 *Order: Hedge_Sparrow Meadow_Pipit Pied_Wagtail Robin Tree_Pipit Wren; 74 Contrast 'Pipits v others' HostSpecies ; 75 Contrast 'Wren sized v others' HostSpecies ; 76 ods output diffs=ppp lsmeans=mmm;

11 ANOVA & Post ANOVA tests CRD and RBD examples Page ods listing exclude diffs;* lsmeans; 78 run; NOTE: The data set WORK.MMM has 18 observations and 10 variables. NOTE: The data set WORK.PPP has 45 observations and 15 variables. NOTE: The data set WORK.RESIDS has 120 observations and 9 variables. NOTE: The PROCEDURE MIXED printed page 3. NOTE: PROCEDURE MIXED used (Total process time): 0.17 seconds 0.07 seconds TITLE4 'Post hoc adjustment with macro by Arnold Saxton'; 81 * SAS Macro by Arnold Saxton: Saxton, A.M A macro for ; 82 * converting mean separation output to letter groupings in Proc Mixed. ; 83 * In Proc. 23rd SAS Users Group Intl., SAS Institute, Cary, NC, pp ; 84 %include 'C:\SAS\pdmix800.sas'; 712 %pdmix800(ppp,mmm,alpha=0.05,sort=yes); RUN; PDMIX processing Tukey-Kramer values for hostspecies are (avg) (min) (max). 713 %include 'C:\pdmix800.sas'; Analysis of Variance with PROC MIXED This model assumes homogeniety The Mixed Procedure Model Information Data Set Dependent Variable Covariance Structure Estimation Method Residual Variance Method Fixed Effects SE Method Degrees of Freedom Method WORK.CUCKOO EggLt Diagonal REML Profile Model-Based Residual Class Level Information Class Levels Values hostspecies 6 Hedge Sparrow Meadow Pipit ied Wagtail Robin Tree Pipit Wren Dimensions Covariance Parameters 1 Columns in X 7 Columns in Z 0 Subjects 1 Max Obs Per Subject 120 Number of Observations Number of Observations Read 120 Number of Observations Used 120 Number of Observations Not Used 0 Covariance Parameter Estimates Z Cov Parm Estimate Error Value Pr Z Alpha Lower Upper Residual <

12 ANOVA & Post ANOVA tests CRD and RBD examples Page 245 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F hostspecies <.0001 Contrasts Num Den Label DF DF F Value Pr > F Pipits v others Wren sized v others <.0001 Least Squares Means Effect hostspecies Estimate Error DF t Value Pr > t Alpha Lower Upper hostspecies Hedge Sparrow < hostspecies Meadow Pipit < hostspecies Pied Wagtail < hostspecies Robin < hostspecies Tree Pipit < hostspecies Wren < hostspecies Hedge Sparrow < hostspecies Meadow Pipit < hostspecies Pied Wagtail < hostspecies Robin < hostspecies Tree Pipit < hostspecies Wren < hostspecies Hedge Sparrow < hostspecies Meadow Pipit < hostspecies Pied Wagtail < hostspecies Robin < hostspecies Tree Pipit < hostspecies Wren < Effect=hostspecies Method=Bonferroni(P<0.05) Set=3 Letter Obs hostspecies Estimate Error Alpha Lower Upper Group 1 Hedge Sparrow A 2 Tree Pipit A 3 Pied Wagtail A 4 Robin A 5 Meadow Pipit A 6 Wren B Effect=hostspecies Method=Scheffe(P<0.05) Set=2 Letter Obs hostspecies Estimate Error Alpha Lower Upper Group 7 Hedge Sparrow A 8 Tree Pipit A 9 Pied Wagtail A 10 Robin A 11 Meadow Pipit A 12 Wren B Effect=hostspecies Method=Tukey-Kramer(P<0.05) Set=1 Letter Obs hostspecies Estimate Error Alpha Lower Upper Group 13 Hedge Sparrow A 14 Tree Pipit A 15 Pied Wagtail AB 16 Robin AB 17 Meadow Pipit B 18 Wren C

13 ANOVA & Post ANOVA tests CRD and RBD examples Page options ps=512 ls=132; 761 PROC UNIVARIATE DATA=Resids PLOT NORMAL; VAR resid; 762 ods exclude basicmeasures extremeobs quantiles testsforlocation; 763 TITLE2 'Analysis of residuals from PROC MIXED'; 764 RUN; NOTE: SAS set option OBS=0 and will continue to check statements. This may cause NOTE: No observations in data set. NOTE: PROCEDURE UNIVARIATE used (Total process time): 0.00 seconds 0.00 seconds Analysis of residuals from PROC MIXED The UNIVARIATE Procedure Variable: Resid (Residual) Moments N 120 Sum Weights 120 Mean 0 Sum Observations 0 Std Deviation Variance Skewness Kurtosis Uncorrected SS Corrected SS Coeff Variation. Std Error Mean Tests for Normality Test --Statistic p Value Shapiro-Wilk W Pr < W Kolmogorov-Smirnov D Pr > D < Cramer-von Mises W-Sq Pr > W-Sq Anderson-Darling A-Sq Pr > A-Sq Stem Leaf # Boxplot Normal Probability Plot * **+* * ** *** ***** ** *** *** *** *-----* **** **** *** ** ** *** * ** * * * * * * Multiply Stem.Leaf by 10**

Odor attraction CRD Page 1

Odor attraction CRD Page 1 Odor attraction CRD Page 1 dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR=" ---- + ---+= -/\*"; ODS LISTING; *** Table 23.2 ********************************************;

More information

dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR=" = -/\<>*"; ODS LISTING;

dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR= = -/\<>*; ODS LISTING; dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR=" ---- + ---+= -/\*"; ODS LISTING; *** Table 23.2 ********************************************; *** Moore, David

More information

This is a Randomized Block Design (RBD) with a single factor treatment arrangement (2 levels) which are fixed.

This is a Randomized Block Design (RBD) with a single factor treatment arrangement (2 levels) which are fixed. EXST3201 Chapter 13c Geaghan Fall 2005: Page 1 Linear Models Y ij = µ + βi + τ j + βτij + εijk This is a Randomized Block Design (RBD) with a single factor treatment arrangement (2 levels) which are fixed.

More information

Chapter 8 (More on Assumptions for the Simple Linear Regression)

Chapter 8 (More on Assumptions for the Simple Linear Regression) EXST3201 Chapter 8b Geaghan Fall 2005: Page 1 Chapter 8 (More on Assumptions for the Simple Linear Regression) Your textbook considers the following assumptions: Linearity This is not something I usually

More information

This is a Split-plot Design with a fixed single factor treatment arrangement in the main plot and a 2 by 3 factorial subplot.

This is a Split-plot Design with a fixed single factor treatment arrangement in the main plot and a 2 by 3 factorial subplot. EXST3201 Chapter 13c Geaghan Fall 2005: Page 1 Linear Models Y ij = µ + τ1 i + γij + τ2k + ττ 1 2ik + εijkl This is a Split-plot Design with a fixed single factor treatment arrangement in the main plot

More information

unadjusted model for baseline cholesterol 22:31 Monday, April 19,

unadjusted model for baseline cholesterol 22:31 Monday, April 19, unadjusted model for baseline cholesterol 22:31 Monday, April 19, 2004 1 Class Level Information Class Levels Values TRETGRP 3 3 4 5 SEX 2 0 1 Number of observations 916 unadjusted model for baseline cholesterol

More information

Outline. Topic 19 - Inference. The Cell Means Model. Estimates. Inference for Means Differences in cell means Contrasts. STAT Fall 2013

Outline. Topic 19 - Inference. The Cell Means Model. Estimates. Inference for Means Differences in cell means Contrasts. STAT Fall 2013 Topic 19 - Inference - Fall 2013 Outline Inference for Means Differences in cell means Contrasts Multiplicity Topic 19 2 The Cell Means Model Expressed numerically Y ij = µ i + ε ij where µ i is the theoretical

More information

T-test: means of Spock's judge versus all other judges 1 12:10 Wednesday, January 5, judge1 N Mean Std Dev Std Err Minimum Maximum

T-test: means of Spock's judge versus all other judges 1 12:10 Wednesday, January 5, judge1 N Mean Std Dev Std Err Minimum Maximum T-test: means of Spock's judge versus all other judges 1 The TTEST Procedure Variable: pcwomen judge1 N Mean Std Dev Std Err Minimum Maximum OTHER 37 29.4919 7.4308 1.2216 16.5000 48.9000 SPOCKS 9 14.6222

More information

EXST7015: Estimating tree weights from other morphometric variables Raw data print

EXST7015: Estimating tree weights from other morphometric variables Raw data print Simple Linear Regression SAS example Page 1 1 ********************************************; 2 *** Data from Freund & Wilson (1993) ***; 3 *** TABLE 8.24 : ESTIMATING TREE WEIGHTS ***; 4 ********************************************;

More information

1) Answer the following questions as true (T) or false (F) by circling the appropriate letter.

1) Answer the following questions as true (T) or false (F) by circling the appropriate letter. 1) Answer the following questions as true (T) or false (F) by circling the appropriate letter. T F T F T F a) Variance estimates should always be positive, but covariance estimates can be either positive

More information

5.3 Three-Stage Nested Design Example

5.3 Three-Stage Nested Design Example 5.3 Three-Stage Nested Design Example A researcher designs an experiment to study the of a metal alloy. A three-stage nested design was conducted that included Two alloy chemistry compositions. Three ovens

More information

Linear Combinations of Group Means

Linear Combinations of Group Means Linear Combinations of Group Means Look at the handicap example on p. 150 of the text. proc means data=mth567.disability; class handicap; var score; proc sort data=mth567.disability; by handicap; proc

More information

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS Ravinder Malhotra and Vipul Sharma National Dairy Research Institute, Karnal-132001 The most common use of statistics in dairy science is testing

More information

Covariance Structure Approach to Within-Cases

Covariance Structure Approach to Within-Cases Covariance Structure Approach to Within-Cases Remember how the data file grapefruit1.data looks: Store sales1 sales2 sales3 1 62.1 61.3 60.8 2 58.2 57.9 55.1 3 51.6 49.2 46.2 4 53.7 51.5 48.3 5 61.4 58.7

More information

17. Example SAS Commands for Analysis of a Classic Split-Plot Experiment 17. 1

17. Example SAS Commands for Analysis of a Classic Split-Plot Experiment 17. 1 17 Example SAS Commands for Analysis of a Classic SplitPlot Experiment 17 1 DELIMITED options nocenter nonumber nodate ls80; Format SCREEN OUTPUT proc import datafile"c:\data\simulatedsplitplotdatatxt"

More information

Handout 1: Predicting GPA from SAT

Handout 1: Predicting GPA from SAT Handout 1: Predicting GPA from SAT appsrv01.srv.cquest.utoronto.ca> appsrv01.srv.cquest.utoronto.ca> ls Desktop grades.data grades.sas oldstuff sasuser.800 appsrv01.srv.cquest.utoronto.ca> cat grades.data

More information

EXST Regression Techniques Page 1. We can also test the hypothesis H :" œ 0 versus H :"

EXST Regression Techniques Page 1. We can also test the hypothesis H : œ 0 versus H : EXST704 - Regression Techniques Page 1 Using F tests instead of t-tests We can also test the hypothesis H :" œ 0 versus H :" Á 0 with an F test.! " " " F œ MSRegression MSError This test is mathematically

More information

A posteriori multiple comparison tests

A posteriori multiple comparison tests A posteriori multiple comparison tests 11/15/16 1 Recall the Lakes experiment Source of variation SS DF MS F P Lakes 58.000 2 29.400 8.243 0.006 Error 42.800 12 3.567 Total 101.600 14 The ANOVA tells us

More information

Laboratory Topics 4 & 5

Laboratory Topics 4 & 5 PLS205 Lab 3 January 23, 2014 Orthogonal contrasts Class comparisons in SAS Trend analysis in SAS Multiple mean comparisons Laboratory Topics 4 & 5 Orthogonal contrasts Planned, single degree-of-freedom

More information

Pairwise multiple comparisons are easy to compute using SAS Proc GLM. The basic statement is:

Pairwise multiple comparisons are easy to compute using SAS Proc GLM. The basic statement is: Pairwise Multiple Comparisons in SAS Pairwise multiple comparisons are easy to compute using SAS Proc GLM. The basic statement is: means effects / options Here, means is the statement initiat, effects

More information

Linear Combinations. Comparison of treatment means. Bruce A Craig. Department of Statistics Purdue University. STAT 514 Topic 6 1

Linear Combinations. Comparison of treatment means. Bruce A Craig. Department of Statistics Purdue University. STAT 514 Topic 6 1 Linear Combinations Comparison of treatment means Bruce A Craig Department of Statistics Purdue University STAT 514 Topic 6 1 Linear Combinations of Means y ij = µ + τ i + ǫ ij = µ i + ǫ ij Often study

More information

1 Tomato yield example.

1 Tomato yield example. ST706 - Linear Models II. Spring 2013 Two-way Analysis of Variance examples. Here we illustrate what happens analyzing two way data in proc glm in SAS. Similar issues come up with other software where

More information

COMPREHENSIVE WRITTEN EXAMINATION, PAPER III FRIDAY AUGUST 26, 2005, 9:00 A.M. 1:00 P.M. STATISTICS 174 QUESTION

COMPREHENSIVE WRITTEN EXAMINATION, PAPER III FRIDAY AUGUST 26, 2005, 9:00 A.M. 1:00 P.M. STATISTICS 174 QUESTION COMPREHENSIVE WRITTEN EXAMINATION, PAPER III FRIDAY AUGUST 26, 2005, 9:00 A.M. 1:00 P.M. STATISTICS 174 QUESTION Answer all parts. Closed book, calculators allowed. It is important to show all working,

More information

Chapter 11. Analysis of Variance (One-Way)

Chapter 11. Analysis of Variance (One-Way) Chapter 11 Analysis of Variance (One-Way) We now develop a statistical procedure for comparing the means of two or more groups, known as analysis of variance or ANOVA. These groups might be the result

More information

Introduction to SAS proc mixed

Introduction to SAS proc mixed Faculty of Health Sciences Introduction to SAS proc mixed Analysis of repeated measurements, 2017 Julie Forman Department of Biostatistics, University of Copenhagen 2 / 28 Preparing data for analysis The

More information

Biological Applications of ANOVA - Examples and Readings

Biological Applications of ANOVA - Examples and Readings BIO 575 Biological Applications of ANOVA - Winter Quarter 2010 Page 1 ANOVA Pac Biological Applications of ANOVA - Examples and Readings One-factor Model I (Fixed Effects) This is the same example for

More information

Introduction to Design and Analysis of Experiments with the SAS System (Stat 7010 Lecture Notes)

Introduction to Design and Analysis of Experiments with the SAS System (Stat 7010 Lecture Notes) Introduction to Design and Analysis of Experiments with the SAS System (Stat 7010 Lecture Notes) Asheber Abebe Discrete and Statistical Sciences Auburn University Contents 1 Completely Randomized Design

More information

Statistical Methods I

Statistical Methods I tatistical Methods I EXT 7005 Course notes James P Geaghan Louisiana tate University Copyright 010 James P. Geaghan Copyright 010 tatistical Methods I (EXT 7005) Page 101 The two-sample t-test H: 0 μ1

More information

STAT 5200 Handout #23. Repeated Measures Example (Ch. 16)

STAT 5200 Handout #23. Repeated Measures Example (Ch. 16) Motivating Example: Glucose STAT 500 Handout #3 Repeated Measures Example (Ch. 16) An experiment is conducted to evaluate the effects of three diets on the serum glucose levels of human subjects. Twelve

More information

Introduction to SAS proc mixed

Introduction to SAS proc mixed Faculty of Health Sciences Introduction to SAS proc mixed Analysis of repeated measurements, 2017 Julie Forman Department of Biostatistics, University of Copenhagen Outline Data in wide and long format

More information

Multiple Comparisons

Multiple Comparisons Multiple Comparisons Error Rates, A Priori Tests, and Post-Hoc Tests Multiple Comparisons: A Rationale Multiple comparison tests function to tease apart differences between the groups within our IV when

More information

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3.1 through 3.3

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3.1 through 3.3 Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3.1 through 3.3 Fall, 2013 Page 1 Tensile Strength Experiment Investigate the tensile strength of a new synthetic fiber. The factor is the

More information

4.8 Alternate Analysis as a Oneway ANOVA

4.8 Alternate Analysis as a Oneway ANOVA 4.8 Alternate Analysis as a Oneway ANOVA Suppose we have data from a two-factor factorial design. The following method can be used to perform a multiple comparison test to compare treatment means as well

More information

Chapter 11 : State SAT scores for 1982 Data Listing

Chapter 11 : State SAT scores for 1982 Data Listing EXST3201 Chapter 12a Geaghan Fall 2005: Page 1 Chapter 12 : Variable selection An example: State SAT scores In 1982 there was concern for scores of the Scholastic Aptitude Test (SAT) scores that varied

More information

Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA

Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA Faculty of Health Sciences Outline Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA Lene Theil Skovgaard Sept. 14, 2015 Paired comparisons: tests and confidence intervals

More information

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study 1.4 0.0-6 7 8 9 10 11 12 13 14 15 16 17 18 19 age Model 1: A simple broken stick model with knot at 14 fit with

More information

Cuckoo Birds. Analysis of Variance. Display of Cuckoo Bird Egg Lengths

Cuckoo Birds. Analysis of Variance. Display of Cuckoo Bird Egg Lengths Cuckoo Birds Analysis of Variance Bret Larget Departments of Botany and of Statistics University of Wisconsin Madison Statistics 371 29th November 2005 Cuckoo birds have a behavior in which they lay their

More information

MIXED MODELS FOR REPEATED (LONGITUDINAL) DATA PART 2 DAVID C. HOWELL 4/1/2010

MIXED MODELS FOR REPEATED (LONGITUDINAL) DATA PART 2 DAVID C. HOWELL 4/1/2010 MIXED MODELS FOR REPEATED (LONGITUDINAL) DATA PART 2 DAVID C. HOWELL 4/1/2010 Part 1 of this document can be found at http://www.uvm.edu/~dhowell/methods/supplements/mixed Models for Repeated Measures1.pdf

More information

The program for the following sections follows.

The program for the following sections follows. Homework 6 nswer sheet Page 31 The program for the following sections follows. dm'log;clear;output;clear'; *************************************************************; *** EXST734 Homework Example 1

More information

Multiple t Tests. Introduction to Analysis of Variance. Experiments with More than 2 Conditions

Multiple t Tests. Introduction to Analysis of Variance. Experiments with More than 2 Conditions Introduction to Analysis of Variance 1 Experiments with More than 2 Conditions Often the research that psychologists perform has more conditions than just the control and experimental conditions You might

More information

ANOVA Longitudinal Models for the Practice Effects Data: via GLM

ANOVA Longitudinal Models for the Practice Effects Data: via GLM Psyc 943 Lecture 25 page 1 ANOVA Longitudinal Models for the Practice Effects Data: via GLM Model 1. Saturated Means Model for Session, E-only Variances Model (BP) Variances Model: NO correlation, EQUAL

More information

SAS Commands. General Plan. Output. Construct scatterplot / interaction plot. Run full model

SAS Commands. General Plan. Output. Construct scatterplot / interaction plot. Run full model Topic 23 - Unequal Replication Data Model Outline - Fall 2013 Parameter Estimates Inference Topic 23 2 Example Page 954 Data for Two Factor ANOVA Y is the response variable Factor A has levels i = 1, 2,...,

More information

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3 Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3 Page 1 Tensile Strength Experiment Investigate the tensile strength of a new synthetic fiber. The factor is the weight percent

More information

N J SS W /df W N - 1

N J SS W /df W N - 1 One-Way ANOVA Source Table ANOVA MODEL: ij = µ* + α j + ε ij H 0 : µ = µ =... = µ j or H 0 : Σα j = 0 Source Sum of Squares df Mean Squares F J Between Groups nj( j * ) J - SS B /(J ) MS B /MS W = ( N

More information

Week 7.1--IES 612-STA STA doc

Week 7.1--IES 612-STA STA doc Week 7.1--IES 612-STA 4-573-STA 4-576.doc IES 612/STA 4-576 Winter 2009 ANOVA MODELS model adequacy aka RESIDUAL ANALYSIS Numeric data samples from t populations obtained Assume Y ij ~ independent N(μ

More information

Analysis of Variance

Analysis of Variance Analysis of Variance Bret Hanlon and Bret Larget Department of Statistics University of Wisconsin Madison November 22 November 29, 2011 ANOVA 1 / 59 Cuckoo Birds Case Study Cuckoo birds have a behavior

More information

EXST 7015 Fall 2014 Lab 11: Randomized Block Design and Nested Design

EXST 7015 Fall 2014 Lab 11: Randomized Block Design and Nested Design EXST 7015 Fall 2014 Lab 11: Randomized Block Design and Nested Design OBJECTIVES: The objective of an experimental design is to provide the maximum amount of reliable information at the minimum cost. In

More information

STAT 5200 Handout #7a Contrasts & Post hoc Means Comparisons (Ch. 4-5)

STAT 5200 Handout #7a Contrasts & Post hoc Means Comparisons (Ch. 4-5) STAT 5200 Handout #7a Contrasts & Post hoc Means Comparisons Ch. 4-5) Recall CRD means and effects models: Y ij = µ i + ϵ ij = µ + α i + ϵ ij i = 1,..., g ; j = 1,..., n ; ϵ ij s iid N0, σ 2 ) If we reject

More information

SAS Syntax and Output for Data Manipulation: CLDP 944 Example 3a page 1

SAS Syntax and Output for Data Manipulation: CLDP 944 Example 3a page 1 CLDP 944 Example 3a page 1 From Between-Person to Within-Person Models for Longitudinal Data The models for this example come from Hoffman (2015) chapter 3 example 3a. We will be examining the extent to

More information

COMPLETELY RANDOM DESIGN (CRD) -Design can be used when experimental units are essentially homogeneous.

COMPLETELY RANDOM DESIGN (CRD) -Design can be used when experimental units are essentially homogeneous. COMPLETELY RANDOM DESIGN (CRD) Description of the Design -Simplest design to use. -Design can be used when experimental units are essentially homogeneous. -Because of the homogeneity requirement, it may

More information

Analysis of Variance

Analysis of Variance Statistical Techniques II EXST7015 Analysis of Variance 15a_ANOVA_Introduction 1 Design The simplest model for Analysis of Variance (ANOVA) is the CRD, the Completely Randomized Design This model is also

More information

Comparison of a Population Means

Comparison of a Population Means Analysis of Variance Interested in comparing Several treatments Several levels of one treatment Comparison of a Population Means Could do numerous two-sample t-tests but... ANOVA provides method of joint

More information

Answer Keys to Homework#10

Answer Keys to Homework#10 Answer Keys to Homework#10 Problem 1 Use either restricted or unrestricted mixed models. Problem 2 (a) First, the respective means for the 8 level combinations are listed in the following table A B C Mean

More information

Assignment 9 Answer Keys

Assignment 9 Answer Keys Assignment 9 Answer Keys Problem 1 (a) First, the respective means for the 8 level combinations are listed in the following table A B C Mean 26.00 + 34.67 + 39.67 + + 49.33 + 42.33 + + 37.67 + + 54.67

More information

Lec 1: An Introduction to ANOVA

Lec 1: An Introduction to ANOVA Ying Li Stockholm University October 31, 2011 Three end-aisle displays Which is the best? Design of the Experiment Identify the stores of the similar size and type. The displays are randomly assigned to

More information

The One-Way Independent-Samples ANOVA. (For Between-Subjects Designs)

The One-Way Independent-Samples ANOVA. (For Between-Subjects Designs) The One-Way Independent-Samples ANOVA (For Between-Subjects Designs) Computations for the ANOVA In computing the terms required for the F-statistic, we won t explicitly compute any sample variances or

More information

SAS Procedures Inference about the Line ffl model statement in proc reg has many options ffl To construct confidence intervals use alpha=, clm, cli, c

SAS Procedures Inference about the Line ffl model statement in proc reg has many options ffl To construct confidence intervals use alpha=, clm, cli, c Inference About the Slope ffl As with all estimates, ^fi1 subject to sampling var ffl Because Y jx _ Normal, the estimate ^fi1 _ Normal A linear combination of indep Normals is Normal Simple Linear Regression

More information

Chapter 9. Multivariate and Within-cases Analysis. 9.1 Multivariate Analysis of Variance

Chapter 9. Multivariate and Within-cases Analysis. 9.1 Multivariate Analysis of Variance Chapter 9 Multivariate and Within-cases Analysis 9.1 Multivariate Analysis of Variance Multivariate means more than one response variable at once. Why do it? Primarily because if you do parallel analyses

More information

General Linear Models (GLM) for Fixed Factors

General Linear Models (GLM) for Fixed Factors Chapter 224 General Linear Models (GLM) for Fixed Factors Introduction This procedure performs analysis of variance (ANOVA) and analysis of covariance (ANCOVA) for factorial models that include fixed factors

More information

Introduction to the Analysis of Variance (ANOVA) Computing One-Way Independent Measures (Between Subjects) ANOVAs

Introduction to the Analysis of Variance (ANOVA) Computing One-Way Independent Measures (Between Subjects) ANOVAs Introduction to the Analysis of Variance (ANOVA) Computing One-Way Independent Measures (Between Subjects) ANOVAs The Analysis of Variance (ANOVA) The analysis of variance (ANOVA) is a statistical technique

More information

Answer to exercise: Blood pressure lowering drugs

Answer to exercise: Blood pressure lowering drugs Answer to exercise: Blood pressure lowering drugs The data set bloodpressure.txt contains data from a cross-over trial, involving three different formulations of a drug for lowering of blood pressure:

More information

Chapter 1 Statistical Inference

Chapter 1 Statistical Inference Chapter 1 Statistical Inference causal inference To infer causality, you need a randomized experiment (or a huge observational study and lots of outside information). inference to populations Generalizations

More information

The entire data set consists of n = 32 widgets, 8 of which were made from each of q = 4 different materials.

The entire data set consists of n = 32 widgets, 8 of which were made from each of q = 4 different materials. One-Way ANOVA Summary The One-Way ANOVA procedure is designed to construct a statistical model describing the impact of a single categorical factor X on a dependent variable Y. Tests are run to determine

More information

One-Way Analysis of Covariance (ANCOVA)

One-Way Analysis of Covariance (ANCOVA) Chapter 225 One-Way Analysis of Covariance (ANCOVA) Introduction This procedure performs analysis of covariance (ANCOVA) with one group variable and one covariate. This procedure uses multiple regression

More information

Lecture 10: Experiments with Random Effects

Lecture 10: Experiments with Random Effects Lecture 10: Experiments with Random Effects Montgomery, Chapter 13 1 Lecture 10 Page 1 Example 1 A textile company weaves a fabric on a large number of looms. It would like the looms to be homogeneous

More information

BE640 Intermediate Biostatistics 2. Regression and Correlation. Simple Linear Regression Software: SAS. Emergency Calls to the New York Auto Club

BE640 Intermediate Biostatistics 2. Regression and Correlation. Simple Linear Regression Software: SAS. Emergency Calls to the New York Auto Club BE640 Intermediate Biostatistics 2. Regression and Correlation Simple Linear Regression Software: SAS Emergency Calls to the New York Auto Club Source: Chatterjee, S; Handcock MS and Simonoff JS A Casebook

More information

Analysis of variance and regression. April 17, Contents Comparison of several groups One-way ANOVA. Two-way ANOVA Interaction Model checking

Analysis of variance and regression. April 17, Contents Comparison of several groups One-way ANOVA. Two-way ANOVA Interaction Model checking Analysis of variance and regression Contents Comparison of several groups One-way ANOVA April 7, 008 Two-way ANOVA Interaction Model checking ANOVA, April 008 Comparison of or more groups Julie Lyng Forman,

More information

WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS

WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS 1 WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS I. Single-factor designs: the model is: yij i j ij ij where: yij score for person j under treatment level i (i = 1,..., I; j = 1,..., n) overall mean βi treatment

More information

Outline. Topic 20 - Diagnostics and Remedies. Residuals. Overview. Diagnostics Plots Residual checks Formal Tests. STAT Fall 2013

Outline. Topic 20 - Diagnostics and Remedies. Residuals. Overview. Diagnostics Plots Residual checks Formal Tests. STAT Fall 2013 Topic 20 - Diagnostics and Remedies - Fall 2013 Diagnostics Plots Residual checks Formal Tests Remedial Measures Outline Topic 20 2 General assumptions Overview Normally distributed error terms Independent

More information

STAT 115:Experimental Designs

STAT 115:Experimental Designs STAT 115:Experimental Designs Josefina V. Almeda 2013 Multisample inference: Analysis of Variance 1 Learning Objectives 1. Describe Analysis of Variance (ANOVA) 2. Explain the Rationale of ANOVA 3. Compare

More information

Topic 25 - One-Way Random Effects Models. Outline. Random Effects vs Fixed Effects. Data for One-way Random Effects Model. One-way Random effects

Topic 25 - One-Way Random Effects Models. Outline. Random Effects vs Fixed Effects. Data for One-way Random Effects Model. One-way Random effects Topic 5 - One-Way Random Effects Models One-way Random effects Outline Model Variance component estimation - Fall 013 Confidence intervals Topic 5 Random Effects vs Fixed Effects Consider factor with numerous

More information

Specific Differences. Lukas Meier, Seminar für Statistik

Specific Differences. Lukas Meier, Seminar für Statistik Specific Differences Lukas Meier, Seminar für Statistik Problem with Global F-test Problem: Global F-test (aka omnibus F-test) is very unspecific. Typically: Want a more precise answer (or have a more

More information

Topic 17 - Single Factor Analysis of Variance. Outline. One-way ANOVA. The Data / Notation. One way ANOVA Cell means model Factor effects model

Topic 17 - Single Factor Analysis of Variance. Outline. One-way ANOVA. The Data / Notation. One way ANOVA Cell means model Factor effects model Topic 17 - Single Factor Analysis of Variance - Fall 2013 One way ANOVA Cell means model Factor effects model Outline Topic 17 2 One-way ANOVA Response variable Y is continuous Explanatory variable is

More information

Repeated Measures Part 2: Cartoon data

Repeated Measures Part 2: Cartoon data Repeated Measures Part 2: Cartoon data /*********************** cartoonglm.sas ******************/ options linesize=79 noovp formdlim='_'; title 'Cartoon Data: STA442/1008 F 2005'; proc format; /* value

More information

STAT22200 Spring 2014 Chapter 5

STAT22200 Spring 2014 Chapter 5 STAT22200 Spring 2014 Chapter 5 Yibi Huang April 29, 2014 Chapter 5 Multiple Comparisons Chapter 5-1 Chapter 5 Multiple Comparisons Note the t-tests and C.I. s are constructed assuming we only do one test,

More information

SAS Syntax and Output for Data Manipulation:

SAS Syntax and Output for Data Manipulation: CLP 944 Example 5 page 1 Practice with Fixed and Random Effects of Time in Modeling Within-Person Change The models for this example come from Hoffman (2015) chapter 5. We will be examining the extent

More information

Multiple Testing. Gary W. Oehlert. January 28, School of Statistics University of Minnesota

Multiple Testing. Gary W. Oehlert. January 28, School of Statistics University of Minnesota Multiple Testing Gary W. Oehlert School of Statistics University of Minnesota January 28, 2016 Background Suppose that you had a 20-sided die. Nineteen of the sides are labeled 0 and one of the sides is

More information

Analysis of Variance (ANOVA)

Analysis of Variance (ANOVA) Analysis of Variance (ANOVA) Much of statistical inference centers around the ability to distinguish between two or more groups in terms of some underlying response variable y. Sometimes, there are but

More information

Multiple Comparison Procedures Cohen Chapter 13. For EDUC/PSY 6600

Multiple Comparison Procedures Cohen Chapter 13. For EDUC/PSY 6600 Multiple Comparison Procedures Cohen Chapter 13 For EDUC/PSY 6600 1 We have to go to the deductions and the inferences, said Lestrade, winking at me. I find it hard enough to tackle facts, Holmes, without

More information

BIOL Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES

BIOL Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES BIOL 458 - Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES PART 1: INTRODUCTION TO ANOVA Purpose of ANOVA Analysis of Variance (ANOVA) is an extremely useful statistical method

More information

Topic 12. The Split-plot Design and its Relatives (continued) Repeated Measures

Topic 12. The Split-plot Design and its Relatives (continued) Repeated Measures 12.1 Topic 12. The Split-plot Design and its Relatives (continued) Repeated Measures 12.9 Repeated measures analysis Sometimes researchers make multiple measurements on the same experimental unit. We have

More information

2 Hand-out 2. Dr. M. P. M. M. M c Loughlin Revised 2018

2 Hand-out 2. Dr. M. P. M. M. M c Loughlin Revised 2018 Math 403 - P. & S. III - Dr. McLoughlin - 1 2018 2 Hand-out 2 Dr. M. P. M. M. M c Loughlin Revised 2018 3. Fundamentals 3.1. Preliminaries. Suppose we can produce a random sample of weights of 10 year-olds

More information

Introduction. Chapter 8

Introduction. Chapter 8 Chapter 8 Introduction In general, a researcher wants to compare one treatment against another. The analysis of variance (ANOVA) is a general test for comparing treatment means. When the null hypothesis

More information

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS Duration - 3 hours Aids Allowed: Calculator LAST NAME: FIRST NAME: STUDENT NUMBER: There are 27 pages

More information

Analysis of Longitudinal Data: Comparison Between PROC GLM and PROC MIXED. Maribeth Johnson Medical College of Georgia Augusta, GA

Analysis of Longitudinal Data: Comparison Between PROC GLM and PROC MIXED. Maribeth Johnson Medical College of Georgia Augusta, GA Analysis of Longitudinal Data: Comparison Between PROC GLM and PROC MIXED Maribeth Johnson Medical College of Georgia Augusta, GA Overview Introduction to longitudinal data Describe the data for examples

More information

PLS205 Lab 6 February 13, Laboratory Topic 9

PLS205 Lab 6 February 13, Laboratory Topic 9 PLS205 Lab 6 February 13, 2014 Laboratory Topic 9 A word about factorials Specifying interactions among factorial effects in SAS The relationship between factors and treatment Interpreting results of an

More information

Single Factor Experiments

Single Factor Experiments Single Factor Experiments Bruce A Craig Department of Statistics Purdue University STAT 514 Topic 4 1 Analysis of Variance Suppose you are interested in comparing either a different treatments a levels

More information

Analysis of variance. April 16, Contents Comparison of several groups

Analysis of variance. April 16, Contents Comparison of several groups Contents Comparison of several groups Analysis of variance April 16, 2009 One-way ANOVA Two-way ANOVA Interaction Model checking Acknowledgement for use of presentation Julie Lyng Forman, Dept. of Biostatistics

More information

Analysis of variance. April 16, 2009

Analysis of variance. April 16, 2009 Analysis of variance April 16, 2009 Contents Comparison of several groups One-way ANOVA Two-way ANOVA Interaction Model checking Acknowledgement for use of presentation Julie Lyng Forman, Dept. of Biostatistics

More information

Topic 23: Diagnostics and Remedies

Topic 23: Diagnostics and Remedies Topic 23: Diagnostics and Remedies Outline Diagnostics residual checks ANOVA remedial measures Diagnostics Overview We will take the diagnostics and remedial measures that we learned for regression and

More information

Booklet of Code and Output for STAC32 Final Exam

Booklet of Code and Output for STAC32 Final Exam Booklet of Code and Output for STAC32 Final Exam December 8, 2014 List of Figures in this document by page: List of Figures 1 Popcorn data............................. 2 2 MDs by city, with normal quantile

More information

Lecture 5: Comparing Treatment Means Montgomery: Section 3-5

Lecture 5: Comparing Treatment Means Montgomery: Section 3-5 Lecture 5: Comparing Treatment Means Montgomery: Section 3-5 Page 1 Linear Combination of Means ANOVA: y ij = µ + τ i + ɛ ij = µ i + ɛ ij Linear combination: L = c 1 µ 1 + c 1 µ 2 +...+ c a µ a = a i=1

More information

Lecture 4. Random Effects in Completely Randomized Design

Lecture 4. Random Effects in Completely Randomized Design Lecture 4. Random Effects in Completely Randomized Design Montgomery: 3.9, 13.1 and 13.7 1 Lecture 4 Page 1 Random Effects vs Fixed Effects Consider factor with numerous possible levels Want to draw inference

More information

Group comparison test for independent samples

Group comparison test for independent samples Group comparison test for independent samples The purpose of the Analysis of Variance (ANOVA) is to test for significant differences between means. Supposing that: samples come from normal populations

More information

Your schedule of coming weeks. One-way ANOVA, II. Review from last time. Review from last time /22/2004. Create ANOVA table

Your schedule of coming weeks. One-way ANOVA, II. Review from last time. Review from last time /22/2004. Create ANOVA table Your schedule of coming weeks One-way ANOVA, II 9.07 //00 Today: One-way ANOVA, part II Next week: Two-way ANOVA, parts I and II. One-way ANOVA HW due Thursday Week of May Teacher out of town all week

More information

Lecture notes on Regression & SAS example demonstration

Lecture notes on Regression & SAS example demonstration Regression & Correlation (p. 215) When two variables are measured on a single experimental unit, the resulting data are called bivariate data. You can describe each variable individually, and you can also

More information

PLS205!! Lab 9!! March 6, Topic 13: Covariance Analysis

PLS205!! Lab 9!! March 6, Topic 13: Covariance Analysis PLS205!! Lab 9!! March 6, 2014 Topic 13: Covariance Analysis Covariable as a tool for increasing precision Carrying out a full ANCOVA Testing ANOVA assumptions Happiness! Covariable as a Tool for Increasing

More information

Introduction to Analysis of Variance (ANOVA) Part 2

Introduction to Analysis of Variance (ANOVA) Part 2 Introduction to Analysis of Variance (ANOVA) Part 2 Single factor Serpulid recruitment and biofilms Effect of biofilm type on number of recruiting serpulid worms in Port Phillip Bay Response variable:

More information

Topic 20: Single Factor Analysis of Variance

Topic 20: Single Factor Analysis of Variance Topic 20: Single Factor Analysis of Variance Outline Single factor Analysis of Variance One set of treatments Cell means model Factor effects model Link to linear regression using indicator explanatory

More information

STA 303H1F: Two-way Analysis of Variance Practice Problems

STA 303H1F: Two-way Analysis of Variance Practice Problems STA 303H1F: Two-way Analysis of Variance Practice Problems 1. In the Pygmalion example from lecture, why are the average scores of the platoon used as the response variable, rather than the scores of the

More information