Sample size power calculation Sample Size Estimation AZTPIAIDS AIDSAZT AIDSPI AIDSRNA AZTPr (S A ) = π A, PIPr (S B ) = π B AIDS (sampling)(inference) π A, π B π A - π B = 0.20 PI 20 20AZT, PI 10 6 8 HIV-RNA 20 n A = AZT S A = AZTn B = PI S B = PI π A = S A /n A, π B = S B /n B, AIDS =δ = π A - π B 1
H 0 : = 0 H A : 0 δh 0 reject H A accept δ π π π π δ Sample α/2 = 0.025 α/2 = 0.025 You Sample H 0 God Truth H A H 0 A=B (OK) Type II error (β error) H A Type I error A is not B (α error) truth A B A B Type I error(α error) A B Type II error(β error)fda α error β error 2
Truth Sample β -error Power = 1 - β -error power? If difference of means increase, If sample number increased β-error one side 2 AIDS AZT 20PI 30 HIV-RNA α = 0.05 (two sided), β = 0.20 ( power = 80%) α = 0.05 (two sided) δ = (0.3 0.2)/0.3 (1 0.3) + 0.2 (1 0.2) = 0.1644 n =[(Zα + Zβ)/d] 2 = [(1.96 + 0.84)/0.1644] 2 = 290 AZT 290 PI 290 580 3
Power 90two sided test α = 0.05, 35% 4550 60 10 35% 45% (0.45 0.35) / (0.45 x 0.55 + 0.35 x 0.65) = 0.145 [(1.96 + 1.28) / 0.145] = 500 / 50% 60% (0.60 0.50) / (0.60 x 0.50 + 0.50 x 0.50) = 0.143 [(1.96 + 1.28) / 0.143] = 513 / 4
α 5
6
7
success / failure AIDSAZT 24 HIV-RNA µ A PIµ B H 0 : µ A - µ B =0 H A :µ A - µ B 0 AIDS X A, X B µ A - µ B X A - X B X A - X B sample variance (Zα + Zβ) 2 δ 2 δ = µ 1 µ 2 8
SD (Zα + Zβ) 2 δ 2 δ = µ 1 µ 2 24 2 SD 20 10 6 [ 2 x S 2 (Zα + Zβ) 2 / 2 ] = [2 x 20 2 x (1.96 + 0.84) 2 ]/10 2 = 63/arm [ 2 x S 2 (Zα + Zβ) 2 / 2 ] = [2 x 20 2 x (1.96 + 0.84) 2 ]/6 2 = 175/arm 95(confidence interval) 95(confidence interval) 100 4 300 SE 950 1200 350 900 100 4 95 95 950 1000 200 3000 Sample size 95CI (π B π A ) π π π π standard error (SE) phase II trial (1 arm) 95CI 95 10 10 9
100 95 10 one arm ππ When π = 0.8, n = 62 When π = 0.7, n = 81 When π = 0.6, n = 93 When π = 0.5, n = 96 When π = 0.4, n = 93 When π = 0.3, n = 81 When π = 0.2, n = 62 When π = 0.1, n = 35 50 Clinical Equivalence Trials Bio-equivalence under the curve Cmax Clinical Equivalence Trials 10 Clinical Equivalence Trials one side AZT AIDS ddi AIDS D 10 0.1 < D < 0.1 ddi AZT AZT OK (standard) 0.7 (new) 0.5 10
= πs πn 95% CI upper 0.2 95%CI 0.2 OK 95% CI upper 95CI 0.2 (πs πn)+ 1.65[πS (1 - πs)/n + πs (1 - πs)/n] πs = πn=0.7 sample size 1.65[πS (1 - πs)/n + πs (1 - πs)/n] = 0.2 1.65[2 x 0.7(1 0.7)/n]=0.2 n = 29 / arm 0.6 πs πn=0.1 1.65[πS (1 - πs)/n + πs (1 - πs)/n] = 0.1 1.65[2 x 0.7(1 0.7)/n]=0.1 n = 115 / arm sample size 11
(πs πn)+ 1.65[πS (1 - πs)/n + πs (1 - πs)/n]=(0.80 0.75) + 1.65[0.80 (1 0.80)/100 + 0.75 (1 0.75)/100] = 0.147 10% 0.147 p 1 p 2 95CI 10simple mastectomynon-equivalent α β δ δ α β δ 100 200 equivalent 12
Hazard function Prob (T>t) = e λt H 0 : λ 1(t) = λ 2(t) H A : λ 1(t) = constant λ 2(t) 2 *hazard rate λ 1 /λ 2 * = ln(λ 1 /λ 2 )/2 d =[(Zα + Zβ)/*] 2 d: X 1 (λ 1 ) 1 1 1.5 (λ 2 )α = 0.05, power = 80% * = ln(λ 1 /λ 2 )/2 = ln(1.5)/2 = 0.287 d = [(1.96 + 0.84) / 0.287] 2 = 96 96 96 Years of additional follow-up 1 2 3 Years 1 150 117 104 of 2 132 110 103 accrual 3 122 107 102 Accrual follow-up accrual 1 follow-up 2 3 Prob (T>t) = e λt 1 1 13
t = 11 Prob (T>1) = e λ1 = 0.5 ln (0.5) = - 0.69 λ 1 = 0.69 λ 1 /λ 2 = 1.5 = 0.69/λ 2 λ 2 = 0.46 Hazard function λ Accrual years = A, Follow-up years = F F A/2 A/2 + F accrual 2 2 2/2 + 2 = 3 3 3 Prob (T>t) = e λt 3 T failure time Prob (T>3) = e λt = e 0.69 x 3 = 0.126 3 1 - Prob (T<3) = 1-0.126 = 0.873 Prob (T>3) = e λt = e 0.46 x 3 = 0.252 3 1 - Prob (T<3) = 1-0.252 = 0.748 96 sample size event 3 87.3 74.8 96 96 87.3%, 74.8% 14
(sample size) 110 128 238 accrual AIDS 1.5 2 randomized clinical trial AIDS AIDS 300 150 3 (accrual)1 Type I error 5%, type II error 20% Prob (T>t) = e λt H 0 : λ 1(t) = λ 2(t) H A : λ 1(t) = constant λ 2(t) * = ln(λ 1 /λ 2 )/2 = ln(2.0/1.5)/2 = 0.203 d = [(1.96 + 0.84) / 0.203] 2 = 190.24 190 190 Prob (T>t) = e λt 1.5 Prob (T>1.5) = e λ x 1.5 = 0.5 ln (0.5) = - 0.46 λ 1 = 0.46 λ 1 /λ 2 = 2.0/1.5 = 1.33= 0.46/λ 2 λ 2 = 0.35 15
accrual 3 1 3/2 + 1 = 2.5 2.5 2.5 Prob (T>t) = e λt 2.5 T failure time Prob (T>2.5) = e λt = e 0.46 x 2.5 = 0.317 2.5 1 - Prob (T<2.5) = 1-0.317 = 0.683 Prob (T>2.5) = e λt = e 0.35 x 2.5 = 0.417 2.5 1 - Prob (T<2.5) = 1-0.417 = 0.583 96 sample size event 3 68.3 58.3 190 96 68.3%, 58.3% (sample size) 278 326 604 16
STATA sample size randomized placebo controlled clinical trial randomization 4 68 pilot study placebo 498 ± 20.2 sec, 485 ± 19.5 sec 0.7 change method α = 0.05 (two sided), 90% power STATA command. sampsi 498 485, sd1(20.2) sd2(19.5) method(change) pre(1) post(3) r1(.7) Estimated sample size for two samples with repeated measures Assumptions: alpha = 0.0500 (two-sided) power = 0.9000 m1 = 498 m2 = 485 sd1 = 20.2 sd2 = 19.5 n2/n1 = 1.00 number of follow-up measurements = 3 correlation between follow-up measurements = 0.700 number of baseline measurements = 1 correlation between baseline & follow-up = 0.700 Method: CHANGE relative efficiency = 2.500 adjustment to sd = 0.632 adjusted sd1 = 12.776 adjusted sd2 = 12.333 Estimated required sample sizes: n1 = 20 n2 = 20 placebo 20 17
Clinical trials with repeated measures 30 15. sampsi 498 485, sd1(20.2) sd2(19.5) method(change) pre(1) post(3) r1(.7) n1(1 5) n2(15) Estimated power for two samples with repeated measures Assumptions: alpha = 0.0500 (two-sided) m1 = 498 m2 = 485 sd1 = 20.2 sd2 = 19.5 sample size n1 = 15 n2 = 15 n2/n1 = 1.00 number of follow-up measurements = 3 correlation between follow-up measurements = 0.700 number of baseline measurements = 1 correlation between baseline & follow-up = 0.700 Method: CHANGE relative efficiency = 2.500 adjustment to sd = 0.632 adjusted sd1 = 12.776 adjusted sd2 = 12.333 Estimated power: power = 0.809. 80 30 placebo 20. sampsi 498 485, sd1(20.2) sd2(19.5) method(change) pre(1) post(3) r1(.7) n1(20) n2(15) Estimated power for two samples with repeated measures Assumptions: alpha = 0.0500 (two-sided) m1 = 498 m2 = 485 sd1 = 20.2 sd2 = 19.5 sample size n1 = 20 n2 = 15 18
n2/n1 = 0.75 number of follow-up measurements = 3 correlation between follow-up measurements = 0.700 number of baseline measurements = 1 correlation between baseline & follow-up = 0.700 Method: CHANGE relative efficiency = 2.500 adjustment to sd = 0.632 adjusted sd1 = 12.776 adjusted sd2 = 12.333. Estimated power: power = 0.860 86 19
Two-sample test of equality of proportions Yes/no type 10 3 10 3 sample size H 0 reject α = 0.05, power 0.80 sample. sampsi 0.1 0.03, power(0.8) Estimated sample size for two-sample comparison of proportions Test Ho: p1 = p2, where p1 is the proportion in population 1 and p2 is the proportion in population 2 Assumptions: alpha = 0.0500 (two-sided) power = 0.8000 p1 = 0.1000 p2 = 0.0300 n2/n1 = 1.00 Estimated required sample sizes: n1 = 222 n2 = 222 1 222 phase I trial 90. sampsi 0.1 0.03, power(0.9) Estimated sample size for two-sample comparison of proportions Test Ho: p1 = p2, where p1 is the proportion in population 1 and p2 is the proportion in population 2 Assumptions: alpha = 0.0500 (two-sided) power = 0.9000 p1 = 0.1000 p2 = 0.0300 n2/n1 = 1.00 Estimated required sample sizes: n1 = 287 n2 = 287 287 20
300 placebo 150. sampsi 0.1 0.03, n1(300) r(0.5) Estimated power for two-sample comparison of proportions Test Ho: p1 = p2, where p1 is the proportion in population 1 and p2 is the proportion in population 2 Assumptions: alpha = 0.0500 (two-sided) p1 = 0.1000 p2 = 0.0300 sample size n1 = 300 n2 = 150 n2/n1 = 0.50 Estimated power: power = 0.7185. placebo 2:1 80. sampsi 0.1 0.03, power(0.8) r(0.5) Estimated sample size for two-sample comparison of proportions Test Ho: p1 = p2, where p1 is the proportion in population 1 and p2 is the proportion in population 2 Assumptions: alpha = 0.0500 (two-sided) power = 0.8000 p1 = 0.1000 p2 = 0.0300 n2/n1 = 0.50 Estimated required sample sizes: n1 = 349 n2 = 175 21
One sample test of proportion 8 6 50 golden standard 75 a = 0.05, 80. sampsi 0.5 0.75, power(0.8) onesample Estimated sample size for one-sample comparison of proportion to hypothesized value Test Ho: p = 0.5000, where p is the proportion in the population Assumptions: alpha = 0.0500 (two-sided) power = 0.8000 alternative p = 0.7500 Estimated required sample size: n = 29 29 historical comparison randomized clinical trial. sampsi 0.5 0.75, power(0.8) onesample Estimated sample size for one-sample comparison of proportion to hypothesized value Test Ho: p = 0.5000, where p is the proportion in the population Assumptions: alpha = 0.0500 (two-sided) power = 0.8000 alternative p = 0.7500 Estimated required sample size: n = 29 22
Two sample test of equality of means endpoint 105 mmhg SD 10 mmhg 98 SD 10 placebo 2:1 80α = 0.05. sampsi 105 98, p(0.8) r(2) sd1(10) sd2(10) Estimated sample size for two-sample comparison of means Test Ho: m1 = m2, where m1 is the mean in population 1 and m2 is the mean in population 2 Assumptions: alpha = 0.0500 (two-sided) power = 0.8000 m1 = 105 m2 = 98 sd1 = 10 sd2 = 10 n2/n1 = 2.00 Estimated required sample sizes: n1 = 25 n2 = 50 23