630 likes | 780 Views
HSRP 734: Advanced Statistical Methods May 29, 2008. Finish talking about Association Measures: Odds Ratio. OR=2 of Disease for Exposed vs. Not exposed What is the interpretation? “Exposed patients have twice the odds of disease versus patients that were not exposed.â€.
E N D
Finish talking about Association Measures: Odds Ratio • OR=2 of Disease for Exposed vs. Not exposed • What is the interpretation? • “Exposed patients have twice the odds of disease versus patients that were not exposed.”
Finish talking about Association Measures:Relative Risk • RR=2.5 of Disease for Exposed vs. Not exposed • What is the interpretation? • “Exposed patients are 2.5 times as likely to have the disease versus patients that were not exposed.”
Finish talking about Association Measures • OR is not close to RR • Unless Pr(disease) for Exposed, Not exposed low • “Rare” disease
Finish talking about Association Measures • Confidence intervals for Odds Ratio • Confidence intervals for Relative Risk
Confidence Interval for Odds Ratio Confidence limits are based on the sampling distribution of which is normal or approximately normal with and
Confidence Interval for Odds Ratio *Use if N>25
Confidence Interval for Risk Ratio Confidence limits are based on the sampling distribution of which is normal or approximately normal with and
Confidence Interval for Risk Ratio *Use if N>25
SAS websites • Online help: http://support.sas.com/onlinedoc/913/docMainpage.jsp • UCLA: http://www.ats.ucla.edu/stat/SAS/ • SAS SUGI: http://support.sas.com/events/sasglobalforum/previous/index.html
Categorical Data Analysis • Understand the Multinomial probability mass function • Compute Goodness-of-fit tests and chi-squared tests for association • Test for association in the presence of a possibly confounding third factor (e.g., disease versus exposure from 3 sites)
Categorical Data Analysis • Motivation • How do we estimate and test the magnitude of posited relationship when the outcome of interest is categorical? • e.g., An international study examines the relationship between age at first birth and the development of breast cancer • Age = categorized into age groups
Categorical Data Analysis • Research question • Is there a relationship between age at first birth and Cancer status? • Better to convert the table into percentages (easier to see) • Turns out that there is a significant relationship (p<0.001)
Categorical Data Analysis • Statistical techniques involve • Probability distribution for categorical data • Tests for relationship in a RxC table R = # of Rows in Table C = # of Columns in Table
Probability Distribution for Categorical Outcomes • Fun for Friday night: • Go home and flip a quarter 10,000 times. Determine if there is evidence that one side is falling down more.
Probability Distributions for Categorical Data • Bernoulli (1 toss of a coin, outcome=H,T) • Binomial (10 tosses of a coin, outcome=0,1,2..,10 heads) • Multinomial (throw 10 balls into 4 pigeon holes ABCD, outcome= (3A,2B,1C,4D))
Why use multinomial for testing? • Relationship between 2 categorical variables • RxC table analysis • Based on multinomial distribution
Why use multinomial for testing? • Example: 2 level exposure status (Exposed, Not exposed), 3 level outcome (severe, mild, no disease) • Treat 2x3=6 outcomes as categorical or a multinomial distribution with 6 pigeon holes • The expected probability of the pigeon holes are specified under some kind of assumptions (e.g., independence)
Level of Measurement • Categorical response • dichotomous • ordinal (>2 categories, ordered) • nominal (>2 categories, not ordered) • Dichotomous use Binomial distribution • Ordinal, Nominal use Multinomial distribution
Multinomial Distribution • Multinomial experiment: • Experiment consists of n identical and independent trials • Each trial results in one of K outcomes • Let pi be the probability of outcome i a. Each pi remains constant for each experiment b. • The pmf for k outcomes is: • Notes:
Example of a Multinomial Experiment Consider an unfair die and 6 tosses: Let Find the probability of this outcome
Simple Multinomial Experiments Classical example: Mendel Sample from the second generation of seeds resulting from crossing yellow round peas and green wrinkled peas (N=556)
Mendel’s Laws of Inheritance suggest that we should expect the following ratios: 9/16, 3/16, 3/16, 1/16 For N = 556, the expected number of each outcome is: E(YR) = 556 x 9/16 = 312.75 E(YW) = 556 x 3/16 = 104.25 E(GR) = 556 x 3/16 = 104.25 E(GW) = 556 x 1/16 = 34.75
Multinomial distribution • The observed cell counts are not identical to the expected cell counts • Under the assumption of a multinomial model with the stated probabilities, how might we determine how unlikely it is to observe these data?
Chi-square GOF Test • Hypothesis: observed cell counts are consistent with the multinomial probabilities • Theoretical result • Require that expected cell counts not too small • Expected counts > 5.
Chi-square distribution • Remarks about Chi-squared distribution: • Nonsymmetric • Strictly positive • Different chi-squared distribution for each df.
Chi-square GOF Test • Applying this test to Mendel’s peas example yields • H0: pYR = 9/16, pYW = 3/16, pGR = 3/16, pGW = 1/16 • H1: at least one pi differs from hypothesized value
Chi-square GOF Test • Therefore, we observed c2 = 0.47 from a multinomial experiment with k = 4. Thus, df = k-1 = 3. For a = 0.05, • Thus, the observed chi-squared statistic is not greater than the critical value for a = 0.05 and df = 3. • We fail to find evidence that these data depart from the hypothesized probabilities. i.e., model fits well to data
Testing association in 2x2 table • This method translates to testing cross-tabulation tables for RxC cases • Here the cells are formed by cross-classification of 2 variables • Null hypothesis is the 2 variables are independent • Simplest case : 2x2 table
Testing association in 2x2 table • Testing for independence or no association • Similar idea to checking goodness-of-fit • Compare what to see to what you hypothesized to be true • You did, in fact, hypothesize “independence”
Basic Inference for 2x2 Tables • 2x2 Contingency Table
Chi-square GOF Test for 2x2 Tables • H0: There is no association between row and columns • Under H0, the expected cell counts are the product of the marginal probabilities and the sample size. Why? • The classic Pearson’s chi-squared test of independence • df = (2-1) x (2-1) = 1 • Conservatively, we require EXPECTEDij≥ 5 for all i, j
Other Tests for 2x2 Tables • Two alternative tests • Yate’s continuity corrected chi-square statistic • Mantel-Haenszel chi-square statistic • For sufficiently large sample size, all three Chi-squared statistics are approximately equal and all have a Chi-squared distribution with 1 df
When to use Chi-square vs. Fisher’s Exact • When the expected cell counts are less than 5, it is better to use the Fisher’s exact test.
Summary of the Use of 2 test • Test of goodness-of-fit Determine whether or not a sample of observed values of some random variable is compatible with the hypothesis that the sample was drawn from a population with a specified distributional form (e.g., specified probabilities of certain events)
Summary of the Use of 2 test • Test of independence Test the null hypothesis that two criteria of classification (variables) are independent
Summary of the Use of 2 test • Test of homogeneity Test the null hypothesis that the samples are drawn from populations that are homogeneous with respect to some factor (i.e., no association between group and factor)
Summary of the Use of 2 test • Could consider this test as answering: “Are the Row factor and Column factor associated?”
Categorical Data Analysis • Ideas of multinomial and chi-squared test generalize to testing RxC association and RxCxK association • Example: • 2 exposure status, 2 disease status, 3 sites • 2x2x3 association analysis
Test of General Association (R x C Table) • Consider a study designed to test whether there exists an association between political party affiliation and residency within specific counties
Test of General Association • H0: There is no association between rows and columns H1: There exists a dependence between rows and columns • Under H0,the expected cell counts are the product of the corresponding marginal probabilities and the sample size. • The classic Pearson’s chi squared test of independence
Mantel-Haenszel test • Often, there are other factors in a RxC test • Mantel-Haenszel test (or Cochran Mantel Haenzsel CMH) can be used for controlling for “nuisance” factors • Typically used for rxcx2 table • e.g., 2x2x2 cross classification • e.g., Association between disease status and exposure controlling for age group(strata)