Epidemiology 9509 effect measures
Epidemiology 9509Wonders of Biostatistics
Chapter 13 - Effect Measures
John Koval
Department of Epidemiology and BiostatisticsUniversity of Western Ontario
1
Epidemiology 9509 effect measures
What is being covered
1. risk factors
2. risk differences
3. relative odds - odds ratio
4. relative risk - risk ratios
2
Epidemiology 9509 effect measures
Risk factors
factor which can lead to (bad) outcomeSince risk and outcome are binarycan think of risk asprobability of presence of risk factorleading to bad outcome
hence smoking is a risk factorfor the outcome respiratory disease
think of risk at two levels of smokingsmokers, π1and non-smokers, π2
3
Epidemiology 9509 effect measures
Risk differences
differences in risk for two levels of risk factorδπ = π1 − π2have already considered this
1. test of hypothesis (two-sided alternative)
1.1 Fisher exact test1.2 test of association/independence
with continuity correction SY
2. test of hypothesis (one-sided alternative)
2.1 Fisher exact test2.2 test of association/independence SY
3. estimation
3.1 Wilson/Adjusted Wald estimators for π1, π2
3.2 then Newcombe combination of these twointo estimator for π1 − π2
4
Epidemiology 9509 effect measures
Relative Odds
◮ odds
ω = π11−π1
eg π1 = 0.6, so that (1− π) = 0.4odds ω = 1.5often quoted as 3:2
◮ relative odds
φ = ω1ω2
relative odds for group 1 compared to group 2eg π2 = 0.5, so (1− π2) = 0.5odds ω2 = 1(1 : 1)relative odds φ = (1.5)/(1) = 1.5
5
Epidemiology 9509 effect measures
Odds ratio - estimating the Relative Odds
◮ odds
oi =pi
1−pieg p1 = 0.6, so that (1− p1) = 0.4odds o1 = 1.5often quoted as 3:2
◮ odds ratio
OR = o1o2
odds ratio for group 1 compared to group 2eg p2 = 0.5, so (1− p2) = 0.5odds o2 = 1(1 : 1)odds ratio OR = (1.5)/(1) = 1.5
6
Epidemiology 9509 effect measures
shortcut computation of Odds Ratio
if entries in 2x2 contingency tablea, b, c ,dp1 = a/(a + b)p2 = c/(c + d)
so thato1 =
aa+b
/ ba+b
= ab
o2 =c
c+d/ dc+d
= cd
thenOR = o1
o2= a
b/ cd= ad
bc
7
Epidemiology 9509 effect measures
Inference - test of hypothesis
test of φ = 1ie of ω1 = ω2
ie of π1 = π2
1. Fisher exact test
2. test of association SY
8
Epidemiology 9509 effect measures
inference - confidence interval
can use odds ratio, OR,to estimate φ, the relative odds
need standard error
se(OR) = OR
√
(
1a+ 1
b+ 1
c+ 1
d
)
useful only for very large samples
example, a=15, b=8, c=10,d=12OR = ad
bc= 15(12)
8(10 = 2.25
se(OR) = OR
√
(
115 + 1
8 +112 + 1
10
)
= 2.25√0.375 = 2.25(0.6124) = 1.3793
9
Epidemiology 9509 effect measures
confidence interval (continued)
95% Confidence interval
(2.25 ± 1.96(1.3793)= 2.25 ± 2.70
= (−0.45, 4.95)a very strange interval
10
Epidemiology 9509 effect measures
confidence interval (better)
use l = log(OR) and its se
l = log(OR) = log(2.25) = 0.811
se(l) =√
(
1a+ 1
b+ 1
c+ 1
d
)
=√
(
115 +
18 + 1
12 +110
)
= 0.6124
95% CI0.811 ± 1.96(0.6124)= 0.811 ± 1.200= (−0.389, 2.011)
transform back (exponentiate)(0.68, 7.47)
11
Epidemiology 9509 effect measures
Relative Risk
if π1 and π2 are risksRelative Risk is π1
π2
if p1 and p2 are observed proportionsRisk Ratio: RR = p1
p2is point estimator of Relative Risk
for example, for a,b,c,dp1 =
aa+b
,p2 =c
c+d
RR = aa+b
/ cc+d
exampleRR = 15
23/1222
= 1.4348
12
Epidemiology 9509 effect measures
Relative Risk: test of hypothesis
test ofHo : Relative Risk = 1ieHo : π1
π2= 1
can be rewritten asHo : π1 = π2
same hypothesis as for Risk DifferenceHence use same tests:
1. Fisher’s Exact Test
2. SY , Yates continuity-corrected version of Pearson test
13
Epidemiology 9509 effect measures
confidence interval for Relative Risk
again using RR ± 1.96se(RR)produces strange interval for small samples
use lRR = log(RR) and its standard error
se(lRR) =
√
(
1−p1n1p1
+ 1−p2n2p2
)
for contingency tables entries a,b,c,d
se(lRR) =
√
(
ba(a+b) +
dc(c+d)
)
14
Epidemiology 9509 effect measures
example of RR estimation
RR = 1.4388lRR = log(1.4288) = 0.3610
se(lRR) =
√
(
815(23) +
1210(22)
)
=√0.23188 + 0.54545 =
√0.77733
95% confidence interval0.3610 ± 1.96
√0.77733
= 0.3610 ± 0.54646= (−0.18545, 0.90742)
exponentiate to get 95% CI for relative risk(0.831,2.478)
15
Epidemiology 9509 effect measures
summary of estimates
Parameter point estimate interval estimate
Risk difference 0.198 (-0.088,0.442)Relative odds 2.250 (0.68,7.47)Relative risk 1.435 (0.831,2.478)
16
Epidemiology 9509 effect measures
SAS for effects
title ’advanced contingency table’;
DATA marj;
INPUT r o freq;
DATALINES;
0 0 15
0 1 8
1 0 10
1 1 12
;
PROC FREQ;
WEIGHT freq;
TABLES r*o/CHISQ RISKDIFF RELRISK
NOROW NOCOL NOPERCENT;
add RELRISK to get estimated of Relative oddsAND Relative Risk
17
Epidemiology 9509 effect measures
Output of SAS effects program
The FREQ Procedure
Table of r by o
r o
Frequency 0 1 Total
0 15 8 23
1 10 12 22
Total 25 20 45
Statistics for Table of r by o
Statistic DF Value Prob
-----------------------------------------------
Chi-Square 1 1.7787 0.1823
Likelihood Ratio Chi-Square 1 1.7900 0.1809
Continuity Adj. Chi-Square 1 1.0683 0.3013
Mantel-Haenszel Chi-Square 1 1.7391 0.1872
Phi Coefficient 0.1988
Contingency Coefficient 0.1950
Cramer’s V 0.198818
Epidemiology 9509 effect measures
Output of SAS effects program II
Fisher’s Exact Test
-----------------------------------
Cell (1,1) Frequency (F) 15
Left-sided Pr <= F 0.9493
Right-sided Pr >= F 0.1507
Table Probability (P) 0.1000
Two-sided Pr <= P 0.2362
19
Epidemiology 9509 effect measures
Output of SAS effects program III
column 1 Risk Estimates
(Asymptotic)95% Exact) 95%
Risk ASE Confid Limits Confid Limits
---------------------------------------------------
Row 1 0.6522 0.0993 0.4575 0.8468 0.4273 0.8362
Row 2 0.4545 0.1062 0.2465 0.6626 0.2439 0.6779
Total 0.5556 0.0741 0.4104 0.7007 0.4000 0.7036
Difference 0.1976 0.1454-0.0873 0.4825
Column 2 Risk Estimates
(Asymptotic)95% Exact) 95%
Risk ASE Confid Limits Confid Limits
---------------------------------------------------
Row 1 0.3478 0.0993 0.1532 0.5425 0.1638 0.5727
Row 2 0.5455 0.1062 0.3374 0.7535 0.3221 0.7561
Total 0.4444 0.0741 0.2993 0.5896 0.2964 0.6000
Difference-0.1976 0.1454-0.4825 0.0873
20
Epidemiology 9509 effect measures
Output of SAS effects program IV
Estimates of the Relative Risk (Row1/Row2)
Type of Study Value 95% Confid Limits
----------------------------------------------
Case-Control (Odds Ratio) 2.2500 0.6775 7.4720
Cohort (Col1 Risk) 1.4348 0.8307 2.4780
Cohort (Col2 Risk) 0.6377 0.3239 1.2553
Sample Size = 45
21