unit 08 contingency tables

Upload: 3rlang

Post on 14-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 Unit 08 Contingency Tables

    1/61

    Biostatistics 200

    Unit 8: Inference for ContingencyTables

    P & G Sections 15.1, 15.3

    Section 6.5

    19 November 2012

    1 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    2/61

    The chi-squared test in contingency tables, P&G Chapter

    15, pp 342 - 349

    Odds and Odds Ratios, P&G Chapter 6, pp 144 - 149,section 15.3

    Confidence intervals for an OR, P&G, pp 352 - 357

    Summary

    2 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    3/61

    PROGRESS THIS UNIT

    The chi-squared test in contingency tables, P&G Chapter15, pp 342 - 349

    Odds and Odds Ratios, P&G Chapter 6, pp 144 - 149,

    section 15.3

    Confidence intervals for an OR, P&G, pp 352 - 357

    Summary

    3 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    4/61

    OUTLINE FOR THIS SECTION

    Reformulating the two-sample binomial problem as acontingency table.

    Contingency tables and testing for associationsbetween categorical variables (22 and r c tables)

    Main method will be the Pearson chi-squared (2)test, but we will also discuss Fishers exact test.

    4 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    5/61

    ANALYZING BINARY DATA FROM TWO

    POPULATIONS IN A TABLE

    Let x1 and x2 be the observed number of successes for twobinomial variables, with numbers of trials n1 and n2.

    The two sample proportions would be

    p1 =x1

    n1p2 =

    x2n2

    Inference for the difference p1 p2 can be based onp1 p2.

    The text covers that approach in section 14.6. Instead, we

    will use two-way tables.5 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    6/61

    TWO-WAY (CONTINGENCY) TABLESBinomial outcomes in two samples can be organized in atable

    Table of Outcome by GroupOutcome Group

    Sample 1 Sample 2 TotalSuccess a = x1 b = x2 a + bFailure c d c + dTotal a + c = n1 b + d = n2 n1 + n2 = n

    With this notation,

    p1 =a

    a + c

    p2 =b

    b + d

    6 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    7/61

    THE ORGANIZATION OF TABLES

    Typically, the group variable is used for the columns,and the outcome variable (success or failure) for therows.

    The group variable is sometimes called theexplanatory variable.

    The outcome variable is sometimes called theresponse variable.

    7 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    8/61

    THE ORGANIZATION OF TABLES. . .

    Epidemiologists often use case-control designs,where cases are sampled according to outcome(typically, disease or no disease) and exposure ismeasured based on retrospective records.

    In a case-control analysis, Stata uses theexposure status as the column label because it isthe explanatory variable.

    Epi 202 uses exposure as the column variable. Epi 500 uses the exposure status as the row

    variable.

    I use the Epi 202/Stata convention.

    8 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    9/61

    HARVARD UNDERGRADUATE ATTITUDES

    TOWARD ABORTION

    In 2007, I asked my undergraduate class Should awoman be able to obtain a legal abortion for any reason ifshe chooses not to have the child?

    Answer by Sex of StudentOutcome Group

    Female Male TotalYes 73 37 110

    No 22 18 40Total 95 55 150

    Sex is group variable, Yes/No is outcome.

    9 / 6 1

  • 7/30/2019 Unit 08 Contingency Tables

    10/61

    THE SURVEY ON ATTITUDES TOWARD

    ABORTION . . .

    Equivalent ways of asking the research question in myclass survey

    Are female and male students equally likely toanswer yes to the abortion question?

    Is response to the abortion question independent ofsex of the student?

    Is there any association between response and sex ofthe student?

    10/61

  • 7/30/2019 Unit 08 Contingency Tables

    11/61

    ATTITUDES TOWARD ABORTION

    In this setting, the null hypothesis is that response and

    sex of the student (i.e, row and column variables) areindependent.

    The alternative is that they are not independent.

    Equivalently, let

    pF = probability that a randomly chosen femalestudent answers yes

    pM = probability that a randomly chosen malestudent answers yes

    Then the hypotheses are H0 : pF = pM vs HA : pF = pM.

    11/61

  • 7/30/2019 Unit 08 Contingency Tables

    12/61

    TESTING THE NULL HYPOTHESIS OF

    INDEPENDENCE

    The (Pearson) Chi-Square Test: basic idea

    1. If the row and column variables are independent(null hypothesis is true) what do we expect to see?

    2. How do expected values in the table compare towhat has been observed?

    12/61

  • 7/30/2019 Unit 08 Contingency Tables

    13/61

    COMPUTING EXPECTED CELL COUNTS

    UNDER THE NULL HYPOTHESIS OF

    INDEPENDENCEConsider the 95 female respondents in the 2 2 table

    If sex and response were independent, whatpercentage of the female students would be expectedto respond yes?110/150 = 0.73333 = 73% Why?

    How many students do we expect to fall into the celldefined by female, yes?

    (95)(0.73333) = 69.7 Why?

    What was the observed cell count? 73observed - expected= 73 69.7 = 3.3

    Now compute the expected values for all cells.

    13/61

  • 7/30/2019 Unit 08 Contingency Tables

    14/61

    A SIMPLE FORMULA FOR EXPECTED COUNTS

    Possible to show that for a cell in row i, column j, theexpected cell count under the hypothesis of independenceis

    row i total column j total

    total count in tableThis formula applies also to tables with more than tworows or columns (example coming later)

    Lets test the hypothesis of no association (independence)between the sex of the respondent and response.

    14/61

  • 7/30/2019 Unit 08 Contingency Tables

    15/61

    NULL AND ALTERNATIVE HYPOTHESES IN

    THIS SETTING

    Equivalent ways to state the relevant hypotheses in this2 2 table:

    H0: Sex of respondent and response are independentvs. HA: Sex of respondent and response are notindependent.

    H0 : pF = pM vs. HA : pF = pM, where pF and pM are

    the probabilities of female and male yes response,respectively.

    15/61

    2

  • 7/30/2019 Unit 08 Contingency Tables

    16/61

    (PEARSON) CHI-SQUARE (2) TEST

    The test statistic for the hypotheses on the previous slide

    is

    2 =

    all cells

    (obs - exp)2

    exp

    The statistic has a sampling distribution that isapproximately 2 with degrees of freedomdf= (r 1)(c 1) where r = # rows, c = # columns.

    In a 2 2 table, df = 1.

    Important values from the distribution are given in TableA.8 on page A-26.

    16/61

    2

  • 7/30/2019 Unit 08 Contingency Tables

    17/61

    A SIMILAR 2 TABLE, BUT WITH MORE

    DETAIL

    Table entry for p is thecritical value (2) with

    probability p lying to itsright.

    Probability p

    ( 2)*

    TABLE F

    2 distribution critical values

    Tail probability p

    df .25 .20 .15 .10 .05 .025 .02 .01 .005 .0025 .001 .0005

    1 1.32 1.64 2.07 2.71 3.84 5.02 5.41 6.63 7.88 9.14 10.83 12.122 2.77 3.22 3.79 4.61 5.99 7.38 7.82 9.21 10.60 11.98 13.82 15.203 4.11 4.64 5.32 6.25 7.81 9.35 9.84 11.34 12.84 14.32 16.27 17.734 5.39 5.99 6.74 7.78 9.49 11.14 11.67 13.28 14.86 16.42 18.47 20.005 6.63 7.29 8.12 9.24 11.07 12.83 13.39 15.09 16.75 18.39 20.51 22.116 7.84 8.56 9.45 10.64 12.59 14.45 15.03 16.81 18.55 20.25 22.46 24.107 9.04 9.80 10.75 12.02 14.07 16.01 16.62 18.48 20.28 22.04 24.32 26.028 10.22 11.03 12.03 13.36 15.51 17.53 18.17 20.09 21.95 23.77 26.12 27.879 11.39 12.24 13.29 14.68 16.92 19.02 19.68 21.67 23.59 25.46 27.88 29.67

    10 12.55 13.44 14.53 15.99 18.31 20.48 21.16 23.21 25.19 27.11 29.59 31.42

    17/61

  • 7/30/2019 Unit 08 Contingency Tables

    18/61

    EVER GROWING CATALOGUE OF

    DISTRIBUTIONS

    Binomial

    Normal t

    F

    2

    18/61

    C S ( 2) T

  • 7/30/2019 Unit 08 Contingency Tables

    19/61

    CHI-SQUARE (2) TEST

    If the rows and columns are independent, theobserveds and expecteds shouldnt be verydifferent, and 2 value will be small

    If there is an association between rows and columns,the observeds may be far from the expecteds,

    leading to a large 2 value So, reject the null hypothesis when 2 value is

    sufficiently large (look only at upper tail of chi squaredistribution).

    Like the F-test in ANOVA, the alternative isinherently two-sided, but the right tail area is notdoubled.

    19/61

    A S

  • 7/30/2019 Unit 08 Contingency Tables

    20/61

    ABORTION ATTITUDES, IN STATA. tabi 73 37 \ 22 18, cchi2 chi2 expected

    +--------------------+

    | Key |

    |--------------------|| frequency |

    | expected frequency |

    | chi2 contribution |

    +--------------------+

    | col

    row | 1 2 | Total

    -----------+----------------------+----------

    1 | 73 37 | 110

    | 69.7 40.3 | 110.0

    | 0.2 0.3 | 0.4

    -----------+----------------------+----------

    2 | 22 18 | 40

    | 25.3 14.7 | 40.0| 0.4 0.8 | 1.2

    -----------+----------------------+----------

    Total | 95 55 | 150

    | 95.0 55.0 | 150.0

    | 0.6 1.0 | 1.6

    Pearson chi2(1) = 1.6311 Pr = 0.202

    20/61

    U 2

  • 7/30/2019 Unit 08 Contingency Tables

    21/61

    USING A TABLE OF THE 2 DISTRIBUTION

    As with the t-distribution, tables in P&G yield only

    approximations to p-values. Here are the first three rowsof the P&G table:

    Area in the Upper Tail

    df 0.10 0.05 0.025 0.01 0.001

    1 2.706 3.841 5.024 6.635 10.828

    2 4.605 5.991 7.378 9.210 13.816

    3 6.251 7.815 9.348 11.345 16.266

    ........

    From the table we see that p > 0.10

    21/61

    EXAC O S O 2 2 A S

  • 7/30/2019 Unit 08 Contingency Tables

    22/61

    EXACT METHODS FOR 22 TABLESFishers exact test is often used with small and moderatesample sizes. It is similar in spirit to using exact Binomial

    calculations in a one sample problem.

    Rule of thumb coming later for sample sizes whereFishers test should be used. Easy to get in Stata:

    . tabi 73 37 \ 22 18, exact

    | col

    row | 1 2 | Total

    -----------+----------------------+----------

    1 | 73 37 | 110

    2 | 22 18 | 40-----------+----------------------+----------

    Total | 95 55 | 150

    Fishers exact = 0.251

    1-sided Fishers exact = 0.139

    22/61

    IDEA BEHIND FISHERS EXACT TEST

  • 7/30/2019 Unit 08 Contingency Tables

    23/61

    IDEA BEHIND FISHERS EXACT TEST

    Condition on the observed row and column totals.

    Given the row and column totals, the 4 cell counts aredetermined by any one of the cell counts. Upper leftcell is typically used.

    For the sampling distribution: Use the conditionaldistribution of values for the upper left cell, given therow and column totals and under the hypothesis ofindependence.

    A one-sided p-value is the probability of observing avalue as or more extreme as the cell count in the

    upper left corner. Two-sided p-values even more complicated.

    We will only consider two-sided tests in contingencytables.

    23/61

    CONTINGENCY TABLES WITH MORE THAN 2

  • 7/30/2019 Unit 08 Contingency Tables

    24/61

    CONTINGENCY TABLES WITH MORE THAN 2

    ROWS OR 2 COLUMNS2 tests for tables with r > 2 rows and/or c > 2 columnspresent no difficulties.

    Use the earlier formula for expected count for cell in rowi, col j under hypothesis of independence of rows andcolumns:

    row i total column j total

    total count in table

    The chi-square statistic still has the form

    2 =

    all cells

    (obs-exp)2exp

    but has degrees of freedom df= (r 1)(c 1). 24/61

  • 7/30/2019 Unit 08 Contingency Tables

    25/61

    Values in green are expected counts

  • 7/30/2019 Unit 08 Contingency Tables

    26/61

    Values in green are expected counts.Certificate Status

    Hospit. Confirmed Inaccurate Incorrect TotalAccurate No Change Recoded

    Commun. 157 169.3 18 24.7 54 35.0 229Teaching 268 255.7 44 37.3 34 53.0 346

    Total 425 62 88 575

    2 = all cells

    (obs-exp)2exp

    = 21.52

    df= (r 1)(c 1) = (1)(2) = 2

    In Table A.8, 2df=2,0.001 = 13.82, p-value < 0.001, so wereject the null-hypothesis that accuracy in deathcertificates is independent of hospital type.

    26/61

    STATA

  • 7/30/2019 Unit 08 Contingency Tables

    27/61

    STATA. . .. tabi 157 18 54 \268 44 34, expected chi exact

    ....some output not shown

    | col

    row | 1 2 3 | Total

    -------+---------------------------------+----------

    1 | 157 18 54 | 229

    | 169.3 24.7 35.0 | 229.0-------+---------------------------------+----------

    2 | 268 44 34 | 346

    | 255.7 37.3 53.0 | 346.0

    -------+---------------------------------+----------

    Total | 425 62 88 | 575| 425.0 62.0 88.0 | 575.0

    Pearson chi2(2) = 21.5235 Pr = 0.000

    Fishers exact = 0.000

    27/61

    SOME COMMENTS

  • 7/30/2019 Unit 08 Contingency Tables

    28/61

    SOME COMMENTS

    The 2 test for r c tables does not take into account any

    natural ordering of rows or columns that might bepresent in data.

    The text mentions the Yates continuity correction (p 346)sometimes used in calculating the 2 statistic in smallsamples. Used far less often now; better to use Fishersexact test.

    Fishers exact test can be used to assess associations in

    general r c tables.Very common now for papers to report Fishers exact test,even in moderately large samples.

    28/61

    COMMENTS

  • 7/30/2019 Unit 08 Contingency Tables

    29/61

    COMMENTS. . .

    The following rule of thumb is used for the validity for

    the Pearson 2 test:

    In 2 2 tables, each expected cell count (calculatedunder the hypothesis of independence) should be at

    least 5. In tables with more than 4 cells (excluding the cells

    with the row and column totals), the averageexpected count should be at least 5, and no expectedcount should be smaller than 1.

    When these conditions do not hold, use Fishersexact test.

    29/61

    COMMENTS

  • 7/30/2019 Unit 08 Contingency Tables

    30/61

    COMMENTS. . .Alternate form of2 test for 2 2 tables.

    If the table has entries

    Outcome GroupSample 1 Sample 2 Total

    Success a b a + b

    Failure c d c + dTotal n1 n2 n

    then the 2 test can be written

    2 =n(ad bc)2

    (a + c)(b + d)(a + b)(c + d)

    df = 1

    30/61

    PROGRESS THIS UNIT

  • 7/30/2019 Unit 08 Contingency Tables

    31/61

    PROGRESS THIS UNIT

    The chi-squared test in contingency tables, P&G Chapter15, pp 342 - 349

    Odds and Odds Ratios, P&G Chapter 6, pp 144 - 149,

    section 15.3

    Confidence intervals for an OR, P&G, pp 352 - 357

    Summary

    31/61

    INTRODUCTION

  • 7/30/2019 Unit 08 Contingency Tables

    32/61

    INTRODUCTION

    The 2

    and Fishers exact test provide methods for testingthe null hypothesis of independence between row andcolumn variables.

    But neither test provides an estimate of the nature of the

    association when the hypothesis of independence isrejected.

    We will use odds ratios for estimating associationbetween row and column variables.

    To study odds ratios, we first need to study odds.

    32/61

    USING ODDS IN BINOMIAL MODELS

  • 7/30/2019 Unit 08 Contingency Tables

    33/61

    USING ODDS IN BINOMIAL MODELS

    33/61

    BETTING IN A FAIR GAME

  • 7/30/2019 Unit 08 Contingency Tables

    34/61

    BETTING IN A FAIR GAME

    An American roulette wheel has 38 slots: 1,2,3,. . . ,36, 0, 00

    If you place a $1 bet on 00 for a single spin of the wheel,

    You have 1/38 chance of winning in a single spin

    1 way to win, 37 ways to lose, or

    The casino has 37 ways to win, 1 way to lose

    The odds of winning for the house are 37 to 1 and are

    1 to 37 for you

    34/61

    BETTING IN ROULETTE

  • 7/30/2019 Unit 08 Contingency Tables

    35/61

    BETTING IN ROULETTEFor the game to be fair,

    Casino keeps your $1 if 00 does not come up

    Casino pays $37 if 00 comes up, and you keep your$1 bet

    IfXrepresents your winnings from a $1 bet and E(X)the average winnings in many such bets

    E(X) = 1(37/38) + 37(1/38) = 0

    Casinos stay in business

    by paying out 35 to 1, the casinos insure that rouletteis not a fair game.

    In this case

    E(X) = 1(37/38) + 35(1/38) = (2/38) = 0.05335/61

    MATHEMATICAL DEFINITION OF ODDS

  • 7/30/2019 Unit 08 Contingency Tables

    36/61

    M M C N ON O O S

    In roulette the 37:1 odds for the house is the same as

    37/38

    1/38

    More generally, if the probability of an event A is p,

    the odds of the event is p/(1 p)

    Sometimes written as p : (1 p) (read as p "to" 1 p).

    (1/3) : (2/3) odds is the same as 1:2 odds

    Ifp is small (say p < 0.10) then (1 p) 1 and soodds p. The approximation improves as p approaches 0.

    36/61

    ODDS VS. PROBABILITIES

  • 7/30/2019 Unit 08 Contingency Tables

    37/61

    Probability Odds = p/(1 p) Odds0 0/1 = 0 0

    1/100 = 0.01 1/99 = 0.0101 1 : 991/10 = 0.10 1/9 = 0.11 1 : 9

    1/4 1/3 1 : 31/3 1/2 1 : 21/2 ( 1

    2)/( 1

    2)=1 1 : 1

    2/3 (2/3)/(1/3)=2 2 : 13/4 3 3 : 1

    1 1/0

    37/61

    ODDS RATIO OR RELATIVE ODDS

  • 7/30/2019 Unit 08 Contingency Tables

    38/61

    Suppose we have a disease (e.g., lung cancer denoted byD) and two groups (e.g., smokers denoted by E for

    exposure, non-smokers denoted by Ec

    )Odds Ratio (OR) or relative odds of disease comparingsmokers to non-smokers is

    =Pr(D|E)

    1 Pr(D|E) Pr(D|Ec)1 Pr(D|Ec)This is the odds of disease for smokers divided by the

    odds of disease for non-smokers. OR > 1 implies smokers have higher probability of

    disease

    OR < 1 implies smokers have lower probability.

    38/61

    FUNDAMENTAL RESULT FOR

  • 7/30/2019 Unit 08 Contingency Tables

    39/61

    EPIDEMIOLOGISTS

    The odds ratio of disease, comparing exposed tounexposed:

    OR =Pr(D|E)

    1 Pr(D|E)Pr(D|Ec)

    1 Pr(D|Ec). . .

    =Pr(E|D)

    1 Pr(E|D)

    Pr(E|Dc)

    1 Pr(E|Dc)

    is equal to the odds ratio of exposure, comparing diseasedvs. non-diseased subjects.We will derive this later using a simple formula for OR ina 2 2 table.

    39/61

    TWO IMPORTANT POINTS

  • 7/30/2019 Unit 08 Contingency Tables

    40/61

    Why is this surprising?

    Because when cases and controls are sampled andexposure is determined retrospectively, it is onlypossible to estimate Pr(E|D) or Pr(E|Dc), not Pr(D|E)

    and Pr(D|Ec

    ).

    Why is this important?

    Because even when exposure is estimated by

    sampling from cases and controls, it is possible toestimate the correct OR.

    40/61

    EXPLOITING THE SYMMETRY OF THE ODDS

  • 7/30/2019 Unit 08 Contingency Tables

    41/61

    RATIO

    Thus, OR can be estimated in two ways:

    Prospective studies of exposed and unexposed, to seewho develops disease, as in a cohort study design

    Retrospective studies of diseases vs. healthy subjects,to see who is exposed, as in a case-control studydesign

    Both types of studies can estimate the OR of disease,comparing exposed to unexposed.

    41/61

    EXPLOITING THE RARE DISEASE

  • 7/30/2019 Unit 08 Contingency Tables

    42/61

    ASSUMPTION

    When a disease D is rare in both exposed and unexposedgroups

    1 Pr(D|E) and 1 Pr(D|Ec) are both close to 1.

    In this case

    OR Pr(D|E)

    Pr(D|Ec),

    which is called relative risk.

    42/61

    A SIMPLE FORMULA FOR AN ODDS RATIO IN

  • 7/30/2019 Unit 08 Contingency Tables

    43/61

    A CASE CONTROL STUDY

    Exposed Unexposed Total

    Disease a b a + bNo Disease c d c + d

    Total a + c b + d n

    OR = P(E|D)/(1 P(E|D))P(E|DC)/(1 P(E|DC))

    =

    (a/(a + b))

    (b/(a + b))

    (c/(c + d))

    (d/(c + d))

    =ad

    bc 43/61

    A SIMPLE FORMULA FOR AN ODDS RATIO IN

  • 7/30/2019 Unit 08 Contingency Tables

    44/61

    A PROSPECTIVE STUDY

    Exposed Unexposed Total

    Disease a b a + bNo Disease c d c + d

    Total a + c b + d n

    OR = P(D|E)/(1 P(D|E))P(D|EC)/(1 P(D|EC))

    =

    (a/(a + c))

    (c/(a + c))

    (b/(b + d))

    (d/(b + d))

    =ad

    bc 44/61

    ELECTRONIC FETAL MONITORING (EFM),

  • 7/30/2019 Unit 08 Contingency Tables

    45/61

    P&G PP 354 - 357Does EFM have an impact on Caesarean-section(C-section) delivery decisions?

    Assume that in a sample of 5,824 births:

    EFM ExposureCaesarean Delivery Yes No Total

    Yes 358 229 587No 2,492 2,745 5,237

    Total 2,850 2,974 5,824

    This is a case-control study, sampled according to type ofdelivery. EFM is the exposure variable.

    45/61

    THE EPIDEMIOLOGISTS APPROACH TO THIS

  • 7/30/2019 Unit 08 Contingency Tables

    46/61

    PROBLEM

    Even though this is a case-control study that sampledaccording to type of delivery, it is possible to estimatethe odds ratio

    =Pr(C|E)

    1 Pr(C|E) Pr(C|Ec)1 Pr(C|Ec) ,where C = (woman delivers by C-Section) and E =(EFM used during pre-natal care).

    Invoke the rare disease assumption to estimate

    Pr(C-section|EFM)

    Pr(C-section|no EFM)

    46/61

    C-SECTION AND EFM

  • 7/30/2019 Unit 08 Contingency Tables

    47/61

    EFM ExposureCaesarean Delivery Yes No Total

    Yes 358 229 587No 2,492 2,745 5,237

    Total 2,850 2,974 5,824

    Relative Risk =Pr(C-section|EFM)

    Pr(C-section|no EFM)

    Odds Ratio

    = (358)(2745)(229)(2492)

    = 1.72

    Can we check the rare disease assumption with these

    data? 47/61

  • 7/30/2019 Unit 08 Contingency Tables

    48/61

    INTEGRATING THE OR AND THE TEST

  • 7/30/2019 Unit 08 Contingency Tables

    49/61

    The small pvalue from the table leads to rejection ofH0.

    Data from the study suggests that the odds of a C-sectionin women with pre-natal EFM is 72% higher than inwomen without pre-natal EFM

    If the rare disease assumption is justified,RR OR = 1.72, and study suggests women withpre-natal EFM are 72% more likely to have C-section.

    Can also test H0 by examining a confidence interval for

    ORNext section gives the formula for this confidenceinterval.

    49/61

    PROGRESS THIS UNIT

  • 7/30/2019 Unit 08 Contingency Tables

    50/61

    The chi-squared test in contingency tables, P&G Chapter15, pp 342 - 349

    Odds and Odds Ratios, P&G Chapter 6, pp 144 - 149,

    section 15.3

    Confidence intervals for an OR, P&G, pp 352 - 357

    Summary

    50/61

  • 7/30/2019 Unit 08 Contingency Tables

    51/61

  • 7/30/2019 Unit 08 Contingency Tables

    52/61

  • 7/30/2019 Unit 08 Contingency Tables

    53/61

  • 7/30/2019 Unit 08 Contingency Tables

    54/61

    STATA AGAIN. . .

  • 7/30/2019 Unit 08 Contingency Tables

    55/61

    cci 358 229 2492 2745, woolf

    Proportion

    | Exposed Unexposed | Total Exposed

    -----------------+------------------------+------------------------

    Cases | 358 229 | 587 0.6099

    Controls | 2492 2745 | 5237 0.4758

    -----------------+------------------------+------------------------

    Total | 2850 2974 | 5824 0.4894

    | |

    | Point estimate | [95% Conf. Interval]

    |------------------------+------------------------Odds ratio | 1.722035 | 1.446314 2.050318 (

    Attr. frac. ex. | .4192916 | .308587 .5122708 (

    Attr. frac. pop | .2557178 |

    +-------------------------------------------------

    chi2(1) = 37.95 Pr>chi2 = 0.0000

    The notation (Woolf) has been clipped from the output,next to the confidence intervals.

    55/61

  • 7/30/2019 Unit 08 Contingency Tables

    56/61

  • 7/30/2019 Unit 08 Contingency Tables

    57/61

  • 7/30/2019 Unit 08 Contingency Tables

    58/61

    FORMULAS FOR ATTRIBUTABLE RISK

  • 7/30/2019 Unit 08 Contingency Tables

    59/61

    In a case-control study,

    Attr. frac. ex. =OR 1

    OR

    =1.722 1

    1.722= 0.419

    Attr. frac. pop = Attr. frac. ex. proportion exposed cases

    = (0.419)(0.6099)

    = 0.2557

    Formulas for cohort studies are different.

    59/61

    PROGRESS THIS UNIT

  • 7/30/2019 Unit 08 Contingency Tables

    60/61

    The chi-squared test in contingency tables, P&G Chapter

    15, pp 342 - 349

    Odds and Odds Ratios, P&G Chapter 6, pp 144 - 149,

    section 15.3

    Confidence intervals for an OR, P&G, pp 352 - 357

    Summary

    60/61

  • 7/30/2019 Unit 08 Contingency Tables

    61/61