of 36 /36
Copyright ©2010 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. Statistics and Data Analysis for Nursing Research, Second Edition Denise F. Polit Statistics and Data Analysis for Nursing Research Second Edition CHAPTER Chi-Square and Nonparametric Tests 8

Polit ln ch08

Embed Size (px)

Citation preview

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Statistics and Data Analysisfor Nursing Research

Second Edition

CHAPTER

Chi-Square and Nonparametric Tests

8

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Nonparametric Tests

• Nonparametric tests are used primarily when: – (1) Outcomes are not measured on an interval

or ratio scale and/or – (2) Assumptions for parametric test are

severely violated Especially when sample sizes are small

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Which Nonparametric Test?

• Selection of a nonparametric test depends mostly on:– Number of groups being compared

Two versus three or more groups

– Type of comparison being made Independent groups (between-subjects

design) Dependent groups (within-subjects/

repeated measures, correlated groups designs)

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Tests for Independent Groups

Number of Groups

Level of Measurement (Outcome Variable)

Nominal Measures

Ordinal Measures

Two Groups

Chi-square test Mann-Whitney U test

Three or More Groups

Chi-square test Kruskal-Wallis test

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Chi-Square Test of Independence

• Tests relationships between two categorical variables in a crosstabs table– Put differently, it is a test of differences in

proportions between groups

• Also called Pearson’s chi-square test

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Chi-Square Test Hypotheses

• Null hypothesis: The two categorical variables are independent (unrelated)– I.e., proportions across groups are equal

• Alternative hypothesis: The two variables are not independent—they are related– I.e., proportions across groups are not equal

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Assumptions for Chi-Square Test

• Random sampling of observations from the population

• Each observation is independent (i.e., not appropriate for correlated groups or repeated measurements)

• Each cell in the contingency table must have an expected frequency greater than 0

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

General Logic for Chi-Square Test

• If null hypothesis is true, there should be no differences in proportions (relative frequencies) for groups being compared

• So, the test contrasts observed frequencies in each cell of a crosstabs table with expected frequencies—that is, the frequencies that would be expected if the null hypothesis were true

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Contingency Table Example

Experiment-al Group (E)

Control Group (C)

Total

Incontinent 1020.0%

2040.0%

30

30.0%

Not Incontinent

4080.0%

3060.0%

7070.0%

Total 50100.0%

50100.0%

100100.0%

• A higher proportion of Cs than Es were incontinent—but is this just random fluctuation?

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Observed Versus Expected Frequencies

E Group C Group TotalIncontinent 10 (20.0%)

(CELL A)20 (40.0%) 30 (30.0%)

Not Incontinent 40 (80.0%) 30 (60.0%) 70 (70.0%)

Total 50 (100.0%) 50 (100.0%) 100 (100.0%)

• If null true, both Es and Cs would have 30% incontinent (see Total Row %): 15 each

• Cell A, Observed (OA) = 10 Expected (EA) = 15

• EA = Row TotA (30) × Col TotA (50) ÷ N (100)

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

• If null hypothesis is true, all observed values (O) would equal expected values (E)

• O – E differences would be zero• Population value of the chi-square statistic

(χ2 ) if null is true = 0.0• Sampling distributions of the statistic are

asymmetric around the value of 0.0

Sampling Distribution

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

• For each cell, compute the following:

(O – E)2 ÷ E

• Cell A in our example: (10 - 15)2 ÷ 15 = 1.67

• Then add all the cell components together to obtain χ2

• In our example with four cells: χ2 = 1.67 + 1.67 + .71 + .71 = 4.46

Computation of Chi-Square

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

• Table of critical values requires knowing (1) df and (2) significance criterion (e.g., .05)

• In χ2 , df =(Rows – 1) × (Columns – 1)– Here: df = (2 – 1) × (2 – 1) = 1

• If calculated χ2 > tabled value, results are significant– Critical value for df = 1 and α = .05: 3.84

χ2 = 4.46, so null hypothesis is rejected

Testing Significance of Chi-Square

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

• If expected value for multiple cells is < 5, use Fisher’s exact test

• Sometimes for 2 × 2 tables, a correction factor is applied: Yates continuity correction– Reduces value of chi-square– Avoid if expected frequencies are large, as it

can lead to Type II errors

Related Issues for Chi-Square

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

• Index summarizing strength of relationship in a 2 × 2 design: phi (φ)– Phi varies from 0 to 1, and can be interpreted

as Pearson’s r

• Index summarizing strength of relationship in larger tables: Cramér’s V – V also varies from 0 to 1– V = φ in a 2 × 2 design

Magnitude of Effects

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

• Magnitude of effects in a 2 × 2 design most often expressed through risk indexes previously discussed:– Odds ratio (OR)– Relative risk (RR)

• These indexes especially likely to be used in meta-analyses

Alternative Effect Size: Risk Indexes

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

• Cramér’s V can be used to estimate needed sample size for 2 × 3 tables or larger– Need estimate of V, desired power (usually .

80) and alpha (usually .05); – Then, consult a table to get estimate of

needed N, for contingency tables of specified dimensions

– E.g., if V = .20 (2 × 3) N = 241

Power Analysis

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Power Analysis (cont’d)

• For a 2 × 2 design, sample size needs most often obtained using estimates of proportions in the two groups

• Effect size larger (and sample size needs smaller) for estimated differences at the extremes:– Group 1 = .10, Group 2 = .20, n = 219– Group 1 = .40, Group 2 = .50, n = 407– Group 1 = .80, Group 2 = .90, n = 219

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Other Tests for Independent Groups

• For ordinal-level data—or for higher-level data when parametric tests cannot be used because of a violated assumption:– Two groups—Mann-Whitney U test– Three or more groups—Kruskal-Wallis test

• Both are rank tests that examine differences between groups in location

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Mann-Whitney U Test

• Tests the null hypothesis that two population distributions are identical– The nonparametric analog of the

independent groups t-test

• For ns > 20, normal distribution (z values) can be used

• When displaying outcomes in a table, median values of the dependent variable for the two groups are often shown

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Mann-Whitney U Test: SPSS Output

• One panel shows mean ranks and sum of ranks for the two groups

• Main panel presents test statistics (key values highlighted)

• Assume both ns = 9

Apgar Score

Mann-Whitney U 16.000

Wilcoxon W 46.000

Z 1.94

Asympt. Sig. .043

Exact Sig. .049

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Kruskal-Wallis Test

• Tests the null hypothesis that three or more population distributions are identical:– The nonparametric analog of one-way

ANOVA

• Compares the ranks of the values for the groups

• Test statistic is H, which follows chi-square distribution

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Kruskal-Wallis Test: Nature of Effects

• Significant result only indicates that there is a difference among the groups—does not indicate which ones

• To isolate groups that are significantly different: Use the Dunn procedure– This involves using Mann-Whitney U for

all possible pairs

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Bonferroni Correction

• When the Dunn procedure is used, the risk of a Type I error increases—there are more opportunities for “chance fluctuations” to appear significant

• Need to use a Bonferroni correction to adjust the risk of a Type I error with multiple tests

• Correction involves dividing desired alpha by number of pairs for which Mann-Whitney U tests are run

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Bonferroni Correction (cont’d)

• Table indicates corrected alpha for different number of groups in the Kruskal-Wallis test

• Assumes desired α = .05

Groups Pairs Corrected α

3 3 .017

4 6 .008

5 10 .005

6 15 .003

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Tests for Dependent Groups

Number of Groups (or

Measurement Periods)

Level of Measurement (Outcome Variable)

Nominal Measures

Ordinal Measures

Two McNemar Test Wilcoxon Signed-Ranks Test

Three or More Cochran’s Q Test

Friedman Test

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

McNemar Test

• Tests differences in proportions for the same people measured twice (or for paired groups, like mothers/ daughters)

• Yields a statistic distributed as a chi-square, with df = 1

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Wilcoxon Signed-Ranks Test

• Tests differences in ordinal-level measures for the same people measured twice (or for paired groups, like Sibling A/Sibling B)– The nonparametric analog of a paired t-test

• Another example of a rank test• For n > 10, it follows a normal distribution,

so the test statistic is z

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Cochran’s Q Test

• Tests differences in proportions for the same people measured three or more times (or correlated groups)

• Yields a statistic distributed as a chi-square, with df = 1

• Not many applications in the nursing literature

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Friedman Test

• Tests differences in ordinal-level measures for the same people measured three or more times (or for correlated groups)– The nonparametric analog of an RM-ANOVA

• Another example of a rank test• Test statistic is a chi-square with (k – 1)

degrees of freedom (k = number of measurements)

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Parametric-Nonparametric Analogs

Parametric Test Nonparametric Test

Independent groups t-test

Mann-Whitney U test

Dependent groups t-test

Wilcoxon signed-ranks test

One-way ANOVA Kruskal-Wallis test

RM-ANOVA Friedman test

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

Nurse Researchers’ Use of Nonparametrics

• Very crude approximation, using counts in PubMed for 2006-2007 for nursing subset—number of “hits”– Chi-square: 273 WINNER!!!– Mann-Whitney: 38– Kruskal-Wallis: 15– McNemar test: 6– Wilcoxon signed-ranks: 5– Friedman test: 2– Cochran’s Q test: 0

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

SPSS and Chi-Square Tests

• Analyze Descriptives Crosstabs

• Click Statistics to get statistical tests

• Click Cells to get expected frequencies

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

SPSS and Chi-Square Tests (cont’d)

• Crosstabs: Statistics includes:

• The chi-square statistic

• Phi and Cramer’s V• The McNemar test

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

SPSS and Other Nonparametric Tests

• Other nonparametric tests discussed in this chapter are available through Analyze Nonparametric Tests

• Options within this class include:– 2 Independent samples (Mann-Whitney)– K Independent samples (Kruskal-Wallis)– 2 Related samples (Wilcoxon signed-ranks)– K related samples (Cochran’s Q, Freidman)

Copyright ©2010 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Statistics and Data Analysis for Nursing Research, Second EditionDenise F. Polit

SPSS and Other Nonparametric Tests (cont’d)

• E.g., 2 Independent samples

• Move DV into Test Variable List

• Move IV into Grouping Variable list (& provide codes for the 2 groups)

• Click Mann-Whitney