SlideShare a Scribd company logo
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Comparing two groups:
categorical data
Tuan V. Nguyen
Professor and NHMRC Senior Research Fellow
Garvan Institute of Medical Research
University of New South Wales
Sydney, Australia
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
What we are going to learn …
•  Examples (RCT, CC, Cohort)
•  Two proportions
•  Metrics of effect: d, RR, OR
•  Applicability of d, RR, OR
•  D and z-test
•  NNT
•  Measure of association: OR
•  Small sample size: Fisher’s exact test
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Zoledronate and fracture
Randomized controlled clinical trial
Placebo n = 1062, Zoledronate n = 1065
Length of follow-up: 3 years
Lyles KW, et al. Zoledronic acid and clinical fractures and mortality after hip fracture.
N Engl J Med 2007;357. DOI: 10.1056/NEJMoa074941
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Smoking and lung cancer
Sir Richard Doll (1912 – 2005)
http://en.wikipedia.org/wiki/Richard_Doll
Lung
Cancer
Controls
Smokers 647 622
Non-smokers 2 27
R Doll and B Hill. BMJ 1950; ii:739-748
Is there an association between smoking and lung cancer?
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Mortality in the Titanic incident
Class Dead Survived Total
I 123 200 (62%) 323
II 158 119 (43%) 277
III 528 181 (26%) 709
Total 809 500 (38%) 1309
http://lib.stat.cmu.edu/S/Harrell/data/descriptions/titanic3info.txt
Is there an association between passenger class and and death?
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
What are common characteristics of these data?
•  Binary outcome: yes/no; dead / survived
•  Proportion / percent / probability
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Sample vs population
Sample Population
Group 1 Group 2 Group 1 Group 2
N n1 n2 Infinite Infinite
Probability of
outcome
p1 p2 p1 = ? p2 = ?
Difference d = p1 – p 1 d = p1 – p2
Status Known Unknown
Aim: use sample data d to estimate population parameter d
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Metrics of effect
•  Absolute difference (d)
•  Relative risk (RR; risk ratio)
•  Odds ratio (OR)
•  Number needed to treat (NNT)
The choice is dependent on study design
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Absolute difference d
Outcome Placebo Treatment
Any fracture 139 92
Non-fracture 923 973
N 1062 1065
Outcome Group 1 Group 2
Bad a b
Good c D
N N1 N2
Absolute difference
p1 = 139 / 1062 = 0.131
p2 = 92 / 1065 = 0.086
d = p2 – p1 = -0.044
p1 = a / N1
p2 = b / N2
d = p2 – p1
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Number needed to treat – NNT
Outcome Placebo Treatment
Any fracture 139 92
Non-fracture 923 973
N 1062 1065
Outcome Group 1 Group 2
Bad a b
Good c D
N N1 N2
Number needed to treat
p1 = 139 / 1062 = 0.131
p2 = 92 / 1065 = 0.086
d = p2 – p1 = -0.044
NNT = 1 / d = 22
p1 = a / N1
p2 = b / N2
d = p2 – p1
NNT = 1 / d
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Relative risk - RR
Outcome Placebo Treatment
Any fracture 139 92
Non-fracture 923 973
N 1062 1065
Outcome Group 1 Group 2
Bad a b
Good c D
N N1 N2
Relative risk
p1 = 139 / 1062 = 0.131
p2 = 92 / 1065 = 0.086
RR = p2 / p1 = 0.66
p1 = a / N1
p2 = b / N2
RR = p2 / p1
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Meaning of RR
•  Risk of developing disease
Treatment: p1 = a / N1
Placebo: p2 = b / N2
•  Relative risk
RR = p1 / p2
•  Implications:
RR = 1, there is no effect
RR < 1, the treatment is beneficial.
RR > 1, the treatment is harmful.
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Odds ratio - OR
Outcome Placebo Treatment
Any fracture 139 92
Non-fracture 923 973
N 1062 1065
Outcome Group 1 Group 2
Bad a b
Good c D
N N1 N2
Odds ratio
odds1 = 139 / 923 = 0.140
odds2 = 92 / 973 = 0.094
OR = odds2 / odds1 = 0.68
odds1 = a / c
odds2 = b / d
OR = odds2 / odds1
OR = (a x d) / (b x c)
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Meaning of OR
•  OR = 1, there is no association
•  OR < 1, the risk factor is associated with reduced
disease risk
•  OR > 1, the risk factor is associated with increased
disease risk
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Study design – time aspect
PAST PRESENT FUTURE
Cohort study,
RCT
(longitudinal,
prospective)
Case-control
study
Cross-
sectional study
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Appropriateness of effect size
RCT / prospective
study
Cross-sectional
study
Case-control
study
Relative risk
Odds ratio
NNT
D
Odds ratio
Prevalence ratio
D
Odds ratio
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Problem and solution
•  Finding an estimate for d, OR, RR is easy
•  Finding the 95% confidence interval is harder
•  We can however use R
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Example of d
1
1
N
a
p =
Treatment Control
Disease a b
No disease c d
Sample size N1 N2
2
1 p
p
d −
=
( ) ( ) ( )
2
2
1
1
1
1 1
1
N
p
p
N
p
p
d
SE
−
+
−
=
( )
d
SE
d
CI 96
.
1
%
95 
=
Zole Placebo
Fracture 92 139
No fracture 973 923
Sample size 1065 1062
044
.
0
086
.
0
131
.
0
1062
139
1065
92
=
−
=
−
=
d
( ) ( ) ( ) 0134
.
0
1062
956
.
0
044
.
0
1065
869
.
0
131
.
0
=
+
=
d
SE
( ) 0134
.
0
96
.
1
044
.
0
%
95 ×
= 
d
CI
( ) 081
.
0
,
018
.
0
%
95 =
d
CI
2
2
N
b
p =
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Example of NNT
•  NNT = 1 / 0.044 = 22
•  95% CI for NNT:
–  1 / 0.018 = 55
–  1 / 0.081 = 14
044
.
0
086
.
0
131
.
0
1062
139
1065
92
=
−
=
−
=
d
( ) ( ) ( ) 0134
.
0
1062
956
.
0
044
.
0
1065
869
.
0
131
.
0
=
+
=
d
SE
( ) 0134
.
0
96
.
1
044
.
0
%
95 ×
= 
d
CI
( ) 081
.
0
,
018
.
0
%
95 =
d
CI
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Example of RR
Treatment Control
Disease a b
No disease c d
Sample size N1 N2
2
1
/
/
N
b
N
a
RR =
( )
RR
LRR log
=
( )
2
1
1
1
1
1
N
b
N
a
LRR
SE −
+
−
=
( ) ( )
LRR
SE
LRR
LRR
CI 96
.
1
%
95 
=
( ) ( )
LRR
SE
LRR
e
RR
CI 96
.
1
%
95 
=
Zole Placebo
Fracture 92 139
No fracture 973 923
Sample size 1065 1062
66
.
0
131
.
0
086
.
0
1062
/
139
1065
/
92
=
=
=
RR
( ) 4155
.
0
66
.
0
log −
=
=
LRR
( ) 127
.
0
1062
1
139
1
1065
1
92
1
=
−
+
−
=
LRR
SE
( ) 127
.
0
96
.
1
416
.
0
%
95 ×
−
= 
LRR
CI
( ) 127
.
0
96
.
1
416
.
0
%
95 ×
−
= 
e
RR
CI
= 0.514 to 0.847
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Example of OR
Disease No disease
Risk +ve a b
Risk –ve c d
bc
ad
OR =
( )
OR
LOR log
=
( )
d
c
b
a
LOR
SE
1
1
1
1
+
+
+
=
( ) ( )
LOR
SE
LOR
LOR
CI 96
.
1
%
95 
=
( ) ( )
LOR
SE
LOR
e
OR
CI 96
.
1
%
95 
=
Lung K Control
Smoking 647 622
No smoking 2 27
04
.
14
2
622
27
647
=
×
×
=
OR
( ) 64
.
2
04
.
14
log =
=
LOR
( ) 735
.
0
27
1
2
1
622
1
647
1
=
+
+
+
=
LOR
SE
( ) 735
.
0
96
.
1
642
.
2
%
95 ×
= 
LOR
CI
( ) 735
.
0
96
.
1
64
.
2
%
95 ×
= 
e
OR
CI
= 3.32 to 59.03
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Introducing epiR package
Disease No disease
Exposed (treatment) a b
Not exposed (control) c d
epi.2by2(a, b, c, d, method = “xxx", conf.level = 0.95)
Where method = "cohort.count"
"case.control"
"cross.sectional"
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Application of epiR – RCT study
Fracture No frcture
Zoleronate 92 973
Placebo 139 923
library(epiR)
epi.2by2(92, 973, 139, 923, method="cohort.count",
conf.level=0.95)
> epi.2by2(92, 973, 139, 923, method = "cohort.count", conf.level = 0.95)
Disease + Disease - Total Inc risk * Odds
Exposed + 92 973 1065 8.64 0.0946
Exposed - 139 923 1062 13.09 0.1506
Total 231 1896 2127 10.86 0.1218
Point estimates and 95 % CIs:
---------------------------------------------------------
Inc risk ratio 0.66 (0.51, 0.85)
Odds ratio 0.63 (0.48, 0.83)
Attrib risk * -4.45 (-7.09, -1.81)
Attrib risk in population * -2.23 (-4.65, 0.19)
Attrib fraction in exposed (%) -51.51 (-94.42, -18.08)
Attrib fraction in population (%) -20.52 (-33.15, -9.08)
---------------------------------------------------------
* Cases per 100 population units
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Application of epiR – Case-control study
K Not K
Smoking 647 622
No smoking 2 27
> epi.2by2(647,622,2,27, method="case.control", conf.level=0.95)
Disease + Disease - Total Prevalence * Odds
Exposed + 647 622 1269 51.0 1.040
Exposed - 2 27 29 6.9 0.074
Total 649 649 1298 50.0 1.000
Point estimates and 95 % CIs:
--------------------------------------------------------------
Odds ratio 14.04 (3.33, 59.3)
Attrib prevalence * 44.09 (34.46, 53.71)
Attrib prevalence in population * 43.1 (33.49, 52.72)
Attrib fraction (est) in exposed (%) 92.88 (69.93, 98.31)
Attrib fraction (est) in population (%) 92.59 (68.98, 98.23)
--------------------------------------------------------------
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Application of epiR – Titanic accident
Passenger class Dead Survived
Economy 528 181
Not economy 281 319
> epi.2by2(528,181,281,319, method="cross.sectional", conf.level=0.95)
Point estimates and 95 % CIs:
-----------------------------------------------------------------
Prevalence ratio 1.59 (1.45, 1.75)
Odds ratio 3.31 (2.62, 4.18)
Attrib prevalence * 27.64 (22.51, 32.76)
Attrib prevalence in population * 14.97 (10.19, 19.75)
Attrib fraction in exposed (%) 37.11 (30.81, 42.84)
Attrib fraction in population (%) 24.22 (19.25, 28.88)
------------------------------------------------------------------
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Summary
RCT / prospective
study
Cross-sectional
study
Case-control
study
Relative risk
Odds ratio
NNT
D
Odds ratio
Prevalence ratio
D
Odds ratio
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Optional – Bayesian analysis of 2 proportions
•  Are the effects the same for the 2 groups?
Side effects None
Drug A 11 9
Drug B 5 15
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Frequentist analysis
•  Let X ∼ Binomial(n1, p1) and p1 = X / n1
•  Let Y ∼ Binomial(n2, p2) and p2 = Y / n2
•  Consider the hypothesis p1 = p2
•  The score statistic is:
wo
Comparing two proportions
• Consider testing H0 : p1 = p2
• Versus H1 : p1 6= p2, H2 : p1 > p2, H3 : p1 < p2
• The score test statstic for this null hypothesis is
TS =
p̂1 p̂2
q
p̂(1 p̂)( 1
n1
+ 1
n2
)
where p̂ = X+Y
n1+n2
is the estimate of the common
proportion under the null hypothesis
• This statistic is normally distributed for large n1 and n2.
Lecture 18
Brian Ca↵o
Table of
contents
Outline
The score
statistic
Exact tests
Comparing
two binomial
proportions
Bayesian and
likelihood
analysis of two
proportions
Comparing two proportions
• Consider testing H0 : p1 = p2
• Versus H1 : p1 6= p2, H2 : p1 > p2, H3 : p1 < p2
• The score test statstic for this null hypothesis is
TS =
p̂1 p̂2
q
p̂(1 p̂)( 1
n1
+ 1
n2
)
where p̂ = X+Y
n1+n2
is the estimate of the common
proportion under the null hypothesis
• This statistic is normally distributed for large n1 and n2.
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Frequentist analysis
•  p1 = 0.55, p2 = 5/20 = 0.25, p = 16/40 = 0.4
e
ts
g
mial
ns
and
f two
ns
• Test whether or not the proportion of side e↵ects is the
same for the two drugs
• p̂A = .55, p̂B = 5/20 = .25, p̂ = 16/40 = .4
• Test statistic
.55 .25
p
.4 ⇥ .6 ⇥ (1/20 + 1/20)
= 1.61
• Fail to reject H0 at .05 level (compare with 1.96)
• P-value P(|Z| 1.61) = .11
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
Bayesian analysis
•  Consider putting independent Beta(α1, β1) and
Beta(α2, β2) priors on p1 and p2 respectively
•  Then the posterior is
s
g
ial
s
nd
two
s
for two binomial proportions
• Likelihood analysis requires the use of profile likelihoods,
or some other technique and so we omit their discussion
• Consider putting independent Beta(↵1, 1) and
Beta(↵2, 2) priors on p1 and p2 respectively
• Then the posterior is
⇡(p1, p2) / px+↵1 1
1 (1 p1)n1+ 1 1
⇥py+↵2 1
2 (1 p2)n2+ 2 1
• Hence under this (potentially naive) prior, the posterior for
p1 and p2 are independent betas
• The easiest way to explore this posterior is via Monte
Carlo simulation
•  Hence under this (potentially naive) prior, the
posterior for p1 and p2 are independent betas
•  The easiest way to explore this posterior is via Monte
Carlo simulation
Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012
R analysis
x = 11; n1 = 20; alpha1 = 1; beta1 = 1
y = 5; n2 = 20; alpha2 = 1; beta2 = 1
p1 = rbeta(1000, x + alpha1, n - x + beta1)
p2 = rbeta(1000, y + alpha2, n - y + beta2)
rd = p2 - p1
plot(density(rd))
quantile(rd, c(.025, .975))
mean(rd)
median(rd)

More Related Content

What's hot

Analysis and Interpretation
Analysis and InterpretationAnalysis and Interpretation
Analysis and Interpretation
Francisco J Grajales III
 
5. Calculate samplesize for case-control studies
5. Calculate samplesize for case-control studies5. Calculate samplesize for case-control studies
5. Calculate samplesize for case-control studies
Azmi Mohd Tamil
 
8.Calculate samplesize for clinical trials (continuous outcome)
8.Calculate samplesize for clinical trials (continuous outcome)8.Calculate samplesize for clinical trials (continuous outcome)
8.Calculate samplesize for clinical trials (continuous outcome)
Azmi Mohd Tamil
 
2019 PMED Spring Course - Preliminaries: Basic Causal Inference - Marie David...
2019 PMED Spring Course - Preliminaries: Basic Causal Inference - Marie David...2019 PMED Spring Course - Preliminaries: Basic Causal Inference - Marie David...
2019 PMED Spring Course - Preliminaries: Basic Causal Inference - Marie David...
The Statistical and Applied Mathematical Sciences Institute
 
Ct lecture 1. theory of measurements
Ct lecture 1. theory of measurementsCt lecture 1. theory of measurements
Ct lecture 1. theory of measurements
Hau Pham
 
Robust Methods for Health-related Quality-of-life Assessment
Robust Methods for Health-related  Quality-of-life AssessmentRobust Methods for Health-related  Quality-of-life Assessment
Robust Methods for Health-related Quality-of-life Assessmentdylanturner22
 
7. Calculate samplesize for clinical trials
7. Calculate samplesize for clinical trials7. Calculate samplesize for clinical trials
7. Calculate samplesize for clinical trials
Azmi Mohd Tamil
 
Intent-to-Treat (ITT) Analysis in Randomized Clinical Trials
Intent-to-Treat (ITT) Analysis in Randomized Clinical TrialsIntent-to-Treat (ITT) Analysis in Randomized Clinical Trials
Intent-to-Treat (ITT) Analysis in Randomized Clinical Trials
Mike LaValley
 
MH Prediction Modeling and Validation -clean
MH Prediction Modeling and Validation -cleanMH Prediction Modeling and Validation -clean
MH Prediction Modeling and Validation -clean
Min-hyung Kim
 
Comparative hospital performance: new data, borrowed methods, more targeted a...
Comparative hospital performance: new data, borrowed methods, more targeted a...Comparative hospital performance: new data, borrowed methods, more targeted a...
Comparative hospital performance: new data, borrowed methods, more targeted a...
cheweb1
 
2. Tools to calculate samplesize
2. Tools to calculate samplesize2. Tools to calculate samplesize
2. Tools to calculate samplesize
Azmi Mohd Tamil
 
4. Calculate samplesize for cross-sectional studies
4. Calculate samplesize for cross-sectional studies4. Calculate samplesize for cross-sectional studies
4. Calculate samplesize for cross-sectional studies
Azmi Mohd Tamil
 
Repeated events analyses
Repeated events analysesRepeated events analyses
Repeated events analyses
Mike LaValley
 
Clinical trial bms clinical trials methodology 17012018
Clinical trial bms   clinical trials methodology 17012018Clinical trial bms   clinical trials methodology 17012018
Clinical trial bms clinical trials methodology 17012018
SoM
 
3. Calculate samplesize for prevalence studies
3. Calculate samplesize for prevalence studies3. Calculate samplesize for prevalence studies
3. Calculate samplesize for prevalence studies
Azmi Mohd Tamil
 
Measures And Feedback
Measures And FeedbackMeasures And Feedback
Measures And Feedback
Scott Miller
 
2010 smg training_cardiff_day2_session1_salanti
2010 smg training_cardiff_day2_session1_salanti2010 smg training_cardiff_day2_session1_salanti
2010 smg training_cardiff_day2_session1_salantirgveroniki
 
2018 IMSM: Identifying Precision Treatment for Rheumatoid Arthritis with Rein...
2018 IMSM: Identifying Precision Treatment for Rheumatoid Arthritis with Rein...2018 IMSM: Identifying Precision Treatment for Rheumatoid Arthritis with Rein...
2018 IMSM: Identifying Precision Treatment for Rheumatoid Arthritis with Rein...
The Statistical and Applied Mathematical Sciences Institute
 
day1(2010 smg training_cardiff)_session2b (1of 2) lewis
day1(2010 smg training_cardiff)_session2b (1of 2) lewisday1(2010 smg training_cardiff)_session2b (1of 2) lewis
day1(2010 smg training_cardiff)_session2b (1of 2) lewisrgveroniki
 

What's hot (20)

Twilight complex study
Twilight complex studyTwilight complex study
Twilight complex study
 
Analysis and Interpretation
Analysis and InterpretationAnalysis and Interpretation
Analysis and Interpretation
 
5. Calculate samplesize for case-control studies
5. Calculate samplesize for case-control studies5. Calculate samplesize for case-control studies
5. Calculate samplesize for case-control studies
 
8.Calculate samplesize for clinical trials (continuous outcome)
8.Calculate samplesize for clinical trials (continuous outcome)8.Calculate samplesize for clinical trials (continuous outcome)
8.Calculate samplesize for clinical trials (continuous outcome)
 
2019 PMED Spring Course - Preliminaries: Basic Causal Inference - Marie David...
2019 PMED Spring Course - Preliminaries: Basic Causal Inference - Marie David...2019 PMED Spring Course - Preliminaries: Basic Causal Inference - Marie David...
2019 PMED Spring Course - Preliminaries: Basic Causal Inference - Marie David...
 
Ct lecture 1. theory of measurements
Ct lecture 1. theory of measurementsCt lecture 1. theory of measurements
Ct lecture 1. theory of measurements
 
Robust Methods for Health-related Quality-of-life Assessment
Robust Methods for Health-related  Quality-of-life AssessmentRobust Methods for Health-related  Quality-of-life Assessment
Robust Methods for Health-related Quality-of-life Assessment
 
7. Calculate samplesize for clinical trials
7. Calculate samplesize for clinical trials7. Calculate samplesize for clinical trials
7. Calculate samplesize for clinical trials
 
Intent-to-Treat (ITT) Analysis in Randomized Clinical Trials
Intent-to-Treat (ITT) Analysis in Randomized Clinical TrialsIntent-to-Treat (ITT) Analysis in Randomized Clinical Trials
Intent-to-Treat (ITT) Analysis in Randomized Clinical Trials
 
MH Prediction Modeling and Validation -clean
MH Prediction Modeling and Validation -cleanMH Prediction Modeling and Validation -clean
MH Prediction Modeling and Validation -clean
 
Comparative hospital performance: new data, borrowed methods, more targeted a...
Comparative hospital performance: new data, borrowed methods, more targeted a...Comparative hospital performance: new data, borrowed methods, more targeted a...
Comparative hospital performance: new data, borrowed methods, more targeted a...
 
2. Tools to calculate samplesize
2. Tools to calculate samplesize2. Tools to calculate samplesize
2. Tools to calculate samplesize
 
4. Calculate samplesize for cross-sectional studies
4. Calculate samplesize for cross-sectional studies4. Calculate samplesize for cross-sectional studies
4. Calculate samplesize for cross-sectional studies
 
Repeated events analyses
Repeated events analysesRepeated events analyses
Repeated events analyses
 
Clinical trial bms clinical trials methodology 17012018
Clinical trial bms   clinical trials methodology 17012018Clinical trial bms   clinical trials methodology 17012018
Clinical trial bms clinical trials methodology 17012018
 
3. Calculate samplesize for prevalence studies
3. Calculate samplesize for prevalence studies3. Calculate samplesize for prevalence studies
3. Calculate samplesize for prevalence studies
 
Measures And Feedback
Measures And FeedbackMeasures And Feedback
Measures And Feedback
 
2010 smg training_cardiff_day2_session1_salanti
2010 smg training_cardiff_day2_session1_salanti2010 smg training_cardiff_day2_session1_salanti
2010 smg training_cardiff_day2_session1_salanti
 
2018 IMSM: Identifying Precision Treatment for Rheumatoid Arthritis with Rein...
2018 IMSM: Identifying Precision Treatment for Rheumatoid Arthritis with Rein...2018 IMSM: Identifying Precision Treatment for Rheumatoid Arthritis with Rein...
2018 IMSM: Identifying Precision Treatment for Rheumatoid Arthritis with Rein...
 
day1(2010 smg training_cardiff)_session2b (1of 2) lewis
day1(2010 smg training_cardiff)_session2b (1of 2) lewisday1(2010 smg training_cardiff)_session2b (1of 2) lewis
day1(2010 smg training_cardiff)_session2b (1of 2) lewis
 

Similar to Ct lecture 8. comparing two groups categorical data

Ct lecture 5. descriptive analysis of categorical variables
Ct lecture 5. descriptive analysis of categorical variablesCt lecture 5. descriptive analysis of categorical variables
Ct lecture 5. descriptive analysis of categorical variables
Hau Pham
 
Thriving, not just surviving after critical illness
Thriving, not just surviving after critical illnessThriving, not just surviving after critical illness
Thriving, not just surviving after critical illness
Coda Change
 
CDISC journey in solid tumor using recist 1.1 (Paper)
CDISC journey in solid tumor using recist 1.1 (Paper)CDISC journey in solid tumor using recist 1.1 (Paper)
CDISC journey in solid tumor using recist 1.1 (Paper)Kevin Lee
 
Metanalysis Lecture
Metanalysis LectureMetanalysis Lecture
Metanalysis Lecturedrmomusa
 
Sample size- dr dk yadav
Sample size- dr dk yadavSample size- dr dk yadav
Sample size- dr dk yadav
Ramachandra Barik
 
Ct lecture 12. simple linear regression analysis
Ct lecture 12. simple linear regression analysisCt lecture 12. simple linear regression analysis
Ct lecture 12. simple linear regression analysis
Hau Pham
 
Determination of sample size in scientific research.pptx
Determination of sample size in scientific research.pptxDetermination of sample size in scientific research.pptx
Determination of sample size in scientific research.pptx
Sam Edeson
 
Robust Methods for Health-related Quality-of-life Assessment
Robust Methods for Health-related Quality-of-life AssessmentRobust Methods for Health-related Quality-of-life Assessment
Robust Methods for Health-related Quality-of-life Assessmentdylanturner22
 
Sample size in general
Sample size in generalSample size in general
Sample size in general
Mmedsc Hahm
 
Estudio Paramount cáncer de pulmón 2014
Estudio Paramount cáncer de pulmón 2014Estudio Paramount cáncer de pulmón 2014
Estudio Paramount cáncer de pulmón 2014Martín Lázaro
 
Step by Step Guide to Efficacy Analysis in Solid Tumors Oncology Clinical Trials
Step by Step Guide to Efficacy Analysis in Solid Tumors Oncology Clinical TrialsStep by Step Guide to Efficacy Analysis in Solid Tumors Oncology Clinical Trials
Step by Step Guide to Efficacy Analysis in Solid Tumors Oncology Clinical Trials
Dave Vanz
 
Test of significance (t-test, proportion test, chi-square test)
Test of significance (t-test, proportion test, chi-square test)Test of significance (t-test, proportion test, chi-square test)
Test of significance (t-test, proportion test, chi-square test)
Ramnath Takiar
 
Ct lecture 20. survival analysis (part 2)
Ct lecture 20. survival analysis (part 2)Ct lecture 20. survival analysis (part 2)
Ct lecture 20. survival analysis (part 2)
Hau Pham
 
UAB Pulmonary board review study design and statistical principles
UAB Pulmonary board review study  design and statistical principles UAB Pulmonary board review study  design and statistical principles
UAB Pulmonary board review study design and statistical principles
Terry Shaneyfelt
 
Imran rizvi statistics in meta analysis
Imran rizvi statistics in meta analysisImran rizvi statistics in meta analysis
Imran rizvi statistics in meta analysis
Imran Rizvi
 
Efficacy endpoints in Oncology
Efficacy endpoints in OncologyEfficacy endpoints in Oncology
Efficacy endpoints in OncologyAngelo Tinazzi
 
Sample determinants and size
Sample determinants and sizeSample determinants and size
Sample determinants and size
Tarek Tawfik Amin
 

Similar to Ct lecture 8. comparing two groups categorical data (20)

Ct lecture 5. descriptive analysis of categorical variables
Ct lecture 5. descriptive analysis of categorical variablesCt lecture 5. descriptive analysis of categorical variables
Ct lecture 5. descriptive analysis of categorical variables
 
Thriving, not just surviving after critical illness
Thriving, not just surviving after critical illnessThriving, not just surviving after critical illness
Thriving, not just surviving after critical illness
 
CDISC journey in solid tumor using recist 1.1 (Paper)
CDISC journey in solid tumor using recist 1.1 (Paper)CDISC journey in solid tumor using recist 1.1 (Paper)
CDISC journey in solid tumor using recist 1.1 (Paper)
 
Metanalysis Lecture
Metanalysis LectureMetanalysis Lecture
Metanalysis Lecture
 
Sample size- dr dk yadav
Sample size- dr dk yadavSample size- dr dk yadav
Sample size- dr dk yadav
 
Ct lecture 12. simple linear regression analysis
Ct lecture 12. simple linear regression analysisCt lecture 12. simple linear regression analysis
Ct lecture 12. simple linear regression analysis
 
Determination of sample size in scientific research.pptx
Determination of sample size in scientific research.pptxDetermination of sample size in scientific research.pptx
Determination of sample size in scientific research.pptx
 
Quantitative Synthesis I
Quantitative Synthesis IQuantitative Synthesis I
Quantitative Synthesis I
 
Robust Methods for Health-related Quality-of-life Assessment
Robust Methods for Health-related Quality-of-life AssessmentRobust Methods for Health-related Quality-of-life Assessment
Robust Methods for Health-related Quality-of-life Assessment
 
Sample size in general
Sample size in generalSample size in general
Sample size in general
 
Estudio Paramount cáncer de pulmón 2014
Estudio Paramount cáncer de pulmón 2014Estudio Paramount cáncer de pulmón 2014
Estudio Paramount cáncer de pulmón 2014
 
Step by Step Guide to Efficacy Analysis in Solid Tumors Oncology Clinical Trials
Step by Step Guide to Efficacy Analysis in Solid Tumors Oncology Clinical TrialsStep by Step Guide to Efficacy Analysis in Solid Tumors Oncology Clinical Trials
Step by Step Guide to Efficacy Analysis in Solid Tumors Oncology Clinical Trials
 
D5 efficacy endpoints in oncology
D5   efficacy endpoints in oncologyD5   efficacy endpoints in oncology
D5 efficacy endpoints in oncology
 
Test of significance (t-test, proportion test, chi-square test)
Test of significance (t-test, proportion test, chi-square test)Test of significance (t-test, proportion test, chi-square test)
Test of significance (t-test, proportion test, chi-square test)
 
05 diagnostic tests cwq
05 diagnostic tests cwq05 diagnostic tests cwq
05 diagnostic tests cwq
 
Ct lecture 20. survival analysis (part 2)
Ct lecture 20. survival analysis (part 2)Ct lecture 20. survival analysis (part 2)
Ct lecture 20. survival analysis (part 2)
 
UAB Pulmonary board review study design and statistical principles
UAB Pulmonary board review study  design and statistical principles UAB Pulmonary board review study  design and statistical principles
UAB Pulmonary board review study design and statistical principles
 
Imran rizvi statistics in meta analysis
Imran rizvi statistics in meta analysisImran rizvi statistics in meta analysis
Imran rizvi statistics in meta analysis
 
Efficacy endpoints in Oncology
Efficacy endpoints in OncologyEfficacy endpoints in Oncology
Efficacy endpoints in Oncology
 
Sample determinants and size
Sample determinants and sizeSample determinants and size
Sample determinants and size
 

More from Hau Pham

2008_Plague-Slide_Ref SR20080097
2008_Plague-Slide_Ref SR200800972008_Plague-Slide_Ref SR20080097
2008_Plague-Slide_Ref SR20080097
Hau Pham
 
Thuc hanh Dich Te Hoc Y Ha Noi 2003
Thuc hanh Dich Te Hoc Y Ha Noi 2003Thuc hanh Dich Te Hoc Y Ha Noi 2003
Thuc hanh Dich Te Hoc Y Ha Noi 2003
Hau Pham
 
Lecture 3. planning data analysis
Lecture 3. planning data analysisLecture 3. planning data analysis
Lecture 3. planning data analysis
Hau Pham
 
Ct lecture 16. model selection
Ct lecture 16. model selectionCt lecture 16. model selection
Ct lecture 16. model selection
Hau Pham
 
Ct lecture 11. correlation analysis
Ct lecture 11. correlation analysisCt lecture 11. correlation analysis
Ct lecture 11. correlation analysis
Hau Pham
 
Ct lecture 2. questionnaire deisgn
Ct lecture 2. questionnaire deisgnCt lecture 2. questionnaire deisgn
Ct lecture 2. questionnaire deisgn
Hau Pham
 
ThongKe Y-Sinh Hoc_Bài 1 một số kiến thức toán cơ bản
ThongKe Y-Sinh Hoc_Bài 1 một số kiến thức toán cơ bảnThongKe Y-Sinh Hoc_Bài 1 một số kiến thức toán cơ bản
ThongKe Y-Sinh Hoc_Bài 1 một số kiến thức toán cơ bản
Hau Pham
 

More from Hau Pham (7)

2008_Plague-Slide_Ref SR20080097
2008_Plague-Slide_Ref SR200800972008_Plague-Slide_Ref SR20080097
2008_Plague-Slide_Ref SR20080097
 
Thuc hanh Dich Te Hoc Y Ha Noi 2003
Thuc hanh Dich Te Hoc Y Ha Noi 2003Thuc hanh Dich Te Hoc Y Ha Noi 2003
Thuc hanh Dich Te Hoc Y Ha Noi 2003
 
Lecture 3. planning data analysis
Lecture 3. planning data analysisLecture 3. planning data analysis
Lecture 3. planning data analysis
 
Ct lecture 16. model selection
Ct lecture 16. model selectionCt lecture 16. model selection
Ct lecture 16. model selection
 
Ct lecture 11. correlation analysis
Ct lecture 11. correlation analysisCt lecture 11. correlation analysis
Ct lecture 11. correlation analysis
 
Ct lecture 2. questionnaire deisgn
Ct lecture 2. questionnaire deisgnCt lecture 2. questionnaire deisgn
Ct lecture 2. questionnaire deisgn
 
ThongKe Y-Sinh Hoc_Bài 1 một số kiến thức toán cơ bản
ThongKe Y-Sinh Hoc_Bài 1 một số kiến thức toán cơ bảnThongKe Y-Sinh Hoc_Bài 1 một số kiến thức toán cơ bản
ThongKe Y-Sinh Hoc_Bài 1 một số kiến thức toán cơ bản
 

Recently uploaded

263778731218 Abortion Clinic /Pills In Harare ,
263778731218 Abortion Clinic /Pills In Harare ,263778731218 Abortion Clinic /Pills In Harare ,
263778731218 Abortion Clinic /Pills In Harare ,
sisternakatoto
 
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdf
ARTIFICIAL INTELLIGENCE IN  HEALTHCARE.pdfARTIFICIAL INTELLIGENCE IN  HEALTHCARE.pdf
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdf
Anujkumaranit
 
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Oleg Kshivets
 
Couples presenting to the infertility clinic- Do they really have infertility...
Couples presenting to the infertility clinic- Do they really have infertility...Couples presenting to the infertility clinic- Do they really have infertility...
Couples presenting to the infertility clinic- Do they really have infertility...
Sujoy Dasgupta
 
Knee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdfKnee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdf
vimalpl1234
 
Cervical & Brachial Plexus By Dr. RIG.pptx
Cervical & Brachial Plexus By Dr. RIG.pptxCervical & Brachial Plexus By Dr. RIG.pptx
Cervical & Brachial Plexus By Dr. RIG.pptx
Dr. Rabia Inam Gandapore
 
POST OPERATIVE OLIGURIA and its management
POST OPERATIVE OLIGURIA and its managementPOST OPERATIVE OLIGURIA and its management
POST OPERATIVE OLIGURIA and its management
touseefaziz1
 
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model SafeSurat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Savita Shen $i11
 
BRACHYTHERAPY OVERVIEW AND APPLICATORS
BRACHYTHERAPY OVERVIEW  AND  APPLICATORSBRACHYTHERAPY OVERVIEW  AND  APPLICATORS
BRACHYTHERAPY OVERVIEW AND APPLICATORS
Krishan Murari
 
BENIGN PROSTATIC HYPERPLASIA.BPH. BPHpdf
BENIGN PROSTATIC HYPERPLASIA.BPH. BPHpdfBENIGN PROSTATIC HYPERPLASIA.BPH. BPHpdf
BENIGN PROSTATIC HYPERPLASIA.BPH. BPHpdf
DR SETH JOTHAM
 
ACUTE SCROTUM.....pdf. ACUTE SCROTAL CONDITIOND
ACUTE SCROTUM.....pdf. ACUTE SCROTAL CONDITIONDACUTE SCROTUM.....pdf. ACUTE SCROTAL CONDITIOND
ACUTE SCROTUM.....pdf. ACUTE SCROTAL CONDITIOND
DR SETH JOTHAM
 
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
bkling
 
Ophthalmology Clinical Tests for OSCE exam
Ophthalmology Clinical Tests for OSCE examOphthalmology Clinical Tests for OSCE exam
Ophthalmology Clinical Tests for OSCE exam
KafrELShiekh University
 
Are There Any Natural Remedies To Treat Syphilis.pdf
Are There Any Natural Remedies To Treat Syphilis.pdfAre There Any Natural Remedies To Treat Syphilis.pdf
Are There Any Natural Remedies To Treat Syphilis.pdf
Little Cross Family Clinic
 
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptxPharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Dr. Rabia Inam Gandapore
 
Superficial & Deep Fascia of the NECK.pptx
Superficial & Deep Fascia of the NECK.pptxSuperficial & Deep Fascia of the NECK.pptx
Superficial & Deep Fascia of the NECK.pptx
Dr. Rabia Inam Gandapore
 
New Drug Discovery and Development .....
New Drug Discovery and Development .....New Drug Discovery and Development .....
New Drug Discovery and Development .....
NEHA GUPTA
 
KDIGO 2024 guidelines for diabetologists
KDIGO 2024 guidelines for diabetologistsKDIGO 2024 guidelines for diabetologists
KDIGO 2024 guidelines for diabetologists
د.محمود نجيب
 
basicmodesofventilation2022-220313203758.pdf
basicmodesofventilation2022-220313203758.pdfbasicmodesofventilation2022-220313203758.pdf
basicmodesofventilation2022-220313203758.pdf
aljamhori teaching hospital
 
Ocular injury ppt Upendra pal optometrist upums saifai etawah
Ocular injury  ppt  Upendra pal  optometrist upums saifai etawahOcular injury  ppt  Upendra pal  optometrist upums saifai etawah
Ocular injury ppt Upendra pal optometrist upums saifai etawah
pal078100
 

Recently uploaded (20)

263778731218 Abortion Clinic /Pills In Harare ,
263778731218 Abortion Clinic /Pills In Harare ,263778731218 Abortion Clinic /Pills In Harare ,
263778731218 Abortion Clinic /Pills In Harare ,
 
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdf
ARTIFICIAL INTELLIGENCE IN  HEALTHCARE.pdfARTIFICIAL INTELLIGENCE IN  HEALTHCARE.pdf
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdf
 
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
 
Couples presenting to the infertility clinic- Do they really have infertility...
Couples presenting to the infertility clinic- Do they really have infertility...Couples presenting to the infertility clinic- Do they really have infertility...
Couples presenting to the infertility clinic- Do they really have infertility...
 
Knee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdfKnee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdf
 
Cervical & Brachial Plexus By Dr. RIG.pptx
Cervical & Brachial Plexus By Dr. RIG.pptxCervical & Brachial Plexus By Dr. RIG.pptx
Cervical & Brachial Plexus By Dr. RIG.pptx
 
POST OPERATIVE OLIGURIA and its management
POST OPERATIVE OLIGURIA and its managementPOST OPERATIVE OLIGURIA and its management
POST OPERATIVE OLIGURIA and its management
 
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model SafeSurat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
 
BRACHYTHERAPY OVERVIEW AND APPLICATORS
BRACHYTHERAPY OVERVIEW  AND  APPLICATORSBRACHYTHERAPY OVERVIEW  AND  APPLICATORS
BRACHYTHERAPY OVERVIEW AND APPLICATORS
 
BENIGN PROSTATIC HYPERPLASIA.BPH. BPHpdf
BENIGN PROSTATIC HYPERPLASIA.BPH. BPHpdfBENIGN PROSTATIC HYPERPLASIA.BPH. BPHpdf
BENIGN PROSTATIC HYPERPLASIA.BPH. BPHpdf
 
ACUTE SCROTUM.....pdf. ACUTE SCROTAL CONDITIOND
ACUTE SCROTUM.....pdf. ACUTE SCROTAL CONDITIONDACUTE SCROTUM.....pdf. ACUTE SCROTAL CONDITIOND
ACUTE SCROTUM.....pdf. ACUTE SCROTAL CONDITIOND
 
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?
 
Ophthalmology Clinical Tests for OSCE exam
Ophthalmology Clinical Tests for OSCE examOphthalmology Clinical Tests for OSCE exam
Ophthalmology Clinical Tests for OSCE exam
 
Are There Any Natural Remedies To Treat Syphilis.pdf
Are There Any Natural Remedies To Treat Syphilis.pdfAre There Any Natural Remedies To Treat Syphilis.pdf
Are There Any Natural Remedies To Treat Syphilis.pdf
 
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptxPharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
 
Superficial & Deep Fascia of the NECK.pptx
Superficial & Deep Fascia of the NECK.pptxSuperficial & Deep Fascia of the NECK.pptx
Superficial & Deep Fascia of the NECK.pptx
 
New Drug Discovery and Development .....
New Drug Discovery and Development .....New Drug Discovery and Development .....
New Drug Discovery and Development .....
 
KDIGO 2024 guidelines for diabetologists
KDIGO 2024 guidelines for diabetologistsKDIGO 2024 guidelines for diabetologists
KDIGO 2024 guidelines for diabetologists
 
basicmodesofventilation2022-220313203758.pdf
basicmodesofventilation2022-220313203758.pdfbasicmodesofventilation2022-220313203758.pdf
basicmodesofventilation2022-220313203758.pdf
 
Ocular injury ppt Upendra pal optometrist upums saifai etawah
Ocular injury  ppt  Upendra pal  optometrist upums saifai etawahOcular injury  ppt  Upendra pal  optometrist upums saifai etawah
Ocular injury ppt Upendra pal optometrist upums saifai etawah
 

Ct lecture 8. comparing two groups categorical data

  • 1. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Comparing two groups: categorical data Tuan V. Nguyen Professor and NHMRC Senior Research Fellow Garvan Institute of Medical Research University of New South Wales Sydney, Australia
  • 2. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 What we are going to learn … •  Examples (RCT, CC, Cohort) •  Two proportions •  Metrics of effect: d, RR, OR •  Applicability of d, RR, OR •  D and z-test •  NNT •  Measure of association: OR •  Small sample size: Fisher’s exact test
  • 3. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Zoledronate and fracture Randomized controlled clinical trial Placebo n = 1062, Zoledronate n = 1065 Length of follow-up: 3 years Lyles KW, et al. Zoledronic acid and clinical fractures and mortality after hip fracture. N Engl J Med 2007;357. DOI: 10.1056/NEJMoa074941
  • 4. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Smoking and lung cancer Sir Richard Doll (1912 – 2005) http://en.wikipedia.org/wiki/Richard_Doll Lung Cancer Controls Smokers 647 622 Non-smokers 2 27 R Doll and B Hill. BMJ 1950; ii:739-748 Is there an association between smoking and lung cancer?
  • 5. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Mortality in the Titanic incident Class Dead Survived Total I 123 200 (62%) 323 II 158 119 (43%) 277 III 528 181 (26%) 709 Total 809 500 (38%) 1309 http://lib.stat.cmu.edu/S/Harrell/data/descriptions/titanic3info.txt Is there an association between passenger class and and death?
  • 6. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 What are common characteristics of these data? •  Binary outcome: yes/no; dead / survived •  Proportion / percent / probability
  • 7. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Sample vs population Sample Population Group 1 Group 2 Group 1 Group 2 N n1 n2 Infinite Infinite Probability of outcome p1 p2 p1 = ? p2 = ? Difference d = p1 – p 1 d = p1 – p2 Status Known Unknown Aim: use sample data d to estimate population parameter d
  • 8. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Metrics of effect •  Absolute difference (d) •  Relative risk (RR; risk ratio) •  Odds ratio (OR) •  Number needed to treat (NNT) The choice is dependent on study design
  • 9. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Absolute difference d Outcome Placebo Treatment Any fracture 139 92 Non-fracture 923 973 N 1062 1065 Outcome Group 1 Group 2 Bad a b Good c D N N1 N2 Absolute difference p1 = 139 / 1062 = 0.131 p2 = 92 / 1065 = 0.086 d = p2 – p1 = -0.044 p1 = a / N1 p2 = b / N2 d = p2 – p1
  • 10. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Number needed to treat – NNT Outcome Placebo Treatment Any fracture 139 92 Non-fracture 923 973 N 1062 1065 Outcome Group 1 Group 2 Bad a b Good c D N N1 N2 Number needed to treat p1 = 139 / 1062 = 0.131 p2 = 92 / 1065 = 0.086 d = p2 – p1 = -0.044 NNT = 1 / d = 22 p1 = a / N1 p2 = b / N2 d = p2 – p1 NNT = 1 / d
  • 11. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Relative risk - RR Outcome Placebo Treatment Any fracture 139 92 Non-fracture 923 973 N 1062 1065 Outcome Group 1 Group 2 Bad a b Good c D N N1 N2 Relative risk p1 = 139 / 1062 = 0.131 p2 = 92 / 1065 = 0.086 RR = p2 / p1 = 0.66 p1 = a / N1 p2 = b / N2 RR = p2 / p1
  • 12. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Meaning of RR •  Risk of developing disease Treatment: p1 = a / N1 Placebo: p2 = b / N2 •  Relative risk RR = p1 / p2 •  Implications: RR = 1, there is no effect RR < 1, the treatment is beneficial. RR > 1, the treatment is harmful.
  • 13. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Odds ratio - OR Outcome Placebo Treatment Any fracture 139 92 Non-fracture 923 973 N 1062 1065 Outcome Group 1 Group 2 Bad a b Good c D N N1 N2 Odds ratio odds1 = 139 / 923 = 0.140 odds2 = 92 / 973 = 0.094 OR = odds2 / odds1 = 0.68 odds1 = a / c odds2 = b / d OR = odds2 / odds1 OR = (a x d) / (b x c)
  • 14. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Meaning of OR •  OR = 1, there is no association •  OR < 1, the risk factor is associated with reduced disease risk •  OR > 1, the risk factor is associated with increased disease risk
  • 15. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Study design – time aspect PAST PRESENT FUTURE Cohort study, RCT (longitudinal, prospective) Case-control study Cross- sectional study
  • 16. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Appropriateness of effect size RCT / prospective study Cross-sectional study Case-control study Relative risk Odds ratio NNT D Odds ratio Prevalence ratio D Odds ratio
  • 17. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Problem and solution •  Finding an estimate for d, OR, RR is easy •  Finding the 95% confidence interval is harder •  We can however use R
  • 18. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Example of d 1 1 N a p = Treatment Control Disease a b No disease c d Sample size N1 N2 2 1 p p d − = ( ) ( ) ( ) 2 2 1 1 1 1 1 1 N p p N p p d SE − + − = ( ) d SE d CI 96 . 1 % 95  = Zole Placebo Fracture 92 139 No fracture 973 923 Sample size 1065 1062 044 . 0 086 . 0 131 . 0 1062 139 1065 92 = − = − = d ( ) ( ) ( ) 0134 . 0 1062 956 . 0 044 . 0 1065 869 . 0 131 . 0 = + = d SE ( ) 0134 . 0 96 . 1 044 . 0 % 95 × =  d CI ( ) 081 . 0 , 018 . 0 % 95 = d CI 2 2 N b p =
  • 19. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Example of NNT •  NNT = 1 / 0.044 = 22 •  95% CI for NNT: –  1 / 0.018 = 55 –  1 / 0.081 = 14 044 . 0 086 . 0 131 . 0 1062 139 1065 92 = − = − = d ( ) ( ) ( ) 0134 . 0 1062 956 . 0 044 . 0 1065 869 . 0 131 . 0 = + = d SE ( ) 0134 . 0 96 . 1 044 . 0 % 95 × =  d CI ( ) 081 . 0 , 018 . 0 % 95 = d CI
  • 20. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Example of RR Treatment Control Disease a b No disease c d Sample size N1 N2 2 1 / / N b N a RR = ( ) RR LRR log = ( ) 2 1 1 1 1 1 N b N a LRR SE − + − = ( ) ( ) LRR SE LRR LRR CI 96 . 1 % 95  = ( ) ( ) LRR SE LRR e RR CI 96 . 1 % 95  = Zole Placebo Fracture 92 139 No fracture 973 923 Sample size 1065 1062 66 . 0 131 . 0 086 . 0 1062 / 139 1065 / 92 = = = RR ( ) 4155 . 0 66 . 0 log − = = LRR ( ) 127 . 0 1062 1 139 1 1065 1 92 1 = − + − = LRR SE ( ) 127 . 0 96 . 1 416 . 0 % 95 × − =  LRR CI ( ) 127 . 0 96 . 1 416 . 0 % 95 × − =  e RR CI = 0.514 to 0.847
  • 21. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Example of OR Disease No disease Risk +ve a b Risk –ve c d bc ad OR = ( ) OR LOR log = ( ) d c b a LOR SE 1 1 1 1 + + + = ( ) ( ) LOR SE LOR LOR CI 96 . 1 % 95  = ( ) ( ) LOR SE LOR e OR CI 96 . 1 % 95  = Lung K Control Smoking 647 622 No smoking 2 27 04 . 14 2 622 27 647 = × × = OR ( ) 64 . 2 04 . 14 log = = LOR ( ) 735 . 0 27 1 2 1 622 1 647 1 = + + + = LOR SE ( ) 735 . 0 96 . 1 642 . 2 % 95 × =  LOR CI ( ) 735 . 0 96 . 1 64 . 2 % 95 × =  e OR CI = 3.32 to 59.03
  • 22. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Introducing epiR package Disease No disease Exposed (treatment) a b Not exposed (control) c d epi.2by2(a, b, c, d, method = “xxx", conf.level = 0.95) Where method = "cohort.count" "case.control" "cross.sectional"
  • 23. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Application of epiR – RCT study Fracture No frcture Zoleronate 92 973 Placebo 139 923 library(epiR) epi.2by2(92, 973, 139, 923, method="cohort.count", conf.level=0.95) > epi.2by2(92, 973, 139, 923, method = "cohort.count", conf.level = 0.95) Disease + Disease - Total Inc risk * Odds Exposed + 92 973 1065 8.64 0.0946 Exposed - 139 923 1062 13.09 0.1506 Total 231 1896 2127 10.86 0.1218 Point estimates and 95 % CIs: --------------------------------------------------------- Inc risk ratio 0.66 (0.51, 0.85) Odds ratio 0.63 (0.48, 0.83) Attrib risk * -4.45 (-7.09, -1.81) Attrib risk in population * -2.23 (-4.65, 0.19) Attrib fraction in exposed (%) -51.51 (-94.42, -18.08) Attrib fraction in population (%) -20.52 (-33.15, -9.08) --------------------------------------------------------- * Cases per 100 population units
  • 24. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Application of epiR – Case-control study K Not K Smoking 647 622 No smoking 2 27 > epi.2by2(647,622,2,27, method="case.control", conf.level=0.95) Disease + Disease - Total Prevalence * Odds Exposed + 647 622 1269 51.0 1.040 Exposed - 2 27 29 6.9 0.074 Total 649 649 1298 50.0 1.000 Point estimates and 95 % CIs: -------------------------------------------------------------- Odds ratio 14.04 (3.33, 59.3) Attrib prevalence * 44.09 (34.46, 53.71) Attrib prevalence in population * 43.1 (33.49, 52.72) Attrib fraction (est) in exposed (%) 92.88 (69.93, 98.31) Attrib fraction (est) in population (%) 92.59 (68.98, 98.23) --------------------------------------------------------------
  • 25. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Application of epiR – Titanic accident Passenger class Dead Survived Economy 528 181 Not economy 281 319 > epi.2by2(528,181,281,319, method="cross.sectional", conf.level=0.95) Point estimates and 95 % CIs: ----------------------------------------------------------------- Prevalence ratio 1.59 (1.45, 1.75) Odds ratio 3.31 (2.62, 4.18) Attrib prevalence * 27.64 (22.51, 32.76) Attrib prevalence in population * 14.97 (10.19, 19.75) Attrib fraction in exposed (%) 37.11 (30.81, 42.84) Attrib fraction in population (%) 24.22 (19.25, 28.88) ------------------------------------------------------------------
  • 26. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Summary RCT / prospective study Cross-sectional study Case-control study Relative risk Odds ratio NNT D Odds ratio Prevalence ratio D Odds ratio
  • 27. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Optional – Bayesian analysis of 2 proportions •  Are the effects the same for the 2 groups? Side effects None Drug A 11 9 Drug B 5 15
  • 28. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Frequentist analysis •  Let X ∼ Binomial(n1, p1) and p1 = X / n1 •  Let Y ∼ Binomial(n2, p2) and p2 = Y / n2 •  Consider the hypothesis p1 = p2 •  The score statistic is: wo Comparing two proportions • Consider testing H0 : p1 = p2 • Versus H1 : p1 6= p2, H2 : p1 > p2, H3 : p1 < p2 • The score test statstic for this null hypothesis is TS = p̂1 p̂2 q p̂(1 p̂)( 1 n1 + 1 n2 ) where p̂ = X+Y n1+n2 is the estimate of the common proportion under the null hypothesis • This statistic is normally distributed for large n1 and n2. Lecture 18 Brian Ca↵o Table of contents Outline The score statistic Exact tests Comparing two binomial proportions Bayesian and likelihood analysis of two proportions Comparing two proportions • Consider testing H0 : p1 = p2 • Versus H1 : p1 6= p2, H2 : p1 > p2, H3 : p1 < p2 • The score test statstic for this null hypothesis is TS = p̂1 p̂2 q p̂(1 p̂)( 1 n1 + 1 n2 ) where p̂ = X+Y n1+n2 is the estimate of the common proportion under the null hypothesis • This statistic is normally distributed for large n1 and n2.
  • 29. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Frequentist analysis •  p1 = 0.55, p2 = 5/20 = 0.25, p = 16/40 = 0.4 e ts g mial ns and f two ns • Test whether or not the proportion of side e↵ects is the same for the two drugs • p̂A = .55, p̂B = 5/20 = .25, p̂ = 16/40 = .4 • Test statistic .55 .25 p .4 ⇥ .6 ⇥ (1/20 + 1/20) = 1.61 • Fail to reject H0 at .05 level (compare with 1.96) • P-value P(|Z| 1.61) = .11
  • 30. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 Bayesian analysis •  Consider putting independent Beta(α1, β1) and Beta(α2, β2) priors on p1 and p2 respectively •  Then the posterior is s g ial s nd two s for two binomial proportions • Likelihood analysis requires the use of profile likelihoods, or some other technique and so we omit their discussion • Consider putting independent Beta(↵1, 1) and Beta(↵2, 2) priors on p1 and p2 respectively • Then the posterior is ⇡(p1, p2) / px+↵1 1 1 (1 p1)n1+ 1 1 ⇥py+↵2 1 2 (1 p2)n2+ 2 1 • Hence under this (potentially naive) prior, the posterior for p1 and p2 are independent betas • The easiest way to explore this posterior is via Monte Carlo simulation •  Hence under this (potentially naive) prior, the posterior for p1 and p2 are independent betas •  The easiest way to explore this posterior is via Monte Carlo simulation
  • 31. Workshop on Analysis of Clinical Studies – Can Tho University of Medicine and Pharmacy – April 2012 R analysis x = 11; n1 = 20; alpha1 = 1; beta1 = 1 y = 5; n2 = 20; alpha2 = 1; beta2 = 1 p1 = rbeta(1000, x + alpha1, n - x + beta1) p2 = rbeta(1000, y + alpha2, n - y + beta2) rd = p2 - p1 plot(density(rd)) quantile(rd, c(.025, .975)) mean(rd) median(rd)