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

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

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

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

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

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

Linear Combinations of Group Means

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

Outline Topic 21 - Two Factor ANOVA

One-Way Analysis of Variance (ANOVA) There are two key differences regarding the explanatory variable X.

Topic 20: Single Factor Analysis of Variance

Analysis of Variance II Bios 662

1 Tomato yield example.

Topic 32: Two-Way Mixed Effects Model

4.8 Alternate Analysis as a Oneway ANOVA

Outline. Topic 22 - Interaction in Two Factor ANOVA. Interaction Not Significant. General Plan

Topic 28: Unequal Replication in Two-Way ANOVA

STAT 115:Experimental Designs

Two-factor studies. STAT 525 Chapter 19 and 20. Professor Olga Vitek

STAT22200 Spring 2014 Chapter 5

Descriptions of post-hoc tests

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

Lec 1: An Introduction to ANOVA

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

Multiple Pairwise Comparison Procedures in One-Way ANOVA with Fixed Effects Model

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS

STAT 705 Chapter 19: Two-way ANOVA

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

N J SS W /df W N - 1

Topic 29: Three-Way ANOVA

STAT 705 Chapter 19: Two-way ANOVA

Ch 2: Simple Linear Regression

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

Lecture 3: Inference in SLR

Lecture 4. Random Effects in Completely Randomized Design

Topic 23: Diagnostics and Remedies

Example: Four levels of herbicide strength in an experiment on dry weight of treated plants.

Ch 3: Multiple Linear Regression

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

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

Introduction. Chapter 8

ST505/S697R: Fall Homework 2 Solution.

Analysis of Covariance

Chapter 2 Inferences in Simple Linear Regression

Statistics 512: Applied Linear Models. Topic 9

Multiple comparisons - subsequent inferences for two-way ANOVA

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

Specific Differences. Lukas Meier, Seminar für Statistik

More about Single Factor Experiments

Chapter Seven: Multi-Sample Methods 1/52

Biological Applications of ANOVA - Examples and Readings

Laboratory Topics 4 & 5

Chapter 6 Multiple Regression

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

Analysis of variance

Statistics for EES Factorial analysis of variance

General Linear Models (GLM) for Fixed Factors

Lecture 12 Inference in MLR

Multiple Comparisons

These are all actually contrasts (the coef sum to zero). What are these contrasts representing? What would make them large?

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

STAT 401A - Statistical Methods for Research Workers

Summary of Chapter 7 (Sections ) and Chapter 8 (Section 8.1)

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

Topic 14: Inference in Multiple Regression

Analysis of Variance

STOR 455 STATISTICAL METHODS I

Incomplete Block Designs

Lecture 2: Basic Concepts and Simple Comparative Experiments Montgomery: Chapter 2

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

Lecture 10: Experiments with Random Effects

STAT 705 Chapter 16: One-way ANOVA

The One-Way Repeated-Measures ANOVA. (For Within-Subjects Designs)

Odor attraction CRD Page 1

T.I.H.E. IT 233 Statistics and Probability: Sem. 1: 2013 ESTIMATION AND HYPOTHESIS TESTING OF TWO POPULATIONS

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

PLS205 Lab 2 January 15, Laboratory Topic 3

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

Outline. PubH 5450 Biostatistics I Prof. Carlin. Confidence Interval for the Mean. Part I. Reviews

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

Contrasts and Multiple Comparisons Supplement for Pages

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

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

9 One-Way Analysis of Variance

Sociology 6Z03 Review II

Central Limit Theorem ( 5.3)

One-Way Analysis of Covariance (ANCOVA)

STAT 3A03 Applied Regression With SAS Fall 2017

Week 14 Comparing k(> 2) Populations

n i n T Note: You can use the fact that t(.975; 10) = 2.228, t(.95; 10) = 1.813, t(.975; 12) = 2.179, t(.95; 12) =

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

Garvan Ins)tute Biosta)s)cal Workshop 16/7/2015. Tuan V. Nguyen. Garvan Ins)tute of Medical Research Sydney, Australia

Chapter 11. Analysis of Variance (One-Way)

Assignment 6 Answer Keys

Multiple Testing. Tim Hanson. January, Modified from originals by Gary W. Oehlert. Department of Statistics University of South Carolina

data proc sort proc corr run proc reg run proc glm run proc glm run proc glm run proc reg CONMAIN CONINT run proc reg DUMMAIN DUMINT run proc reg

Multiple Linear Regression

Tukey Complete Pairwise Post-Hoc Comparison

ECO220Y Simple Regression: Testing the Slope

Comparing the means of more than two groups

STAT 263/363: Experimental Design Winter 2016/17. Lecture 1 January 9. Why perform Design of Experiments (DOE)? There are at least two reasons:

Transcription:

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 mean of all observations at level i (or in cell i) The ε ij are iid N(0,σ 2 ) which implies the Y ij are independent N(µ i,σ 2 ) Parameters µ 1,µ 2,..., µ r σ 2 Estimates Estimate µ i using the sample mean of the observations at level i ˆµ i = Y i. Pool the sample variances s 2 i using weights proportional to sample size (i.e., df) to get s 2 s 2 = = (ni 1)s 2 i (ni 1) (ni 1)s 2 i n T r Topic 19 3 Topic 19 4

Confidence Intervals of µ i s From model Confidence interval Y i. N(µ i,σ 2 /n i ) Y i. ± t(1 α/2;n T r)s/ n i Degrees of freedom larger than n i 1 because pooling variance estimates across treatments (i.e., borrowing information from other groups) SAS Commands data a1; infile u:\.www\datasets525\ch15ta01.txt ; input cases design store; proc means data=a1 mean std stderr clm maxdec=2; var cases; proc glm data=a1; means design/t clm; proc mixed data=a1; lsmeans design / cl; Topic 19 5 Topic 19 6 The GLM Procedure The MEANS Procedure Analysis Variable : cases Lower 95% Upper 95% Des N Mean StdDev StdErr CL for Mean ---------------------------------------------- 1 5 14.60 2.30 1.03 11.74 17.46 2 5 13.40 3.65 1.63 8.87 17.93 3 4 19.50 2.65 1.32 15.29 23.71 4 5 27.20 3.96 1.77 22.28 32.12 Note: 4 2.30 2 + 4 3.65 2 + 3 2.65 2 + 4 3.96 2 = 158.24. Except for rounding, this is equal to SSE. Also, 19-4=15 which is the df error in the ANOVA table. t Confidence Intervals for cases Critical Value of t 2.13145 95% Confidence design N Mean Limits 4 5 27.200 24.104 30.296 3 4 19.500 16.039 22.961 1 5 14.600 11.504 17.696 2 5 13.400 10.304 16.496 There is no pooling of error (or df) when computing these confidence intervals. These confidence intervals are often narrower due to the increase in degrees of freedom. Results can vary if there does not appear to be a common variance. Topic 19 7 Topic 19 8

The Mixed Procedure Covariance Parameter Estimates Cov Parm Estimate Residual 10.5467 Least Squares Means Standard Design Estimate Error DF t Value Pr > t Lower Upper 1 14.6000 1.4524 15 10.05 <.0001 11.5044 17.6956 2 13.4000 1.4524 15 9.23 <.0001 10.3044 16.4956 3 19.5000 1.6238 15 12.01 <.0001 16.0390 22.9610 4 27.2000 1.4524 15 18.73 <.0001 24.1044 30.2956 Multiplicity Have generated r confidence intervals Overall confidence level (all intervals contain its true mean) is less than 1 α Many different approaches have been proposed Previously discussed using Bonferroni These confidence intervals are the same as the previous page. Standard errors, based on constant variance assumption, are provided. Topic 19 9 Topic 19 10 Bonferroni t Confidence Intervals for cases proc glm data=a1; means design/bon clm; proc mixed data=a1; lsmeans design /alpha=0.125 cl; SAS Commands Critical Value of t 2.83663 Simultaneous 95% design N Mean Confidence Limits 4 5 27.200 23.080 31.320 3 4 19.500 14.894 24.106 1 5 14.600 10.480 18.720 2 5 13.400 9.280 17.520 Topic 19 11 Topic 19 11-1

The Mixed Procedure Covariance Parameter Estimates Cov Parm Estimate Residual 10.5467 Hypothesis Tests on µ i s Not usually done SAS typically gives output for H 0 : µ i = 0 which rarely is of any interest Least Squares Means Standard Design Estimate Error DF t Value Pr > t Alpha Lower Upper 1 14.6000 1.4524 15 10.05 <.0001 0.0125 10.4802 18.7198 2 13.4000 1.4524 15 9.23 <.0001 0.0125 9.2802 17.5198 3 19.5000 1.6238 15 12.01 <.0001 0.0125 14.8939 24.1061 4 27.2000 1.4524 15 18.73 <.0001 0.0125 23.0802 31.3198 If interested in H 0 : µ i = c, it is easiest to subtract of c from all observations in a data step and then test whether the new mean is equal to zero. Can also use CI to make decision Topic 19 12 Topic 19 13 From model Differences in means ( 1 Y i. Y k. N (µ i µ k,σ 2 + 1 )) ni nk Confidence interval Y i. Y k. ± t(1 α/2;n T r)s 1/n i + 1/n k In this case H 0 : µ i µ k = 0 is of interest Similar multiplicity problem Now have r(r 1) 2 pairwise comparisons to consider Multiplicity Adjustment Approaches adjust multiplier of the SE Alter α level (e.g., Bonferroni) Use different distribution Conservative strong control of overall Type I error - avoids false positives Powerful able to pick up differences that exist - avoids false negatives All approaches try to strike to strike some sort of balance Topic 19 14 Topic 19 15

Least Significant Difference Simply ignores multiplicity issue Most powerful of the procedures but also results in most false positives Uses t(1 α/2;n T r) to determine multiplier Called T or LSD in SAS Tukey Based on studentized range distribution q Range is max(y i ) min(y i ) in r levels Accounts for any possible pair being furthest apart Controls overall experimentwise error rate Uses q(1 α;r,n T r)/ 2 to determine multiplier Called TUKEY in SAS Topic 19 16 Topic 19 17 Scheffe Based on the F distribution Accounts for multiplicity for all linear combinations of means, not just pairwise comparisons Protects against data snooping Uses (r 1)F(1 α;r 1,n T r) to determine multiplier Called SCHEFFE in SAS Replaces α by Bonferroni α = α r(r 1)/2 Uses t(1 α /2;n T r) to determine multiplier Called BON in SAS Topic 19 18 Topic 19 19

Holm Refinement of Bonferroni Instead of using α = α g for all comparisons Rank unadjusted P-values from smallest to largest Continue to reject until P k α/(g k + 1) Available in Proc Multtest in SAS False Discovery Rate FDR defined as expected proportion of false positives in the collection of rejected null hypotheses Becoming more popular, especially when # of tests in the thousands or millions Rank P-values from smallest to largest Continue to reject until P k kα/g Available in Proc Multtest in SAS Topic 19 20 Topic 19 21 SAS Commands proc glm data=a1; means design/lsd tukey bon scheffe; means design/lines tukey; proc mixed data=a1; lsmeans design / diff=all; lsmeans design / adjust=tukey; lsmeans design / adjust=bon; lsmeans design / adjust=scheffe; proc glimmix data=a1; lsmeans design / adjust=tukey lines; t Tests (LSD) for cases NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Critical Value of t 2.13145 Comparisons significant at the 0.05 level are indicated by ***. Difference design Between 95% Confidence Comparison Means Limits 4-3 7.700 3.057 12.343 *** 4-1 12.600 8.222 16.978 *** 4-2 13.800 9.422 18.178 *** 3-4 -7.700-12.343-3.057 *** 3-1 4.900 0.257 9.543 *** 3-2 6.100 1.457 10.743 *** 1-4 -12.600-16.978-8.222 *** 1-3 -4.900-9.543-0.257 *** 1-2 1.200-3.178 5.578 2-4 -13.800-18.178-9.422 *** 2-3 -6.100-10.743-1.457 *** 2-1 -1.200-5.578 3.178 Topic 19 22 Topic 19 23

Tukey s Studentized Range (HSD) Test for cases NOTE: This test controls the Type I experimentwise error rate. Critical Value of Studentized Range 4.07597 Comparisons significant at the 0.05 level are indicated by ***. Difference design Between Simultaneous 95% Comparison Means Confidence Limits 4-3 7.700 1.421 13.979 *** 4-1 12.600 6.680 18.520 *** 4-2 13.800 7.880 19.720 *** 3-4 -7.700-13.979-1.421 *** 3-1 4.900-1.379 11.179 3-2 6.100-0.179 12.379 1-4 -12.600-18.520-6.680 *** 1-3 -4.900-11.179 1.379 1-2 1.200-4.720 7.120 2-4 -13.800-19.720-7.880 *** 2-3 -6.100-12.379 0.179 2-1 -1.200-7.120 4.720 Topic 19 24 Bonferroni (Dunn) t Tests for cases NOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than Tukey s for all pairwise comparisons. Critical Value of t 3.03628 Comparisons significant at the 0.05 level are indicated by ***. Difference design Between Simultaneous 95% Comparison Means Confidence Limits 4-3 7.700 1.085 14.315 *** 4-1 12.600 6.364 18.836 *** 4-2 13.800 7.564 20.036 *** 3-4 -7.700-14.315-1.085 *** 3-1 4.900-1.715 11.515 3-2 6.100-0.515 12.715 1-4 -12.600-18.836-6.364 *** 1-3 -4.900-11.515 1.715 1-2 1.200-5.036 7.436 2-4 -13.800-20.036-7.564 *** 2-3 -6.100-12.715 0.515 2-1 -1.200-7.436 5.036 Topic 19 25 Scheffe s Test for cases NOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than Tukey s for all pairwise comparisons. Critical Value of F 3.28738 Comparisons significant at the 0.05 level are indicated by ***. Difference design Between Simultaneous 95% Comparison Means Confidence Limits 4-3 7.700 0.859 14.541 *** 4-1 12.600 6.150 19.050 *** 4-2 13.800 7.350 20.250 *** 3-4 -7.700-14.541-0.859 *** 3-1 4.900-1.941 11.741 3-2 6.100-0.741 12.941 1-4 -12.600-19.050-6.150 *** 1-3 -4.900-11.741 1.941 1-2 1.200-5.250 7.650 2-4 -13.800-20.250-7.350 *** 2-3 -6.100-12.941 0.741 2-1 -1.200-7.650 5.250 Topic 19 26 Tukey s Studentized Range (HSD) Test for cases Critical Value of Studentized Range 4.07597 Minimum Significant Difference 6.1019 Harmonic Mean of Cell Sizes 4.705882 NOTE: Cell sizes are not equal. Means with the same letter are not significantly different. Mean N design A 27.200 5 4 B 19.500 4 3 B B 14.600 5 1 B B 13.400 5 2 Topic 19 27

Mixed Standard Effect design _design Estimate Error DF t Value Pr > t Adjustment Adj P design 1 2 1.2000 2.0539 15 0.58 0.5677. design 1 3-4.9000 2.1785 15-2.25 0.0399. design 1 4-12.6000 2.0539 15-6.13 <.0001. design 2 3-6.1000 2.1785 15-2.80 0.0135. design 2 4-13.8000 2.0539 15-6.72 <.0001. design 3 4-7.7000 2.1785 15-3.53 0.0030. design 1 2 1.2000 2.0539 15 0.58 0.5677 Tukey-Kramer 0.9353 design 1 3-4.9000 2.1785 15-2.25 0.0399 Tukey-Kramer 0.1549 design 1 4-12.6000 2.0539 15-6.13 <.0001 Tukey-Kramer 0.0001 design 2 3-6.1000 2.1785 15-2.80 0.0135 Tukey-Kramer 0.0583 design 2 4-13.8000 2.0539 15-6.72 <.0001 Tukey-Kramer <.0001 design 3 4-7.7000 2.1785 15-3.53 0.0030 Tukey-Kramer 0.0142 design 1 2 1.2000 2.0539 15 0.58 0.5677 Bonferroni 1.0000 design 1 3-4.9000 2.1785 15-2.25 0.0399 Bonferroni 0.2397 design 1 4-12.6000 2.0539 15-6.13 <.0001 Bonferroni 0.0001 design 2 3-6.1000 2.1785 15-2.80 0.0135 Bonferroni 0.0808 design 2 4-13.8000 2.0539 15-6.72 <.0001 Bonferroni <.0001 design 3 4-7.7000 2.1785 15-3.53 0.0030 Bonferroni 0.0180 design 1 2 1.2000 2.0539 15 0.58 0.5677 Scheffe 0.9507 design 1 3-4.9000 2.1785 15-2.25 0.0399 Scheffe 0.2125 design 1 4-12.6000 2.0539 15-6.13 <.0001 Scheffe 0.0002 design 2 3-6.1000 2.1785 15-2.80 0.0135 Scheffe 0.0895 design 2 4-13.8000 2.0539 15-6.72 <.0001 Scheffe <.0001 design 3 4-7.7000 2.1785 15-3.53 0.0030 Scheffe 0.0248 Glimmix Differences of design Least Squares Means Adjustment for Multiple Comparisons: Tukey-Kramer Standard design _design Estimate Error DF t Value Pr > t Adj P 1 2 1.2000 2.0539 15 0.58 0.5677 0.9353 1 3-4.9000 2.1785 15-2.25 0.0399 0.1549 1 4-12.6000 2.0539 15-6.13 <.0001 0.0001 2 3-6.1000 2.1785 15-2.80 0.0135 0.0583 2 4-13.8000 2.0539 15-6.72 <.0001 <.0001 3 4-7.7000 2.1785 15-3.53 0.0030 0.0142 Tukey-Kramer Grouping for design Least Squares Means (Alpha=0.05) LS-means with the same letter are not significantly different. design Estimate 4 27.2000 A 3 19.5000 B B 1 14.6000 B B 2 13.4000 B Topic 19 28 Topic 19 29 SAS Commands proc multtest data=a1 holm fdr out=new noprint; contrast 12 1-1 0 0; contrast 13 1 0-1 0; contrast 14 1 0 0-1; contrast 23 0 1-1 0; contrast 24 0 1 0-1; contrast 34 0 0 1-1; test mean(cases); proc print data=new; Obs _test var contrast value se nval_ raw_p stpbon_p fdr_p 1 MEAN cases 12 22.8 39.0248 15 0.56774 0.56774 0.56774 2 MEAN cases 13-93.1 41.3921 15 0.03995 0.07990 0.04794 3 MEAN cases 14-239.4 39.0248 15 0.00002 0.00010 0.00006 4 MEAN cases 23-115.9 41.3921 15 0.01346 0.04038 0.02019 5 MEAN cases 24-262.2 39.0248 15 0.00001 0.00004 0.00004 6 MEAN cases 34-146.3 41.3921 15 0.00300 0.01201 0.00601 Instead of comparing each raw P-value to a different α level, the P-values are adjusted based on the procedure. This approach works for experiments with a small number of levels. Can also input a set of P-values and perform the analysis. Topic 19 30 Topic 19 31

Linear Combination of Means Would like to test H 0 : L = c i µ i = L 0 Hypotheses usually planned but can be after the fact Can use statistical model to construct t-test L = c i Y i. Var( L) = Var( c i Y i. ) t = L L 0 Var( L) = c 2 ivar(y i. ) = MSE (c 2 i /n i ) Contrasts Special case of linear combination Requires c i = 0 Example 1: µ 1 µ 2 = 0 Example 2: µ 1 (µ 2 + µ 3 )/2 = 0 Example 3: (µ 1 + µ 2 ) (µ 3 + µ 4 ) = 0 Under H 0 : t t nt r Topic 19 32 Topic 19 33 SAS Commands proc glm data=a1; contrast 1&2 v 3&4 design.5.5 -.5 -.5; estimate 1&2 v 3&4 design.5.5 -.5 -.5; *Joint test of several contrasts; proc glm data=a1; contrast 1 v 2&3&4 design 1 -.3333 -.3333 -.3333; estimate 1 v 2&3&4 design 3-1 -1-1 /divisor=3; contrast 2 v 3 v 4 design 0 1-1 0, design 0 0 1-1; Contrast DF Contrast SS Mean Square F Value Pr > F 1&2 v 3&4 1 411.4000000 411.4000000 39.01 <.0001 Standard Parameter Estimate Error t Value Pr > t 1&2 v 3&4-9.35000000 1.49705266-6.25 <.0001 Contrast does an F test while Estimate does a t-test and gives an estimate of the linear combination. Contrast allows you to simultaneously test a collection of contrasts. Contrast DF Contrast SS Mean Square F Value Pr > F 1 v 2&3&4 1 108.4739502 108.4739502 10.29 0.0059 2 v 3 v 4 2 477.9285714 238.9642857 22.66 <.0001 Topic 19 34 Topic 19 35

Background Reading KNNL Sections 17.1-17.8 knnl738.sas KNNL Chapter 18 Topic 19 36