A workshop on analysis of clinical studies was held at Can Tho University of Medicine and Pharmacy in April 2012. The workshop covered topics such as comparing groups using categorical data, metrics to measure treatment effect such as difference, relative risk, odds ratio, and number needed to treat. Examples of randomized controlled trials, case-control studies, and cohort studies were presented to illustrate the appropriate effect measures and statistical tests for different study designs. R software was introduced to demonstrate how to calculate confidence intervals for differences, relative risks, and odds ratios.
MH Prediction Modeling and Validation -cleanMin-hyung Kim
Overfitting
The Bias-Variance Trade-Off
Sequestered (unseen) test dataset
K-fold cross-validation (within the training dataset)
Performance measures
regression: mean squared error (MSE)
classification: sensitivity, specificity, AUROC, etc.
Visualize the overfitting and the bias-variance trade-off versus the model complexity
Final Presentation given at the conclusion of the 2018 IMSM by the Savvysherpa Student Working Group.
Group Members: Chixiang Chen, Ashley Gannon, Duwani Katmullage, Miaoqi Li, Mengfe Liu, Rebecca North and Jialu Wang
MH Prediction Modeling and Validation -cleanMin-hyung Kim
Overfitting
The Bias-Variance Trade-Off
Sequestered (unseen) test dataset
K-fold cross-validation (within the training dataset)
Performance measures
regression: mean squared error (MSE)
classification: sensitivity, specificity, AUROC, etc.
Visualize the overfitting and the bias-variance trade-off versus the model complexity
Final Presentation given at the conclusion of the 2018 IMSM by the Savvysherpa Student Working Group.
Group Members: Chixiang Chen, Ashley Gannon, Duwani Katmullage, Miaoqi Li, Mengfe Liu, Rebecca North and Jialu Wang
Test of significance (t-test, proportion test, chi-square test)Ramnath Takiar
The presentation discusses the concept of test of significance including the test of significance examples of t-test, proportion test and chi-square test.
263778731218 Abortion Clinic /Pills In Harare ,sisternakatoto
263778731218 Abortion Clinic /Pills In Harare ,ABORTION WOMEN’S CLINIC +27730423979 IN women clinic we believe that every woman should be able to make choices in her pregnancy. Our job is to provide compassionate care, safety,affordable and confidential services. That’s why we have won the trust from all generations of women all over the world. we use non surgical method(Abortion pills) to terminate…Dr.LISA +27730423979women Clinic is committed to providing the highest quality of obstetrical and gynecological care to women of all ages. Our dedicated staff aim to treat each patient and her health concerns with compassion and respect.Our dedicated group ABORTION WOMEN’S CLINIC +27730423979 IN women clinic we believe that every woman should be able to make choices in her pregnancy. Our job is to provide compassionate care, safety,affordable and confidential services. That’s why we have won the trust from all generations of women all over the world. we use non surgical method(Abortion pills) to terminate…Dr.LISA +27730423979women Clinic is committed to providing the highest quality of obstetrical and gynecological care to women of all ages. Our dedicated staff aim to treat each patient and her health concerns with compassion and respect.Our dedicated group of receptionists, nurses, and physicians have worked together as a teamof receptionists, nurses, and physicians have worked together as a team wwww.lisywomensclinic.co.za/
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdfAnujkumaranit
Artificial intelligence (AI) refers to the simulation of human intelligence processes by machines, especially computer systems. It encompasses tasks such as learning, reasoning, problem-solving, perception, and language understanding. AI technologies are revolutionizing various fields, from healthcare to finance, by enabling machines to perform tasks that typically require human intelligence.
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...Oleg Kshivets
RESULTS: Overall life span (LS) was 2252.1±1742.5 days and cumulative 5-year survival (5YS) reached 73.2%, 10 years – 64.8%, 20 years – 42.5%. 513 LCP lived more than 5 years (LS=3124.6±1525.6 days), 148 LCP – more than 10 years (LS=5054.4±1504.1 days).199 LCP died because of LC (LS=562.7±374.5 days). 5YS of LCP after bi/lobectomies was significantly superior in comparison with LCP after pneumonectomies (78.1% vs.63.7%, P=0.00001 by log-rank test). AT significantly improved 5YS (66.3% vs. 34.8%) (P=0.00000 by log-rank test) only for LCP with N1-2. Cox modeling displayed that 5YS of LCP significantly depended on: phase transition (PT) early-invasive LC in terms of synergetics, PT N0—N12, cell ratio factors (ratio between cancer cells- CC and blood cells subpopulations), G1-3, histology, glucose, AT, blood cell circuit, prothrombin index, heparin tolerance, recalcification time (P=0.000-0.038). Neural networks, genetic algorithm selection and bootstrap simulation revealed relationships between 5YS and PT early-invasive LC (rank=1), PT N0—N12 (rank=2), thrombocytes/CC (3), erythrocytes/CC (4), eosinophils/CC (5), healthy cells/CC (6), lymphocytes/CC (7), segmented neutrophils/CC (8), stick neutrophils/CC (9), monocytes/CC (10); leucocytes/CC (11). Correct prediction of 5YS was 100% by neural networks computing (area under ROC curve=1.0; error=0.0).
CONCLUSIONS: 5YS of LCP after radical procedures significantly depended on: 1) PT early-invasive cancer; 2) PT N0--N12; 3) cell ratio factors; 4) blood cell circuit; 5) biochemical factors; 6) hemostasis system; 7) AT; 8) LC characteristics; 9) LC cell dynamics; 10) surgery type: lobectomy/pneumonectomy; 11) anthropometric data. Optimal diagnosis and treatment strategies for LC are: 1) screening and early detection of LC; 2) availability of experienced thoracic surgeons because of complexity of radical procedures; 3) aggressive en block surgery and adequate lymph node dissection for completeness; 4) precise prediction; 5) adjuvant chemoimmunoradiotherapy for LCP with unfavorable prognosis.
Couples presenting to the infertility clinic- Do they really have infertility...Sujoy Dasgupta
Dr Sujoy Dasgupta presented the study on "Couples presenting to the infertility clinic- Do they really have infertility? – The unexplored stories of non-consummation" in the 13th Congress of the Asia Pacific Initiative on Reproduction (ASPIRE 2024) at Manila on 24 May, 2024.
Knee anatomy and clinical tests 2024.pdfvimalpl1234
This includes all relevant anatomy and clinical tests compiled from standard textbooks, Campbell,netter etc..It is comprehensive and best suited for orthopaedicians and orthopaedic residents.
The prostate is an exocrine gland of the male mammalian reproductive system
It is a walnut-sized gland that forms part of the male reproductive system and is located in front of the rectum and just below the urinary bladder
Function is to store and secrete a clear, slightly alkaline fluid that constitutes 10-30% of the volume of the seminal fluid that along with the spermatozoa, constitutes semen
A healthy human prostate measures (4cm-vertical, by 3cm-horizontal, 2cm ant-post ).
It surrounds the urethra just below the urinary bladder. It has anterior, median, posterior and two lateral lobes
It’s work is regulated by androgens which are responsible for male sex characteristics
Generalised disease of the prostate due to hormonal derangement which leads to non malignant enlargement of the gland (increase in the number of epithelial cells and stromal tissue)to cause compression of the urethra leading to symptoms (LUTS
Acute scrotum is a general term referring to an emergency condition affecting the contents or the wall of the scrotum.
There are a number of conditions that present acutely, predominantly with pain and/or swelling
A careful and detailed history and examination, and in some cases, investigations allow differentiation between these diagnoses. A prompt diagnosis is essential as the patient may require urgent surgical intervention
Testicular torsion refers to twisting of the spermatic cord, causing ischaemia of the testicle.
Testicular torsion results from inadequate fixation of the testis to the tunica vaginalis producing ischemia from reduced arterial inflow and venous outflow obstruction.
The prevalence of testicular torsion in adult patients hospitalized with acute scrotal pain is approximately 25 to 50 percent
Report Back from SGO 2024: What’s the Latest in Cervical Cancer?bkling
Are you curious about what’s new in cervical cancer research or unsure what the findings mean? Join Dr. Emily Ko, a gynecologic oncologist at Penn Medicine, to learn about the latest updates from the Society of Gynecologic Oncology (SGO) 2024 Annual Meeting on Women’s Cancer. Dr. Ko will discuss what the research presented at the conference means for you and answer your questions about the new developments.
Explore natural remedies for syphilis treatment in Singapore. Discover alternative therapies, herbal remedies, and lifestyle changes that may complement conventional treatments. Learn about holistic approaches to managing syphilis symptoms and supporting overall health.
New Drug Discovery and Development .....NEHA GUPTA
The "New Drug Discovery and Development" process involves the identification, design, testing, and manufacturing of novel pharmaceutical compounds with the aim of introducing new and improved treatments for various medical conditions. This comprehensive endeavor encompasses various stages, including target identification, preclinical studies, clinical trials, regulatory approval, and post-market surveillance. It involves multidisciplinary collaboration among scientists, researchers, clinicians, regulatory experts, and pharmaceutical companies to bring innovative therapies to market and address unmet medical needs.
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)