BIOMETRICS INFORMATION

Similar documents
BIOMETRICS INFORMATION

Testing Independence

The goodness-of-fit test Having discussed how to make comparisons between two proportions, we now consider comparisons of multiple proportions.

Chapter 10. Chapter 10. Multinomial Experiments and. Multinomial Experiments and Contingency Tables. Contingency Tables.

ij i j m ij n ij m ij n i j Suppose we denote the row variable by X and the column variable by Y ; We can then re-write the above expression as

Epidemiology Wonders of Biostatistics Chapter 13 - Effect Measures. John Koval

Ordinal Variables in 2 way Tables

11-2 Multinomial Experiment

ST3241 Categorical Data Analysis I Two-way Contingency Tables. Odds Ratio and Tests of Independence

Means or "expected" counts: j = 1 j = 2 i = 1 m11 m12 i = 2 m21 m22 True proportions: The odds that a sampled unit is in category 1 for variable 1 giv

Topic 21 Goodness of Fit

Frequency Distribution Cross-Tabulation

Some comments on Partitioning

CHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)

Q30b Moyale Observed counts. The FREQ Procedure. Table 1 of type by response. Controlling for site=moyale. Improved (1+2) Same (3) Group only

HYPOTHESIS TESTING: THE CHI-SQUARE STATISTIC

Chi square test of independence

Measures of Association for I J tables based on Pearson's 2 Φ 2 = Note that I 2 = I where = n J i=1 j=1 J i=1 j=1 I i=1 j=1 (ß ij ß i+ ß +j ) 2 ß i+ ß

Chi-Square. Heibatollah Baghi, and Mastee Badii

Statistics Handbook. All statistical tables were computed by the author.

Statistics for Managers Using Microsoft Excel

Module 10: Analysis of Categorical Data Statistics (OA3102)

Review of One-way Tables and SAS

ST3241 Categorical Data Analysis I Two-way Contingency Tables. 2 2 Tables, Relative Risks and Odds Ratios

BIOS 625 Fall 2015 Homework Set 3 Solutions

:the actual population proportion are equal to the hypothesized sample proportions 2. H a

Data are sometimes not compatible with the assumptions of parametric statistical tests (i.e. t-test, regression, ANOVA)

ERRATA FOR THE OTT/LONGNECKER BOOK AN INTRODUCTION TO STATISTICAL METHODS AND DATA ANALYSIS (3rd printing)

Page: 3, Line: 24 ; Replace 13 Building... with 13 More on Multiple Regression. Page: 83, Line: 9 ; Replace The ith ordered... with The jth ordered...

Chi-Squared Tests. Semester 1. Chi-Squared Tests

Cohen s s Kappa and Log-linear Models

2 Describing Contingency Tables

Multinomial Logistic Regression Models

Chapte The McGraw-Hill Companies, Inc. All rights reserved.

Lecture 28 Chi-Square Analysis

Introduction to Statistical Data Analysis Lecture 7: The Chi-Square Distribution

ST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses

Chi square test of independence

Logistic Regression Analysis

Lecture 8: Summary Measures

" M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2

Three-Way Contingency Tables

Logistic Regression Analyses in the Water Level Study

Mock Exam - 2 hours - use of basic (non-programmable) calculator is allowed - all exercises carry the same marks - exam is strictly individual

Lecture 9. Selected material from: Ch. 12 The analysis of categorical data and goodness of fit tests

POLI 443 Applied Political Research

STP 226 ELEMENTARY STATISTICS NOTES

Relate Attributes and Counts

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

Sociology 6Z03 Review II

Contingency Tables. Safety equipment in use Fatal Non-fatal Total. None 1, , ,128 Seat belt , ,878

SAS/STAT 14.1 User s Guide. Introduction to Nonparametric Analysis

16.400/453J Human Factors Engineering. Design of Experiments II

THE PEARSON CORRELATION COEFFICIENT

Tests for Two Coefficient Alphas

Simple logistic regression

STAT Chapter 13: Categorical Data. Recall we have studied binomial data, in which each trial falls into one of 2 categories (success/failure).

Lecture 25: Models for Matched Pairs

Count data page 1. Count data. 1. Estimating, testing proportions

Formulas and Tables by Mario F. Triola

Ling 289 Contingency Table Statistics

3 Way Tables Edpsy/Psych/Soc 589

E509A: Principle of Biostatistics. (Week 11(2): Introduction to non-parametric. methods ) GY Zou.

Split-Plot Designs. David M. Allen University of Kentucky. January 30, 2014

BIOMETRICS INFORMATION

Inference for Binomial Parameters

E509A: Principle of Biostatistics. GY Zou

Test 3 Practice Test A. NOTE: Ignore Q10 (not covered)

Two Correlated Proportions Non- Inferiority, Superiority, and Equivalence Tests

Chapter 10. Discrete Data Analysis

HOW TO USE PROC CATMOD IN ESTIMATION PROBLEMS

One-Way ANOVA. Some examples of when ANOVA would be appropriate include:

Parametric versus Nonparametric Statistics-when to use them and which is more powerful? Dr Mahmoud Alhussami

Tables Table A Table B Table C Table D Table E 675

Lecture 41 Sections Mon, Apr 7, 2008

13.1 Categorical Data and the Multinomial Experiment

Using Tables and Graphing Calculators in Math 11

Model Based Statistics in Biology. Part V. The Generalized Linear Model. Chapter 18.1 Logistic Regression (Dose - Response)

A SAS/AF Application For Sample Size And Power Determination

The Chi-Square Distributions

Epidemiology Principle of Biostatistics Chapter 14 - Dependent Samples and effect measures. John Koval

Lecture 41 Sections Wed, Nov 12, 2008

Basic Business Statistics, 10/e

Randomized Complete Block Designs

Unit 9: Inferences for Proportions and Count Data

Chapter 7 Comparison of two independent samples

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

Review of Statistics 101

Unit 9: Inferences for Proportions and Count Data

jh page 1 /6

Retrieve and Open the Data

Poisson Data. Handout #4

Statistics 3858 : Contingency Tables

Chapter 11. Analysis of Variance (One-Way)

Inference for Categorical Data. Chi-Square Tests for Goodness of Fit and Independence

STAT 705: Analysis of Contingency Tables

Introduction to Nonparametric Analysis (Chapter)

Epidemiology Wonders of Biostatistics Chapter 11 (continued) - probability in a single population. John Koval

Sections 3.4, 3.5. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis

Power Analysis for One-Way ANOVA

Transcription:

BIOMETRICS INFORMATION (You re 95% likely to need this information) PAMPHLET NO. # 41 DATE: September 18, 1992 SUBJECT: Power Analysis and Sample Size Determination for Contingency Table Tests Statistical power is a valuable tool for estimating sample size. It helps us to ensure that the sample size is large enough that the smallest difference of biological importance can be detected with a reasonable degree of certainty (Nemec 1991). This pamphlet discusses the computation of power for contingency table tests. The SAS programs for performing power analysis and sample size calculation are included. A contingency table test is a common method for analyzing categorical data. One of its applications is to test whether two or more classifications are independent of one another (see Biometrics Information Pamphlet No. 36 for a discussion on contingency table tests). As an example, suppose a survey was carried out in a district to assess the relationship between stream conditions and the slope on which streams are located. 100 streams were evaluated; 49 streams were located on a steep slope (over 20% gradient), 51 streams were located on a shallow slope (less than or equal to 20% gradient). The habitat quality of each stream was classified as GOOD, AVERAGE, or LOW according to fish abundance and the volume of large organic debris found along the stream. Table 1 below displays the hypothetical data for this survey. Table 1: Observed counts for the stream assessment survey 3 Habitat Quality 3 Row Slope 3 GOOD AVERAGE LOW 3 Total ssssssssssssssssss3 ssssssssssssssssssssssssssssssssssssssssssssss 3 ssssssssssss STEEP 3 26 13 10 3 49 SHALLOW 3 20 23 8 3 51 ssssssssssssssssss3 ssssssssssssssssssssssssssssssssssssssssssssss 3 ssssssssssss Column 3 3 Total 3 46 36 18 3 100 Based on the collected data, we want to test whether habitat quality is independent of slope. That is, whether the proportion of streams in each of the three habitat quality levels are the same for steep slope and shallow slope streams. To test the hypothesis that habitat quality is independent of slope, we can compute a χ 2 statistic for the contingency table: ce l ls (O - E) 2 χ 2 = ssssssssss (1) all E where O is the observed count and E is the estimated expected count under the null hypothesis of independence. Ministry of Forests Research Program

2 The estimated expected count of a cell is the product of the corresponding marginal totals 1 divided by the total count. For example, the upper left cell, corresponding to GOOD habitat quality and STEEP slope has an estimated count: E = 49x46 ssssssssssssss 100 = 22.54 The estimated expected counts for the other cells of the contingency table is given in Table 2. Table 2: Expected counts based on Table 1 3 Habitat Quality Slope 3 GOOD AVERAGE LOW ssssssssssssssssss3 ssssssssssssssssssssssssssssssssssssssssssssss STEEP 3 22.54 17.64 8.82 SHALLOW 3 23.46 18.36 9.18 Therefore, the χ 2 statistic for this example is: (26-22. 54) 2 (13-17. 64) 2 (10-8. 82) 2 (20-23. 46) 2 (23-18. 36) 2 (8-9. 18) 2 χ 2 = sssssssssssssssssss+ sssssssssssssssssss+ sssssssssssssssss+ sssssssssssssssssss+ sssssssssssssssssss+ sssssssssssssss= 3.744 22. 54 17. 64 8. 82 23. 46 18. 36 9. 18 The degrees of freedom are (see Biometrics Information Pamphlet No. 21): df = (no. of slope conditions - 1) (no. of habitat levels - 1) = (2-1)(3-1) = 2 With two degrees of freedom, a χ 2 value of 3.744 has a p-value of 0.154. conclude that there is no evidence that habitat quality is dependent on slope. This χ 2 test can be performed with the following SAS program: We can therefore SAS program 1: To perform contingency table test: DATA EG1; LENGTH SLOPE $7 QUALITY $7; DO SLOPE = 'STEEP', 'SHALLOW'; DO QUALITY = 'GOOD', 'AVERAGE', 'LOW'; INPUT COUNT@@; OUTPUT; CARDS; 26 13 10 20 23 8 ; PROC FREQ DATA = EG1; TABLES SLOPE*QUALITY/NOCOL NOPERCENT CELLCHI2 CHISQ; WEIGHT COUNT; 1 Marginal totals are the row and column totals as indicated in Table 1.

3 Pamphlet #41 sssssssssssssssssssss The TABLES statement requests a table of SLOPE by QUALITY. The first two options suppress the printing of column percentages and cell percentages in each cell. The option CELLCHI2 specifies the printing of each cell's contribution to the total χ 2 ; The option CHISQ requests the χ 2 test of independence with various statistics. The SAS output from this program is shown below. Note that the habitat levels have been re-ordered alphabetically and that the χ 2 statistic and p-value are consistent with our calculations. SAS output from PROC FREQ: The SAS System TABLE OF SLOPE BY QUALITY SLOPE QUALITY Frequency Cell Chi-Square Row Pct average low good Total shallow 23 8 20 51 1.1726 0.1517 0.5103 45.10 15.69 39.22 steep 13 10 26 49 1.2205 0.1579 0.5311 26.53 20.41 53.06 Total 36 18 46 100 STATISTICS FOR TABLE OF SLOPE BY QUALITY Statistic DF Value Prob ------------------------------------------------------ Chi-Square 2 3.744 0.154 Likelihood Ratio Chi-Square 2 3.782 0.151 Mantel-Haenszel Chi-Square 1 3.209 0.073 Phi Coefficient 0.193 Contingency Coefficient 0.190 Cramer's V 0.193 Sample Size = 100 Anon-significant result does not guarantee independence. It is possible that habitat quality and slope are dependent but the experiment is not sensitive enough to detect it. A power analysis can help us decide if the non-significant conclusion is reliable. The power of a χ 2 test depends on its non-centrality parameter, nc (Cohen 1977, Nemec 1991). For contingency table tests, the alternative hypothesis (H a ) is that the cell frequencies are distributed in a particular way, and nc is the χ 2 statistic 2 evaluated under H a. For our example, 2 For log-linear models, nc is the likelihood-ratio χ 2 evaluated under the alternative hypothesis. See O'Brien 1988 for details.

4 the H a of the χ 2 test is that the cell frequencies are distributed as in Table 1, and nc = 3.744. The power of a test is the right tail probability under the alternative hypothesis, characterized by nc (Bergerud and Sit 1992). It can be calculated with the following SAS program: SAS program 2: To compute power for contingency table test: DATA; ALPHA = 0.05; DF = 2; NC = 3.744; C = CINV(1-ALPHA,DF); POWER =1-PROBCHI(C,DF,NC); PUT 'POWER = ' POWER; At α = 0.05, the power of the experiment is 0.39 (this result appears in the LOG window). That is, if SLOPE and QUALITY were dependent to the extent suggested by the data, the experiment would be able to detect it 39% of the time. Such low power makes the non-significant conclusion unreliable. Suppose the survey was only a pilot study for a larger survey. We can use the test results to estimate an adequate sample size for the new survey. For contingency table tests, the non-centrality parameter can be written as: nc = d 2 N (2) where d is the effect size and N is the total sample size. Effect size, d, measures the degree of departure from the null hypothesis. Suppose we want to estimate the sample size required to detect a pattern similar to that shown in Table 1, then nc = 3.744, N = 100, and irrrrrrrrrr d = j3. 744 ssssssssss = 0.193 g 100 For two-way contingency tables, d is also the phi coefficient (see SAS output). The following SAS program computes power for various N. SAS program 3: To estimate sample size SAS output: for contingency table test: N POWER DATA; 100 0.39 ALPHA = 0.05; DF = 2; D = 0.193; 150 0.55 C = CINV(1-ALPHA,DF); 200 0.68 DO N = 100 TO 400 BY 50; 250 0.79 NC = D*D*N; 300 0.86 POWER = 1-PROBCHI(C, DF, NC); 350 0.91 OUTPUT; 400 0.94 PROC PRINT; VAR N POWER; ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

5 Pamphlet #41 sssssssssssssssssssss The results show that to detect a pattern similar to that displayed in Table 1, a minimum of 350 streams must be sampled for a power of at least 91%. As an exercise, suppose we want to design an experiment to test the alternative hypothesis as shown in Table 3. How many streams should we survey to ensure the test has a power of 90%? Table 3: Cell counts for the alternative hypothesis (H a ) 3 Habitat Quality Slope 3 GOOD AVERAGE LOW ssssssssssssssssss3 ssssssssssssssssssssssssssssssssssssssssssssss STEEP 3 5 7 13 SHALLOW 3 10 36 29 With SAS program 1, we compute that this H a has χ 2 = 3.093 and d = 0.176. Using SAS program 3, we calculate the power of the experiment for various sample sizes: SAS output from SAS program 3: N POWER 100 0.33 150 0.47 200 0.60 250 0.70 300 0.78 350 0.85 400 0.89 450 0.93 The results indicate that to ahcieve a power of 90%, a sample size between 400 and 450 streams is required to detect a pattern similar to that shown in Table 3. References Bergerud, W. (1989). What are degrees of freedom. Biometrics Information Pamphlet No. 21. B.C. Min. For., Res. Br., Victoria, B.C. ssssssssssssssssssss (1992). Contingency tables and log-linear models. Biometrics Information Pamphlet No. 36. B.C. Min. For., Res. Br., Victoria, B.C. Bergerud, W. and V. Sit (1992). Power Analysis Workshop Notes. B.C. Min. For., Res. Br., Victoria, B.C. Cohen, J. (1977). Statistical Power Analysis for the Behavioral Sciences. Academic Press, Inc. New York. Nemec, A. (1991). Power Analysis Handbook for the Design and Analysis of Forestry Trials. Biometrics Handbook No. 2. B.C. Min. For., Res. Br., Victoria, B.C. CONTACT: Vera Sit 356-0435