Presentation is loading. Please wait.

Presentation is loading. Please wait.

March 28 Analyses of binary outcomes 2 x 2 tables

Similar presentations


Presentation on theme: "March 28 Analyses of binary outcomes 2 x 2 tables"— Presentation transcript:

1 March 28 Analyses of binary outcomes 2 x 2 tables
Relative Risks and Relative Odds (Odds Ratio) Lee 6.1 through 6.5 C & S Chapter 3 (G, I, K, L, M, O)

2 Estimating a Single Proportion
p = proportion in population with characteristic Take random sample of size n x = number in sample with characteristic p = x/n estimate of p SE(p) = Assumptions: n is large enough for CLT Then p is normally distributed 95% CI for p: p ± 1.96 SE(p) p – p0 Z = SQRT(p(1-p) (1/n))

3 Example p = proportion favoring a certain candidate n = 625
x = 300 favor the candidate p = 300/625 = 0.48 is estimate of p SE(p) = = 0.020 95% CI for p: ± 1.96 (0.02) 0.48 ± 0.04 Note: Samplers use n=625 frequently

4 1-Sample Z-Test: Matched Pair Data
Control Positive Control Negative a b c d Pos Case Neg Analyses is done on discordant pairs b and c Called McNemar’s chi-square Ho: p = 0.5 where n=b+c and x=b Z = (b/(b+c) – 0.5)/sqrt(.5*.5/(b+c)) Z = (b-c)/sqrt(b+c) c2 = (b-c)2/(b+c)

5 Example – Vitamin Use/Disease (440 Pairs)
Control Vitamin + Control Vitamin - 100 50 90 200 Vit + Case Vit - Ho: p = 0.5 where n=140 and b = 50 c2 = (50-90)2/(50+90) = (p=.0007)

6 Comparing Two Proportions
Ho: p1 = p2 Ha: p1 ≠ p2 p1 = x1/ n1 p2 = x2 / n2 p = (x1+x2)/(n1+n2) This is the pooled proportion p2 – p1 Z = p(1-p) (1/n1 + 1/n2) Compare to standard normal distribution Assume n1 and n2 are large enough to use normal approximation

7 CI: Difference in Proportions
95% CI for difference in proportions:

8 Example – Asthma and SES
Ho: p1 = p2 Ha: p1 ≠ p2 p1 = 30/ 160 = 0.188 p2 = 40 / 140 = 0.286 p = 70/300 = This is the pooled proportion 0.286 – 0.188 Z = 0.233(.767) (1/ /140) c2 = Z2 = 4.03 X1 is number with asthma in high SES group X2 is number with asthma in low SES group = 0.098/0.049 = 2.01

9 2 by 2 Table a b c d c2 = ( a + b + c + d ) (ad – bc)2
Factor Present Factor Absent a b c d Sample 1 n1 = a + b Sample 2 n2 = c + d a + c b+ d c2 = ( a + b + c + d ) (ad – bc)2 ( a + c) (b + d) (a + b) (c + d)

10 2 by 2 Table Have Asthma No Asthma 30 130 40 100 High SES n1 =160 Low SES n2 =140 70 230 c2 = ( ) (3000 – 5200)2 ( 70) (230) (160) (140) = 4.02

11 Relative Risks and Relative Odds
Factor Present Factor Absent a b c d Sample 1 n1 = a + b Sample 2 n2 = c + d a + c b + d RR = a/(a+b) c/(c+d) RO = a/b c/d = ad/bc If a+b is approximately equal to b and If c+d is approximately equal to d then RR will be close to RO

12 Calculation RR and RO 30 130 40 100 160 140 70 140 RR = 30/160 40/140
Have Asthma No Asthma 30 130 40 100 High SES 160 Low SES 140 70 140 RR Asthma (High v Low SES) RO Asthma (High v Low SES) RR = 30/160 40/140 = 0.66 RO = 30/130 40/100 = 0.58 34% Lower risk of asthma in high SES compared to low SES

13 Confidence Interval for Relative Risk
This CI looks a little different from usual form It is calculated on log scale Distribution of RR possible values is skewed Can’t be less than zero Can be extremely large positive values Usually transformed back when presented Calculated automatically by SAS

14 Confidence Interval for Odds Ratio
Similar to CI for relative risk Can calculate by hand easily; SAS calculates automatically

15 Notes About CI for RR and RO
Confidence intervals are not symmetric around the point estimate Cannot use RR ± SE notation Point estimate: 0.66 95% CI (0.43 – .99) 0.23 below above

16 Odds Ratio Property 30 130 40 100 160 140 70 140 RO = 30/130 40/100
Have Asthma No Asthma 30 130 40 100 High SES 160 Low SES 140 70 140 RO Asthma (High v Low SES) RO High SES (Asthma v No Asthma) RO = 30/130 40/100 = 0.58 RO = 30/40 130/100 = 0.58 Same Answer – Not true for RR

17 Cohort Versus Case Control Study
Cohort (Prospective) Find a population of low SES persons and a population of high SES persons For each person determine if he/she has asthma Case-Control (Retrospective) Find a group of persons with asthma and a group of persons without asthma. Determine if person is of low or high SES

18 What Can Be Estimated Cohort (Prospective)
Can estimate probability of asthma for both low and high SES groups Can compute relative risk of asthma (high versus low SES) Case-Control (Retrospective) Can not estimate probability of asthma Can not estimate relative risk of asthma (H versus L SES) Can estimate relative odds (H versus L SES) If disease is fairly rare the RO can estimate RR

19 Cohort Versus Case-Control
Cohort (Prospective) May not be possible to do Case-Control (Retrospective) May be only way to assess risk factors for disease

20 INPUT ses asthma count; DATALINES; 1 1 30 1 2 130 2 1 40 2 2 100 ;
USING SAS DATA asthma; INFILE DATALINES; INPUT ses asthma count; DATALINES; 1 1 30 2 1 40 ; PROC FREQ DATA=asthma; TABLES ses*asthma/CHISQ RELRISK; WEIGHT count; RUN; Insert 2 x 2 table. The variable count contains the number in each cell of the table Get c2 value Get RR and RO Very important statement !

21 Table of ses by asthma ses asthma Frequency| Percent | Row Pct | Col Pct | | | Total 1 | | | | | | | | | | | | 2 | | | | | | | | | | | | Total Ho: p1 = p2 p1 = 30/160 = p2 = 40/140 = Statistic DF Value Prob Chi-Square Likelihood Ratio Chi-Square Continuity Adj. Chi-Square Mantel-Haenszel Chi-Square

22 Table of ses by asthma ses asthma Frequency| Percent | Row Pct | Col Pct | | | Total 1 | | | | | | | | | | | | 2 | | | | | | | | | | | | Total Ho: RR =1 or RO = 1 RR = / = RO = (30/130) / (40/100) = Row1 = High SES Row2 = Low SES Col1 = Have asthma Estimates of the Relative Risk (Row1/Row2) Type of Study Value % Confidence Limits Case-Control (Odds Ratio) Cohort (Col1 Risk) Cohort (Col2 Risk)

23 Adjusting for Other Factors
Other factors must be categorical Estimated RR and RO are a pooled estimate across all combinations of adjustment variables Analyses called Mentel-Haenszel c2 PROC FREQ DATA=asthma; WEIGHT count; TABLES gender*ses*asthma/CHISQ CMH; RUN; Dependent variable Risk factor of interest Adjustment Variable (s)

24 Adjusting for Other Factors
Perhaps some or all of the SES/ASTHMA relationship is due to sex/gender PROC FREQ DATA=asthma; WEIGHT count; TABLES gender*ses*asthma/CHISQ CMH; RUN; Dependent variable Risk factor of interest Adjustment Variable (s)

25 INPUT gender ses asthma count; DATALINES; 1 1 1 10 1 1 2 70 1 2 1 10
USING SAS DATA asthma; INFILE DATALINES; INPUT gender ses asthma count; DATALINES; ; PROC FREQ DATA=asthma; TABLES gender*ses*asthma/CHISQ CMH; WEIGHT count; 2 x 2 table for men 2 x 2 table for women

26 Analysis for men ses asthma Frequency| Percent | Row Pct |
Table of ses by asthma ses asthma Frequency| Percent | Row Pct | Col Pct | | | Total 1 | | | | | | | | | | | | 2 | | | | | | | | | | | | Total Estimates of the Relative Risk (Row1/Row2) Type of Study Value % Confidence Limits Case-Control (Odds Ratio) Cohort (Col1 Risk) Analysis for men

27 Analysis for women Table of ses by asthma ses asthma Frequency|
Percent | Row Pct | Col Pct | | | Total 1 | | | | | | | | | | | | 2 | | | | | | | | | | | | Total Estimates of the Relative Risk (Row1/Row2) Type of Study Value % Confidence Limits Case-Control (Odds Ratio) Cohort (Col1 Risk) Analysis for women

28 Tests if Odds Ratio is same for men and women
POOLED ANALYSES Estimates of the Common Relative Risk (Row1/Row2) Type of Study Method Value % Confidence Limits Case-Control Mantel-Haenszel (Odds Ratio) Logit Cohort Mantel-Haenszel (Col1 Risk) Logit Breslow-Day Test for Homogeneity of the Odds Ratios Chi-Square DF Pr > ChiSq Pooled Analyses Tests if Odds Ratio is same for men and women

29 Class Exercise Among the 668 patients in TOMHS randomized to active treatment 74 experienced a CVD event during the study. Among the 234 patients randomized to placebo 38 had a CVD event. Compute the RR of CVD, for active versus placebo Compute the RO of CVD, for active versus placebo Use SAS to create the 2 x 2 table Using SAS compute the c2 statistic Using SAS compute the 95% for the RR and RO above


Download ppt "March 28 Analyses of binary outcomes 2 x 2 tables"

Similar presentations


Ads by Google