Title: | R Functions for Chapter 3,4,6,7,9,10,11,12,14,15 of Sample Size Calculation in Clinical Research |
---|---|
Description: | Functions and Examples in Sample Size Calculation in Clinical Research. |
Authors: | Ed Zhang ; Vicky Qian Wu ; Shein-Chung Chow ; Harry G.Zhang (Quality check) <[email protected]> |
Maintainer: | Vicky Qian Wu <[email protected]> |
License: | GPL (>= 2.15.1) |
Version: | 1.4.1 |
Built: | 2025-03-06 03:31:55 UTC |
Source: | https://github.com/cran/TrialSize |
More than 80 functions in this package are widely used to calculate sample size in clinical trial research studies.
This package covers the functions in Chapter 3,4,6,7,9,10,11,12,14,15 of the reference book.
Package: | TrialSize |
Type: | Package |
Version: | 1.3 |
Date: | 2013-05-31 |
License: | GPL ( >=2 |
LazyLoad: | yes |
author: Ed Zhang <[email protected]>
Vicky Qian Wu <[email protected]>
Harry G. Zhang (Quality check)
Shein-Chung Chow
maintainer: Vicky Qian Wu <[email protected]>
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2008
The general A+B designs with dose de-escalation. There are A patients at dose level i.
(1) If less than C/A patients have dose limiting toxicity (DLTs), then the dose is escalated to the next dose level i+1.
(2)If more than D/A (D C) patients have DLTs, then it will come back to dose i-1.If more than A patients have already been treated at dose level i-1, it will stop here and dose i-1 is the MTD. If there are only A patients treated at dose i-1, then Bmore patients are treated at this dose level i-1. This is dose de-escalation. The de-escalation may continue to the next dose level i-2 and so on if necessary.
(3)If no less than C/A but no more than D/A patients have DLTs, B more patients are treated at this dose level i.
(4)If no more than E (where E D) of the total A+B patients have DLT, then the dose is escalated.
(5)If more than E of the total of A+B patients have DLT, and the similar procedure in (2) will be applied.
AB.withDescalation(A, B, C, D, E, DLT)
AB.withDescalation(A, B, C, D, E, DLT)
A |
number of patients for the start A |
B |
number of patients for the continuous B |
C |
number of patients for the first cut off C |
D |
number of patients for the second cut off D, D |
E |
number of patients for the third cut off D, E |
DLT |
dose limiting toxicity rate for each dose level. |
For this design, the MTD is the dose level at which no more than E/(A+B) patients experience DLTs, and more than D/A or (no less than C/A and no more than D/A) if more than E/(A+B) patients treated with the next higher dose have DLTs.
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
DLT=c(0.01,0.014,0.025,0.056,0.177,0.594,0.963) Example.11.6.2<-AB.withDescalation(A=3,B=3,C=1,D=1,E=1,DLT=DLT) Example.11.6.2 # Example.11.6.2[7]=0.2
DLT=c(0.01,0.014,0.025,0.056,0.177,0.594,0.963) Example.11.6.2<-AB.withDescalation(A=3,B=3,C=1,D=1,E=1,DLT=DLT) Example.11.6.2 # Example.11.6.2[7]=0.2
The general A+B designs without dose de-escalation. There are A patients at dose level i.
(1) If less than C/A patients have dose limiting toxicity (DLTs), then the dose is escalated to the next dose level i+1.
(2)If more than D/A (D C) patients have DLTs, then the previous dose i-1 will be considered the maximum tolerable dose (MTD).
(3)If no less than C/A but no more than D/A patients have DLTs, B more patients are treated at this dose level i.
(4)If no more than E (where E D) of the total A+B patients have DLT, then the dose is escalated.
(5)If more than E of the total of A+B patients have DLT, then the previous dose i-1 will be considered the MTD.
AB.withoutDescalation(A, B, C, D, E, DLT)
AB.withoutDescalation(A, B, C, D, E, DLT)
A |
number of patients for the start A |
B |
number of patients for the continuous B |
C |
number of patients for the first cut off C |
D |
number of patients for the second cut off D, D |
E |
number of patients for the third cut off D, E |
DLT |
dose limiting toxicity rate for each dose level. |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
DLT=c(0.01,0.014,0.025,0.056,0.177,0.594,0.963) Example.11.6.1<-AB.withoutDescalation(A=3,B=3,C=1,D=1,E=1,DLT=DLT) Example.11.6.1 # Example.11.6.1[1]=3.1
DLT=c(0.01,0.014,0.025,0.056,0.177,0.594,0.963) Example.11.6.1<-AB.withoutDescalation(A=3,B=3,C=1,D=1,E=1,DLT=DLT) Example.11.6.1 # Example.11.6.1[1]=3.1
The most commonly used design for ABE is a standard two-sequence and two-period crossover design. Ft is the fixed effect of the test formulation and Fr is the fixed effect of the reference formulation.
Ho: Ft-Fr or Ft-Fr
Ha: < Ft-Fr <
ABE(alpha, beta, sigma1.1, delta, epsilon)
ABE(alpha, beta, sigma1.1, delta, epsilon)
alpha |
significance level |
beta |
power = 1- beta |
sigma1.1 |
|
delta |
delta is the bioequivalence limit. here delta=0.223 |
epsilon |
epsilon=Ft-Fr |
.
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.10.2<-ABE(0.05,0.2,0.4,0.223,0.05) Example.10.2 # 21
Example.10.2<-ABE(0.05,0.2,0.4,0.223,0.05) Example.10.2 # 21
The study has multiple assessments in a parallel-group clinical trial. is the fixed effect for the ith treatment
.
Ho:
Ha: not equal
ANOVA.Repeat.Measure(alpha, beta, sigma, delta, m)
ANOVA.Repeat.Measure(alpha, beta, sigma, delta, m)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
sigma^2 is the sum of the variance components. |
delta |
a clinically meaningful difference |
m |
Bonferroni adjustment for alpha, totally m pairs comparison. |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.3.4<-ANOVA.Repeat.Measure(0.05,0.2,1.25,1.5,3) Example.15.3.4 # 15
Example.15.3.4<-ANOVA.Repeat.Measure(0.05,0.2,1.25,1.5,3) Example.15.3.4 # 15
2 by 2 crossover design. Test the treatment-by-period interaction (carry-over effect)
H0: the difference of the two sequence carry-over effects is equal to 0
Ha: not equal to 0
The test is finding whether there is a difference between the carry-over effect for sequence AB and BA.
Carry.Over(alpha, beta, sigma1, sigma2, gamma)
Carry.Over(alpha, beta, sigma1, sigma2, gamma)
alpha |
significance level |
beta |
power = 1-beta |
sigma1 |
standard deviation of sequence AB |
sigma2 |
standard deviation of sequence BA |
gamma |
the difference of carry-over effect between sequence AB and BA |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.6.5.2<-Carry.Over(0.025,0.2,2.3,2.4,0.89) Example.6.5.2 # 110
Example.6.5.2<-Carry.Over(0.025,0.2,2.3,2.4,0.89) Example.6.5.2 # 110
H0: p0=p1=p2=...=pK
Ha: p0 <= p1 <= p2 <=...<= pK with p0 < pK
Cochran.Armitage.Trend(alpha, beta, pi, di, ni, delta)
Cochran.Armitage.Trend(alpha, beta, pi, di, ni, delta)
alpha |
significance level |
beta |
power = 1-beta |
pi |
pi is the response rate in ith group. |
di |
di is the dose level |
ni |
ni is the sample size for group i |
delta |
delta is the clinically meaningful minimal difference |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
pi=c(0.1,0.3,0.5,0.7); di=c(1,2,3,4); ni=c(10,10,10,10); Example.11.5<-Cochran.Armitage.Trend(alpha=0.05,beta=0.2,pi=pi,di=di,ni=ni,delta=1) Example.11.5 # 7.5 for one group. Total 28-32.
pi=c(0.1,0.3,0.5,0.7); di=c(1,2,3,4); ni=c(10,10,10,10); Example.11.5<-Cochran.Armitage.Trend(alpha=0.05,beta=0.2,pi=pi,di=di,ni=ni,delta=1) Example.11.5 # 7.5 for one group. Total 28-32.
b is the log hazard ratio for treatment, b0 is the log hazard ratio for the controls
H0: b=b0
Ha: not equal to b0
The test is finding whether there is a difference between the hazard rates of the treatment and control.
Cox.Equality(alpha, beta, loghr, p1,d)
Cox.Equality(alpha, beta, loghr, p1,d)
alpha |
significance level |
beta |
power = 1-beta |
loghr |
log hazard ratio=log(lamda2/lamda1)=b |
p1 |
the proportion of patients in treatment 1 group |
d |
the probability of observing an event |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.7.3.4<-Cox.Equality(0.05,0.2,log(2),0.5,0.8) Example.7.3.4
Example.7.3.4<-Cox.Equality(0.05,0.2,log(2),0.5,0.8) Example.7.3.4
b is the log hazard ratio for treatment, delta is the margin
Ho: |b|
Ha: |b| <
Cox.Equivalence(alpha, beta, loghr, p1, d, delta)
Cox.Equivalence(alpha, beta, loghr, p1, d, delta)
alpha |
significance level |
beta |
power = 1-beta |
loghr |
log hazard ratio=log(lamda2/lamda1)=b |
p1 |
the proportion of patients in treatment 1 group |
d |
the probability of observing an event |
delta |
delta is the true difference of log hazard rates between control group lamda1 and a test drug group lamda2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.7.3.4<-Cox.Equivalence(0.05,0.2,log(2),0.5,0.8,0.5) Example.7.3.4
Example.7.3.4<-Cox.Equivalence(0.05,0.2,log(2),0.5,0.8,0.5) Example.7.3.4
b is the log hazard ratio for treatment, is the margin
H0: b
Ha: b >
Cox.NIS(alpha, beta, loghr, p1, d, delta)
Cox.NIS(alpha, beta, loghr, p1, d, delta)
alpha |
significance level |
beta |
power = 1-beta |
loghr |
log hazard ratio=log(lamda2/lamda1)=b |
p1 |
the proportion of patients in treatment 1 group |
d |
the probability of observing an event |
delta |
margin is the true difference of log hazard rates between control group lamda1 and a test drug group lamda2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.7.3.4<-Cox.NIS(0.05,0.2,log(2),0.5,0.8,0.5) Example.7.3.4
Example.7.3.4<-Cox.NIS(0.05,0.2,log(2),0.5,0.8,0.5) Example.7.3.4
H0: within-subject variance of treatment T is equal to within-subject variance of treatment R
Ha: not equal
The test is finding whether two drug products have the same intra-subject variability in crossover design
CrossOver.ISV.Equality(alpha, beta, sigma1, sigma2, m)
CrossOver.ISV.Equality(alpha, beta, sigma1, sigma2, m)
alpha |
significance level |
beta |
power = 1-beta |
sigma1 |
within-subject variance of treatment 1 |
sigma2 |
within-subject variance of treatment 2 |
m |
for each subject, there are m replicates. |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
the ratio = within-subject variance of treatment T / within-subject variance of treatment R
H0: the ratio or the ratio
Ha: < the ratio <
CrossOver.ISV.Equivalence(alpha, beta, sigma1, sigma2, m, margin)
CrossOver.ISV.Equivalence(alpha, beta, sigma1, sigma2, m, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma1 |
within-subject variance of treatment 1 |
sigma2 |
within-subject variance of treatment 2 |
m |
for each subject, there are m replicates. |
margin |
margin= |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
H0: the ratio that within-subject variance of treatment T / within-subject variance of treatment R
Ha: the ratio <
if < 1, the rejection of Null Hypothesis indicates the superiority of the test drug over the reference for the intra-subject variability;
if > 1, the rejection of the null hypothesis implies the non-inferiority of the test drug against the reference for the intra-subject variability; .
CrossOver.ISV.NIS(alpha, beta, sigma1, sigma2, m, margin)
CrossOver.ISV.NIS(alpha, beta, sigma1, sigma2, m, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma1 |
within-subject variance of treatment 1 |
sigma2 |
within-subject variance of treatment 2 |
m |
for each subject, there are m replicates. |
margin |
margin= |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.9.1.1<-CrossOver.ISV.NIS(0.05,0.2,0.3^2,0.45^2,2,1.1) Example.9.1.1
Example.9.1.1<-CrossOver.ISV.NIS(0.05,0.2,0.3^2,0.45^2,2,1.1) Example.9.1.1
Ho:
Ha:
Dose.Min.Effect(alpha, beta, qt, sigma, delta)
Dose.Min.Effect(alpha, beta, qt, sigma, delta)
alpha |
significance level |
beta |
power = 1-beta |
qt |
the critical value tk(alpha) |
sigma |
standard deviation |
delta |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.11.4.1<-Dose.Min.Effect(0.05,0.2,1.75,0.22,0.11) Example.11.4.1 #54
Example.11.4.1<-Dose.Min.Effect(0.05,0.2,1.75,0.22,0.11) Example.11.4.1 #54
pi is the proportion of response in the ith group.
Ho: p1=p2=...=pk
Ha: L(p)= , not equal to 0
Dose.Response.binary(alpha, beta, pi, ci, fi)
Dose.Response.binary(alpha, beta, pi, ci, fi)
alpha |
significance level |
beta |
power = 1-beta |
pi |
pi is the proportion of response in the ith group. |
ci |
a linear contrast coefficients ci with |
fi |
fi=ni/n is the sample size fraction for the ith group |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
pi=c(0.05,0.12,0.14,0.16); ci=c(-6,1,2,3); Example.11.2<-Dose.Response.binary(alpha=0.05,beta=0.2,pi=pi,ci=ci,fi=1/4) Example.11.2 #382
pi=c(0.05,0.12,0.14,0.16); ci=c(-6,1,2,3); Example.11.2<-Dose.Response.binary(alpha=0.05,beta=0.2,pi=pi,ci=ci,fi=1/4) Example.11.2 #382
For a multi-arm dose response design, we use a linear contrast coefficients ci with .
H0: L(mu)=
Ha: L(mu)=, not equal to 0
Dose.Response.Linear(alpha, beta, sigma, mui, ci, fi)
Dose.Response.Linear(alpha, beta, sigma, mui, ci, fi)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation for the population |
mui |
mui is the population mean for group i. |
ci |
a linear contrast coefficients ci with |
fi |
fi=ni/n is the sample size fraction for the ith group |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
mui=c(0.05,0.12,0.14,0.16); ci=c(-6,1,2,3); Example.11.1<-Dose.Response.Linear(alpha=0.05,beta=0.2,sigma=0.22,mui=mui,ci=ci,fi=1/4) Example.11.1 #178
mui=c(0.05,0.12,0.14,0.16); ci=c(-6,1,2,3); Example.11.1<-Dose.Response.Linear(alpha=0.05,beta=0.2,sigma=0.22,mui=mui,ci=ci,fi=1/4) Example.11.1 #178
Under the exponential survival model, let lambdai be the proportion hazard rate for group i.
.
Ho:
Ha:
Dose.Response.time.to.event(alpha, beta, T0, T, Ti, ci, fi)
Dose.Response.time.to.event(alpha, beta, T0, T, Ti, ci, fi)
alpha |
significance level |
beta |
power = 1-beta |
T0 |
T0 is the accrual time period |
T |
T is the total trial duration |
Ti |
|
ci |
a linear contrast coefficients ci with sum(ci)=0. |
fi |
fi=ni/n is the sample size fraction for the ith group |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ti=c(14,20,22,24); ci=c(-6,1,2,3); Example.11.3.1<-Dose.Response.time.to.event(alpha=0.05,beta=0.2,T0=9,T=16,Ti=Ti,ci=ci,fi=1/4) Example.11.3.1 #412 fi1=c(1/9,2/9,2/9,2/9); Example.11.3.2<-Dose.Response.time.to.event(alpha=0.05,beta=0.2,T0=9,T=16,Ti=Ti,ci=ci,fi=fi1) Example.11.3.2 #814 fi2=c(1/2.919,0.711/2.919,0.634/2.919,0.574/2.919); Example.11.3.3<-Dose.Response.time.to.event(alpha=0.05,beta=0.2,T0=9,T=16,Ti=Ti,ci=ci,fi=fi2) Example.11.3.3 #349
Ti=c(14,20,22,24); ci=c(-6,1,2,3); Example.11.3.1<-Dose.Response.time.to.event(alpha=0.05,beta=0.2,T0=9,T=16,Ti=Ti,ci=ci,fi=1/4) Example.11.3.1 #412 fi1=c(1/9,2/9,2/9,2/9); Example.11.3.2<-Dose.Response.time.to.event(alpha=0.05,beta=0.2,T0=9,T=16,Ti=Ti,ci=ci,fi=fi1) Example.11.3.2 #814 fi2=c(1/2.919,0.711/2.919,0.634/2.919,0.574/2.919); Example.11.3.3<-Dose.Response.time.to.event(alpha=0.05,beta=0.2,T0=9,T=16,Ti=Ti,ci=ci,fi=fi2) Example.11.3.3 #349
Test the goodness of fit and the primary study endpoint is non-binary categorical response. pk=nk/n, nk is the frequency count of the subjects with response value k. pk,0 is a reference value.
H0: pk=pk,0 for all k
Ha: not equal
gof.Pearson(alpha, beta, pk, pk0, r)
gof.Pearson(alpha, beta, pk, pk0, r)
alpha |
significance level |
beta |
power = 1-beta |
pk |
pk is the proportion of each subject in treatment group. |
pk0 |
pk0 is a reference value. |
r |
degree of freedom=r-1 |
(*) is
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
H0: pk=pk,0 for all k
Ha: not equal
gof.Pearson.twoway(alpha, beta, trt, ctl, r, c)
gof.Pearson.twoway(alpha, beta, trt, ctl, r, c)
alpha |
significance level |
beta |
power = 1-beta |
trt |
proportion of each subject in treatment group |
ctl |
proportion of each subject in control group |
r |
number of rows in the two-way table |
c |
number of column in the two-way table |
(*) is
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Consider 2 by 2 crossover design.
Ho:
Ha:
IBE(alpha, beta, delta, sigmaD, sigmaWT, sigmaWR, a, b, thetaIBE)
IBE(alpha, beta, delta, sigmaD, sigmaWT, sigmaWR, a, b, thetaIBE)
alpha |
significance level |
beta |
power = 1-beta |
delta |
delta is the mean difference |
sigmaD |
sigmaD^2=sigmaBT^2+sigmaBR^2-2*rho*sigmaBT*sigmaBR, sigmaBT^2 is the between-subjects variance in test formulation, sigmaBR^2 is the between-subjects variance in reference formulation |
sigmaWT |
sigmaWT^2 is the within-subjects variance in test formulation |
sigmaWR |
sigmaWR^2 is the within-subjects variance in reference formulation |
a |
Sigma(a,b)=sigmaD^2+a*sigmaWT^2+b*sigmaWR^2 a=0.5 here |
b |
b=0.5 here |
thetaIBE |
thetaIBE=2.5 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.10.4<-IBE(0.05, 0.2, 0, 0.2,0.3,0.3,0.5,0.5,2.5) Example.10.4 # n=22 IBE reach 0
Example.10.4<-IBE(0.05, 0.2, 0, 0.2,0.3,0.3,0.5,0.5,2.5) Example.10.4 # n=22 IBE reach 0
H0: between-subject variance of treatment T is equal to between-subject variance of treatment R
Ha: not equal
The test is finding whether two drug products have the same inter-subject variability.
InterSV.Equality(alpha, beta, vbt, vwt, vbr, vwr, m)
InterSV.Equality(alpha, beta, vbt, vwt, vbr, vwr, m)
alpha |
significance level |
beta |
power = 1-beta |
vbt |
between-subject variance of treatment T |
vwt |
within-subject variance of treatment T |
vbr |
between-subject variance of treatment R |
vwr |
within-subject variance of treatment R |
m |
for each subject, there are m replicates. |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
H0: between-subject variance of treatment T is equal to between-subject variance of treatment R
Ha: not equal
The test is finding whether two drug products have the same inter-subject variability.
InterSV.NIS(alpha, beta, vbt, vwt, vbr, vwr, m,margin)
InterSV.NIS(alpha, beta, vbt, vwt, vbr, vwr, m,margin)
alpha |
significance level |
beta |
power = 1-beta |
vbt |
between-subject variance of treatment T |
vwt |
within-subject variance of treatment T |
vbr |
between-subject variance of treatment R |
vwr |
within-subject variance of treatment R |
m |
for each subject, there are m replicates. |
margin |
margin=delta, the true ratio of sigma1/sigma2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
H0: CVr = CVt
Ha: not equal
The test is finding whether two drug products have the same intra-subject CVs
ISCV.Equality(alpha, beta, CVt, CVr, m)
ISCV.Equality(alpha, beta, CVt, CVr, m)
alpha |
significance level |
beta |
power = 1-beta |
CVt |
Coefficient Of Variation for treatment T |
CVr |
Coefficient Of Variation for treatment R |
m |
for each subject, there are m replicates. |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
H0: |CVr - CVt|
Ha: |CVr - CVt| <
ISCV.Equivalence(alpha, beta, CVt, CVr, m, margin)
ISCV.Equivalence(alpha, beta, CVt, CVr, m, margin)
alpha |
significance level |
beta |
power = 1-beta |
CVt |
Coefficient Of Variation for treatment T |
CVr |
Coefficient Of Variation for treatment R |
m |
for each subject, there are m replicates. |
margin |
margin=delta, |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
H0: CVr - CVt <
Ha: CVr - CVt
if > 0, the rejection of Null Hypothesis indicates the superiority of the test drug over the reference;
if < 0, the rejection of the null hypothesis implies the non-inferiority of the test drug against the reference.
ISCV.NIS(alpha, beta, CVt, CVr, m, margin)
ISCV.NIS(alpha, beta, CVt, CVr, m, margin)
alpha |
significance level |
beta |
power = 1-beta |
CVt |
Coefficient Of Variation for treatment T |
CVr |
Coefficient Of Variation for treatment R |
m |
for each subject, there are m replicates. |
margin |
margin=delta, |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.9.2.1<-ISCV.NIS(0.05,0.2,0.7,0.5,2,0.1) Example.9.2.1
Example.9.2.1<-ISCV.NIS(0.05,0.2,0.7,0.5,2,0.1) Example.9.2.1
H0: within-subject variance of treatment T is equal to within-subject variance of treatment R
Ha: not equal
The test is finding whether two drug products have the same intra-subject variability.
ISV.Equality(alpha, beta, sigma1, sigma2, m)
ISV.Equality(alpha, beta, sigma1, sigma2, m)
alpha |
significance level |
beta |
power = 1-beta |
sigma1 |
within-subject variance of treatment 1 |
sigma2 |
within-subject variance of treatment 2 |
m |
for each subject, there are m replicates. |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
the ratio = within-subject variance of treatment T / within-subject variance of treatment R
Ho: the ratio or the ratio
Ha: < the ratio <
ISV.Equivalence(alpha, beta, sigma1, sigma2, m, margin)
ISV.Equivalence(alpha, beta, sigma1, sigma2, m, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma1 |
within-subject variance of treatment 1 |
sigma2 |
within-subject variance of treatment 2 |
m |
for each subject, there are m replicates. |
margin |
margin=delta, the true ratio of sigma1/sigma2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
the ratio = within-subject variance of treatment T / within-subject variance of treatment R
H0: the ratio
Ha: the ratio <
if < 1, the rejection of Null Hypothesis indicates the superiority of the test drug over the reference for the intra-subject variability;
if > 1, the rejection of the null hypothesis implies the non-inferiority of the test drug against the reference for the intra-subject variability; .
ISV.NIS(alpha, beta, sigma1, sigma2, m, margin)
ISV.NIS(alpha, beta, sigma1, sigma2, m, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma1 |
within-subject variance of treatment 1 |
sigma2 |
within-subject variance of treatment 2 |
m |
for each subject, there are m replicates. |
margin |
margin=delta, the true ratio of sigma1/sigma2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.9.1.1<-ISV.NIS(0.05,0.2,0.3^2,0.45^2,3,1.1) Example.9.1.1
Example.9.1.1<-ISV.NIS(0.05,0.2,0.3^2,0.45^2,3,1.1) Example.9.1.1
2 by 2 table. Test either a shift from 0 to 1 or a shift from 1 to 0 before treatment and after treatment.
Ho:
Ha: not equal
The test is finding whether there is a categorical shift after treatment.
McNemar.Test(alpha, beta, psai, paid)
McNemar.Test(alpha, beta, psai, paid)
alpha |
significance level |
beta |
power = 1-beta |
psai |
the ratio of p01/p10 |
paid |
the sum p10+p01 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.6.4.3<-McNemar.Test(0.05,0.2,0.2/0.5,.7) Example.6.4.3 # 59
Example.6.4.3<-McNemar.Test(0.05,0.2,0.2/0.5,.7) Example.6.4.3 # 59
Compare more than two treatment under a crossover design.
H0: margin is equal to 0 Ha: margin is not equal to 0
The test is finding whether there is a difference between treatment i and treatment j
MeanWilliamsDesign.Equality(alpha, beta, sigma, k, margin)
MeanWilliamsDesign.Equality(alpha, beta, sigma, k, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation |
k |
Total k treatments in the design |
margin |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.3.5.4<-MeanWilliamsDesign.Equality(0.025,0.2,0.1,6,0.05) Example.3.5.4 # 6 Example.3.5.4<-MeanWilliamsDesign.Equality(0.025,0.2,0.1,6,-0.05) Example.3.5.4 # 6 Example.3.5.4<-MeanWilliamsDesign.Equality(0.025,0.2,0.1,6,-0.1) Example.3.5.4 # 2
Example.3.5.4<-MeanWilliamsDesign.Equality(0.025,0.2,0.1,6,0.05) Example.3.5.4 # 6 Example.3.5.4<-MeanWilliamsDesign.Equality(0.025,0.2,0.1,6,-0.05) Example.3.5.4 # 6 Example.3.5.4<-MeanWilliamsDesign.Equality(0.025,0.2,0.1,6,-0.1) Example.3.5.4 # 2
Compare more than two treatment under a crossover design.
H0: |margin|
Ha: |margin| <
This test is whether the test drug is equivalent to the control in average if the null hypothesis is rejected at significant level alpha
MeanWilliamsDesign.Equivalence(alpha, beta, sigma, k, delta, margin)
MeanWilliamsDesign.Equivalence(alpha, beta, sigma, k, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation |
k |
Total k treatments in the design |
delta |
the superiority or non-inferiority margin |
margin |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Compare more than two treatment under a crossover design.
H0: margin
Ha: margin >
if >0, the rejection of Null Hypothesis indicates the superiority of the test over the control;
if <0, the rejection of the null hypothesis implies the non-inferiority of the test against the control.
MeanWilliamsDesign.NIS(alpha, beta, sigma, k, delta, margin)
MeanWilliamsDesign.NIS(alpha, beta, sigma, k, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation |
k |
Total k treatments in the design |
delta |
the superiority or non-inferiority margin |
margin |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ho:
Ha:
Multiple.Testing(s1, s2, m, p, D, delta, BCS, pho, K, alpha, beta)
Multiple.Testing(s1, s2, m, p, D, delta, BCS, pho, K, alpha, beta)
s1 |
We use bisection method to find the sample size, which let the equation h(n)=0. Here s1 and s2 are the initial value, 0 < s1 < s2. h(s1) should be smaller than 0. |
s2 |
s2 is also the initial value, which is larger than s1 and h(s2) should be larger than 0. |
m |
m is the total number of multiple tests |
p |
p=n1/n. n1 is the sample size for group 1, n2 is the sample size for group 2, n=n1+n2. |
D |
D is the number of predictive genes. |
delta |
|
BCS |
BCS means block compound symmetry, which is the length of each blocks. If we only have one block, BCS=m, which is refer to compound symmetry(CS). |
pho |
pho is the correlation parameter. If j and j' in the same block, |
K |
K is the number of replicates for the simulation. |
alpha |
here alpha is the adjusted Familywise error rate (FWER) |
beta |
here power is a global power. power=1-beta |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ho: for all a and b.
Ha: not equal
Nonpara.Independ(alpha, beta, p1, p2)
Nonpara.Independ(alpha, beta, p1, p2)
alpha |
significance level |
beta |
power = 1-beta |
p1 |
|
p2 |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.14.4<-Nonpara.Independ(0.05,0.2,0.6,0.7) Example.14.4 # 135
Example.14.4<-Nonpara.Independ(0.05,0.2,0.6,0.7) Example.14.4 # 135
Ho: theta=0
Ha: theta is not equal to 0.
Nonpara.One.Sample(alpha, beta, p2, p3, p4)
Nonpara.One.Sample(alpha, beta, p2, p3, p4)
alpha |
significance level |
beta |
power = 1-beta |
p2 |
|
p3 |
|
p4 |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.14.2<-Nonpara.One.Sample(0.05,0.2,0.3,0.4,0.05) Example.14.2 # 383
Example.14.2<-Nonpara.One.Sample(0.05,0.2,0.3,0.4,0.05) Example.14.2 # 383
Ho: theta=0;
Ha: theta is not equal to 0.
Nonpara.Two.Sample(alpha, beta, k, p1, p2, p3)
Nonpara.Two.Sample(alpha, beta, k, p1, p2, p3)
alpha |
significance level |
beta |
power = 1-beta |
k |
k=n1/n2 |
p1 |
|
p2 |
|
p3 |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.14.3<-Nonpara.Two.Sample(0.05,0.2,1,0.7,0.8,0.8) Example.14.3 #54
Example.14.3<-Nonpara.Two.Sample(0.05,0.2,1,0.7,0.8,0.8) Example.14.3 #54
H0: margin is equal to 0 Ha: margin is not equal to 0
The test is finding whether there is a difference between the mean response of the test and the reference value
OneSampleMean.Equality(alpha, beta, sigma, margin)
OneSampleMean.Equality(alpha, beta, sigma, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation |
margin |
the difference between the true mean response of a test |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
OneSampleMean.Equality(0.05,0.2,1,0.5) # 32
OneSampleMean.Equality(0.05,0.2,1,0.5) # 32
Ho:
Ha: |margin| < delta
The test is concluded to be equivalent to a gold standard on average if the null hypothesis is rejected at significance level alpha
OneSampleMean.Equivalence(alpha, beta, sigma,margin, delta)
OneSampleMean.Equivalence(alpha, beta, sigma,margin, delta)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation |
margin |
the difference between the true mean response of a test |
delta |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
OneSampleMean.Equivalence(0.05,0.2,0.1,0.05,0) # 35
OneSampleMean.Equivalence(0.05,0.2,0.1,0.05,0) # 35
Ho:
Ha: margin > delta
if delta >0, the rejection of Null Hypothesis indicates the true mean is superior over the reference value mu0;
if delta <0, the rejection of the null hypothesis implies the true mean is non-inferior against the reference value mu0.
OneSampleMean.NIS(alpha, beta, sigma, margin, delta)
OneSampleMean.NIS(alpha, beta, sigma, margin, delta)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation |
delta |
the superiority or non-inferiority margin |
margin |
the difference between the true mean response of a test |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
OneSampleMean.NIS(0.05,0.2,1,0.5,-0.5) # 7
OneSampleMean.NIS(0.05,0.2,1,0.5,-0.5) # 7
Ho: p=p0
Ha: not equal
The test is finding whether there is a difference between the true rate of the test drug and reference value p0
OneSampleProportion.Equality(alpha, beta, p, differ)
OneSampleProportion.Equality(alpha, beta, p, differ)
alpha |
significance level |
beta |
power = 1-beta |
p |
the true response rate |
differ |
differ=p-p0 the difference between the true response rate of a test drug and a reference value p0 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.1.4<-OneSampleProportion.Equality(0.05,0.2,0.5,0.2) Example.4.1.4
Example.4.1.4<-OneSampleProportion.Equality(0.05,0.2,0.5,0.2) Example.4.1.4
Ho:
Ha: |p-p0| < margin
The proportion of response is equivalent to the reference p0 is the null hypothesis is rejected
OneSampleProportion.Equivalence(alpha, beta, p, delta, differ)
OneSampleProportion.Equivalence(alpha, beta, p, delta, differ)
alpha |
significance level |
beta |
power = 1-beta |
p |
the true response rate |
delta |
delta=p-p0 the difference between the true response rate of a test drug and a reference value p0 |
differ |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.1.4<-OneSampleProportion.Equivalence(0.05,0.2,0.6,0.05,.2) Example.4.1.4
Example.4.1.4<-OneSampleProportion.Equivalence(0.05,0.2,0.6,0.05,.2) Example.4.1.4
Ho:
Ha: p-p0 > margin
if margin >0, the rejection of Null Hypothesis indicates the true rate is superior over the reference value p0;
if margin <0, the rejection of the null hypothesis implies the true rate is non-inferior against the reference value p0.
OneSampleProportion.NIS(alpha, beta, p, delta, differ)
OneSampleProportion.NIS(alpha, beta, p, delta, differ)
alpha |
significance level |
beta |
power = 1-beta |
p |
the true response rate |
delta |
delta=p-p0 the difference between the true response rate of a test drug and a reference value p0 |
differ |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.1.4<-OneSampleProportion.NIS(0.025,0.2,0.5,0.2,-0.1) Example.4.1.4
Example.4.1.4<-OneSampleProportion.NIS(0.025,0.2,0.5,0.2,-0.1) Example.4.1.4
One-sided tests
Ho:
Ha:
OneSide.fixEffect(m, m1, delta, a1, r1, fdr)
OneSide.fixEffect(m, m1, delta, a1, r1, fdr)
m |
m is the total number of multiple tests |
m1 |
m1 = m - m0. m0 is the number of tests which the null hypotheses are true ; m1 is the number of tests which the alternative hypotheses are true. (or m1 is the number of prognostic genes) |
delta |
|
a1 |
a1 is the allocation proportion for group 1. a2=1-a1. |
r1 |
r1 is the number of true rejection |
fdr |
fdr is the FDR level. |
alpha_star=r1*fdr/((m-m1)*(1-fdr)), which is the marginal type I error level for r1 true rejection with the FDR controlled at f.
beta_star=1-r1/m1, which is equal to 1-power.
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.12.2.1<-OneSide.fixEffect(m=4000,m1=40,delta=1,a1=0.5,r1=24,fdr=0.01) Example.12.2.1 # n=68; n1=34=n2
Example.12.2.1<-OneSide.fixEffect(m=4000,m1=40,delta=1,a1=0.5,r1=24,fdr=0.01) Example.12.2.1 # n=68; n1=34=n2
One-sided tests
Ho:
Ha:
OneSide.varyEffect(s1, s2, m, m1, delta, a1, r1, fdr)
OneSide.varyEffect(s1, s2, m, m1, delta, a1, r1, fdr)
s1 |
We use bisection method to find the sample size, which let the equation h(n)=0. Here s1 and s2 are the initial value, 0<s1<s2. h(s1) should be smaller than 0. |
s2 |
s2 is also the initial value, which is larger than s1 and h(s2) should be larger than 0. |
m |
m is the total number of multiple tests |
m1 |
m1 = m - m0. m0 is the number of tests which the null hypotheses are true ; m1 is the number of tests which the alternative hypotheses are true. (or m1 is the number of prognostic genes) |
delta |
|
a1 |
a1 is the allocation proportion for group 1. a2=1-a1. |
r1 |
r1 is the number of true rejection |
fdr |
fdr is the FDR level. |
alpha_star=r1*fdr/((m-m1)*(1-fdr)), which is the marginal type I error level for r1 true rejection with the FDR controlled at f.
beta_star=1-r1/m1, which is equal to 1-power.
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
delta=c(rep(1,40/2),rep(1/2,40/2)); Example.12.2.2 <- OneSide.varyEffect(100,150,4000,40,delta,0.5,24,0.01) Example.12.2.2 # n=148 s1<n<s2, h(s1)<0,h(s2)<0
delta=c(rep(1,40/2),rep(1/2,40/2)); Example.12.2.2 <- OneSide.varyEffect(100,150,4000,40,delta,0.5,24,0.01) Example.12.2.2 # n=148 s1<n<s2, h(s1)<0,h(s2)<0
Ho: is equal to
Ha:
is not equal to
The test is comparing the means among treatments. There are tau pair comparisons of interested. Adjusted the multiple comparison by Bonferroni method,
OneWayANOVA.pairwise(alpha, beta, tau, sigma, margin)
OneWayANOVA.pairwise(alpha, beta, tau, sigma, margin)
alpha |
significance level |
beta |
power = 1-beta |
tau |
there are tau pair comparisons |
sigma |
standard deviation |
margin |
the difference between the true mean response of group i |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ho:
Ha: not all equal
OneWayANOVA.PairwiseComparison(alpha, beta, tau, p1, p2, delta)
OneWayANOVA.PairwiseComparison(alpha, beta, tau, p1, p2, delta)
alpha |
significance level |
beta |
power = 1-beta |
tau |
there are tau comparisons here |
p1 |
the mean response rate for test drug |
p2 |
the rate for reference drug |
delta |
delta= |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.4.2<-OneWayANOVA.PairwiseComparison(0.05,0.2,2,0.2,0.4,-0.2) Example.4.4.2 Example.4.4.2<-OneWayANOVA.PairwiseComparison(0.05,0.2,2,0.2,0.5,-0.3) Example.4.4.2
Example.4.4.2<-OneWayANOVA.PairwiseComparison(0.05,0.2,2,0.2,0.4,-0.2) Example.4.4.2 Example.4.4.2<-OneWayANOVA.PairwiseComparison(0.05,0.2,2,0.2,0.5,-0.3) Example.4.4.2
Consider 2 by 2 crossover design.
H0: lamda >= 0
Ha: lamda < 0
PBE(alpha, beta, sigma1.1, sigmatt, sigmatr, sigmabt, sigmabr, rho, a, delta, lamda)
PBE(alpha, beta, sigma1.1, sigmatt, sigmatr, sigmabt, sigmabr, rho, a, delta, lamda)
alpha |
significance level |
beta |
power = 1-beta |
sigma1.1 |
|
sigmatt |
|
sigmatr |
|
sigmabt |
|
sigmabr |
|
rho |
rho is the inter-subject correlation coefficient. |
a |
a= thetaPBE =1.74 |
delta |
delta is the mean difference of AUC |
lamda |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.10.3<-PBE(0.05,0.2,0.2,sqrt(0.17),sqrt(0.17),0.4,0.4,0.75,1.74,0.00,-0.2966) Example.10.3 # 12
Example.10.3<-PBE(0.05,0.2,0.2,sqrt(0.17),sqrt(0.17),0.4,0.4,0.75,1.74,0.00,-0.2966) Example.10.3 # 12
Combining data across J strata. Still use weighted Mantel_Haenszel test.
Ho: ,
Ha: =phi, which is not equal to 1
Propensity.Score.nostrata(alpha, beta, J, a, b, p1, phi)
Propensity.Score.nostrata(alpha, beta, J, a, b, p1, phi)
alpha |
significance level |
beta |
power = 1-beta |
J |
There are totally J stratas. |
a |
a=c(a1,a2,...,aJ), aj=nj/n denote the allocation proportion for stratuum j (sum(aj)=1) |
b |
b=c(b11,b21,...,bJ1), bjk=njk/nj, k=1,2 denote the allocation proportion for group k within stratum j (bj1+bj2=1). Assume group 1 is the control. |
p1 |
p1=c(p11,p21,....,pj1), pjk denote the response probability for group k in stratum j. qjk=1-pjk. |
phi |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
a=c(0.15,0.15,0.2,0.25,0.25); b=c(0.4,0.4,0.5,0.6,0.6); p1=c(0.5,0.6,0.7,0.8,0.9); Example.15.2.3.2<-Propensity.Score.nostrata(alpha=0.05,beta=0.2,J=5,a,b,p1,phi=2) Example.15.2.3.2 # 1151
a=c(0.15,0.15,0.2,0.25,0.25); b=c(0.4,0.4,0.5,0.6,0.6); p1=c(0.5,0.6,0.7,0.8,0.9); Example.15.2.3.2<-Propensity.Score.nostrata(alpha=0.05,beta=0.2,J=5,a,b,p1,phi=2) Example.15.2.3.2 # 1151
Using weighted Mantel_Haenszel test in propensity analysis with stratas.
Ho: ,
Ha: =phi, which is not equal to 1
Propensity.Score.strata(alpha, beta, J, a, b, p1, phi)
Propensity.Score.strata(alpha, beta, J, a, b, p1, phi)
alpha |
significance level |
beta |
power = 1-beta |
J |
There are totally J stratas. |
a |
a=c(a1,a2,...,aJ), aj=nj/n denote the allocation proportion for stratuum j (sum(aj)=1) |
b |
b=c(b11,b21,...,bJ1), bjk=njk/nj, k=1,2 denote the allocation proportion for group k within stratum j (bj1+bj2=1). Assume group 1 is the control. |
p1 |
p1=c(p11,p21,....,pj1), pjk denote the response probability for group k in stratum j. qjk=1-pjk. |
phi |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
a=c(0.15,0.15,0.2,0.25,0.25); b=c(0.4,0.4,0.5,0.6,0.6); p1=c(0.5,0.6,0.7,0.8,0.9); Example.15.2.3.1<-Propensity.Score.strata(alpha=0.05,beta=0.2,J=5,a,b,p1,phi=2) Example.15.2.3.1 # 447
a=c(0.15,0.15,0.2,0.25,0.25); b=c(0.4,0.4,0.5,0.6,0.6); p1=c(0.5,0.6,0.7,0.8,0.9); Example.15.2.3.1<-Propensity.Score.strata(alpha=0.05,beta=0.2,J=5,a,b,p1,phi=2) Example.15.2.3.1 # 447
Under the time series model, determine sample size based on normal approximation.
QOL(alpha, beta, c, epsilon)
QOL(alpha, beta, c, epsilon)
alpha |
significance level |
beta |
power = 1-beta |
c |
constant c=0.5 |
epsilon |
a meaningful difference epsilon. If the chosen acceptable limits are |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.4.3<-QOL(0.05,0.1,0.5,0.25) Example.15.4.3
Example.15.4.3<-QOL(0.05,0.1,0.5,0.25) Example.15.4.3
Ho:
Ha:
The test is finding the treatment difference in QT interval for crossover design . d is not equal to 0, which is the difference of clinically importance.
QT.crossover(alpha, beta, pho, K, delta, gamma)
QT.crossover(alpha, beta, pho, K, delta, gamma)
alpha |
significance level |
beta |
power = 1-beta |
pho |
pho=between subject variance |
K |
There are K recording replicates for each subject. |
delta |
|
gamma |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.1.3<-QT.crossover(0.05,0.2,0.8,3,0.5,0.002) Example.15.1.3 # 29
Example.15.1.3<-QT.crossover(0.05,0.2,0.8,3,0.5,0.002) Example.15.1.3 # 29
Ho:
Ha:
The test is finding the treatment difference in QT interval. d is not equal to 0, which is the difference of clinically importance.
QT.parallel(alpha, beta, pho, K, delta)
QT.parallel(alpha, beta, pho, K, delta)
alpha |
significance level |
beta |
power = 1-beta |
pho |
pho=between subject variance |
K |
There are K recording replicates for each subject. |
delta |
|
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.1.2<-QT.parallel(0.05,0.2,0.8,3,0.5) Example.15.1.2 # 54
Example.15.1.2<-QT.parallel(0.05,0.2,0.8,3,0.5) Example.15.1.2 # 54
Ho:
Ha:
The test is finding the treatment difference in QT interval for crossover design. d is not equal to 0, which is the difference of clinically importance.
QT.PK.crossover(alpha, beta, pho, K, delta, gamma, v1, v2, tau1, tau2)
QT.PK.crossover(alpha, beta, pho, K, delta, gamma, v1, v2, tau1, tau2)
alpha |
significance level |
beta |
power = 1-beta |
pho |
pho=between subject variance |
K |
There are K recording replicates for each subject. |
delta |
|
gamma |
|
v1 |
sample mean for group 1 |
v2 |
sample mean for group 2 |
tau1 |
sample variance for group 1 |
tau2 |
sample variance for group 2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.1.4.2<-QT.PK.crossover(0.05,0.2,0.8,3,0.5,0.002,1,1,4,5) Example.15.1.4.2 # 29
Example.15.1.4.2<-QT.PK.crossover(0.05,0.2,0.8,3,0.5,0.002,1,1,4,5) Example.15.1.4.2 # 29
Ho:
Ha:
The test is finding the treatment difference in QT interval. d is not equal to 0, which is the difference of clinically importance.
QT.PK.parallel(alpha, beta, pho, K, delta, v1, v2, tau1, tau2)
QT.PK.parallel(alpha, beta, pho, K, delta, v1, v2, tau1, tau2)
alpha |
significance level |
beta |
power = 1-beta |
pho |
pho=between subject variance |
K |
There are K recording replicates for each subject. |
delta |
|
v1 |
sample mean for group 1 |
v2 |
sample mean for group 2 |
tau1 |
sample variance for group 1 |
tau2 |
sample variance for group 2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.1.4.1<-QT.PK.parallel(0.05,0.2,0.8,3,0.5,1,1,4,5) Example.15.1.4.1 # 54
Example.15.1.4.1<-QT.PK.parallel(0.05,0.2,0.8,3,0.5,1,1,4,5) Example.15.1.4.1 # 54
Ho: OR=1
Ha: not equal to 1
RelativeRisk.Equality(alpha, beta, or, k, pt, pc)
RelativeRisk.Equality(alpha, beta, or, k, pt, pc)
alpha |
significance level |
beta |
power = 1-beta |
or |
or=pt(1-pc)/pc(1-pt) |
k |
k=nT/nC |
pt |
the probability of observing an outcome of interest for a patient treatment by a test treatment |
pc |
the probability of observing an outcome of interest for a patient treatment by a control |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.6.4<-RelativeRisk.Equality(0.05,0.2,2,1,0.4,0.25) Example.4.6.4
Example.4.6.4<-RelativeRisk.Equality(0.05,0.2,2,1,0.4,0.25) Example.4.6.4
Ho:
Ha: |log(OR)| < margin
RelativeRisk.Equivalence(alpha, beta, or, k, pt, pc, margin)
RelativeRisk.Equivalence(alpha, beta, or, k, pt, pc, margin)
alpha |
significance level |
beta |
power = 1-beta |
or |
or=pt(1-pc)/pc(1-pt) |
k |
k=nT/nC |
pt |
the probability of observing an outcome of interest for a patient treatment by a test treatment |
pc |
the probability of observing an outcome of interest for a patient treatment by a control |
margin |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.6.4<-RelativeRisk.Equivalence(0.05,0.2,2,1,0.25,0.25,.5) Example.4.6.4
Example.4.6.4<-RelativeRisk.Equivalence(0.05,0.2,2,1,0.25,0.25,.5) Example.4.6.4
Ho:
Ha: OR > margin
RelativeRisk.NIS(alpha, beta, or, k, pt, pc, margin)
RelativeRisk.NIS(alpha, beta, or, k, pt, pc, margin)
alpha |
significance level |
beta |
power = 1-beta |
or |
or=pt(1-pc)/pc(1-pt) |
k |
k=nT/nC |
pt |
the probability of observing an outcome of interest for a patient treatment by a test treatment |
pc |
the probability of observing an outcome of interest for a patient treatment by a control |
margin |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.6.4<-RelativeRisk.NIS(0.05,0.2,2,1,0.4,0.25,.2) Example.4.6.4
Example.4.6.4<-RelativeRisk.NIS(0.05,0.2,2,1,0.4,0.25,.2) Example.4.6.4
Ho: log(OR)=0
Ha: not equal to 0
RelativeRiskCrossOver.Equality(alpha, beta, sigma, or)
RelativeRiskCrossOver.Equality(alpha, beta, sigma, or)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
or |
or=pt(1-pc)/pc(1-pt) |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ho:
Ha: |log(OR)| < margin
RelativeRiskCrossOver.Equivalence(alpha, beta, sigma, or, margin)
RelativeRiskCrossOver.Equivalence(alpha, beta, sigma, or, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
or |
or=pt(1-pc)/pc(1-pt) |
margin |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ho:
Ha: log(OR) > margin
RelativeRiskCrossOver.NIS(alpha, beta, sigma, or, margin)
RelativeRiskCrossOver.NIS(alpha, beta, sigma, or, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
or |
or=pt(1-pc)/pc(1-pt) |
margin |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ho:
Ha: is not equal to
The test is finding the treatment difference in QT interval.
d is not equal to 0, which is the difference of clinically importance.
Sensitivity.Index(alpha, n, deltaT)
Sensitivity.Index(alpha, n, deltaT)
alpha |
significance level |
n |
sample size n |
deltaT |
a measure of change in the signal-to-noise ratio for the population difference, which is the sensitivity index of population difference between regions. |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.5.1<-Sensitivity.Index(0.05,30,2.92) Example.15.5.1 # power=0.805
Example.15.5.1<-Sensitivity.Index(0.05,30,2.92) Example.15.5.1 # power=0.805
Extention from McNemar test to r by r table (r>2).
Ho: for all different i,j.
Ha: not equal
The test is finding whether there is a categorical shift from i pre-treatment to j post-treatment.
Stuart.Maxwell.Test(noncen, p.ij, p.ji, r)
Stuart.Maxwell.Test(noncen, p.ij, p.ji, r)
noncen |
the solution of the equation, which is non-central parameter of non-central chisquare distribtuion . |
p.ij |
the probability of shift from i pre-treatment to j post-treatment |
p.ji |
the probability of shift from j pre-treatment to i post-treatment |
r |
r by r tables, r is df |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ho: margin is equal to 0 Ha: margin is unequal to 0
The test is finding whether there is a difference between the mean responses of the test group and control group.
TwoSampleCrossOver.Equality(alpha, beta, sigma, margin)
TwoSampleCrossOver.Equality(alpha, beta, sigma, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
margin |
the true mean difference between a test mu2 and a control mu1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Ho:
Ha: |margin| < delta
This test is whether the test drug is equivalent to the control in average if the null hypothesis is rejected at significant level alpha
TwoSampleCrossOver.Equivalence(alpha, beta, sigma, delta, margin)
TwoSampleCrossOver.Equivalence(alpha, beta, sigma, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
delta |
the superiority or non-inferiority margin |
margin |
the true mean difference between a test mu2 and a control mu1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.3.3.4<-TwoSampleCrossOver.Equivalence(0.05,0.1,0.2,0.25,-0.1) Example.3.3.4 # 8
Example.3.3.4<-TwoSampleCrossOver.Equivalence(0.05,0.1,0.2,0.25,-0.1) Example.3.3.4 # 8
Ho:
Ha: |margin| < delta
if delta >0, the rejection of Null Hypothesis indicates the superiority of the test over the control;
if delta <0, the rejection of the null hypothesis implies the non-inferiority of the test against the control.
TwoSampleCrossOver.NIS(alpha, beta, sigma, delta, margin)
TwoSampleCrossOver.NIS(alpha, beta, sigma, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
delta |
the superiority or non-inferiority margin |
margin |
the true mean difference between a test mu2 and a control mu1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.3.3.4<-TwoSampleCrossOver.NIS(0.05,0.2,0.2,-0.2,-0.1) Example.3.3.4 # 13
Example.3.3.4<-TwoSampleCrossOver.NIS(0.05,0.2,0.2,-0.2,-0.1) Example.3.3.4 # 13
H0: margin is equal to 0 Ha: margin is unequal to 0
The test is finding whether there is a difference between the mean responses of the test group and control group.
TwoSampleMean.Equality(alpha, beta, sigma, k, margin)
TwoSampleMean.Equality(alpha, beta, sigma, k, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
pooled standard deviation of two groups |
k |
k=n1/n2 Example: k=2 indicates a 1 to 2 test-control allocation. |
margin |
the true mean difference between a test mu2 and a control mu1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.3.2.4<-TwoSampleMean.Equality(0.05,0.2,0.1,1,0.05) Example.3.2.4 # 63
Example.3.2.4<-TwoSampleMean.Equality(0.05,0.2,0.1,1,0.05) Example.3.2.4 # 63
Ho:
Ha: |margin| < delta
This test is whether the test drug is equivalent to the control in average if the null hypothesis is rejected at significant level alpha
TwoSampleMean.Equivalence(alpha, beta, sigma, k, delta, margin)
TwoSampleMean.Equivalence(alpha, beta, sigma, k, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
pooled standard deviation of two groups |
k |
k=n1/n2 Example: k=2 indicates a 1 to 2 test-control allocation. |
delta |
the superiority or non-inferiority margin |
margin |
the true mean difference between a test mu2 and a control mu1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.3.2.4<-TwoSampleMean.Equivalence(0.1,0.1,0.1,1,0.05,0.01) Example.3.2.4 #107
Example.3.2.4<-TwoSampleMean.Equivalence(0.1,0.1,0.1,1,0.05,0.01) Example.3.2.4 #107
Ho:
Ha: margin > delta
if delta >0, the rejection of Null Hypothesis indicates the superiority of the test over the control;
if delta <0, the rejection of the null hypothesis implies the non-inferiority of the test against the control.
TwoSampleMean.NIS(alpha, beta, sigma, k, delta, margin)
TwoSampleMean.NIS(alpha, beta, sigma, k, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
pooled standard deviation of two groups |
k |
k=n1/n2 Example: k=2 indicates a 1 to 2 test-control allocation. |
delta |
the superiority or non-inferiority margin |
margin |
the true mean difference between a test mu2 and a control mu1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.3.2.4<-TwoSampleMean.NIS(0.05,0.2,0.1,1,-0.05,0) Example.3.2.4 # 50
Example.3.2.4<-TwoSampleMean.NIS(0.05,0.2,0.1,1,-0.05,0) Example.3.2.4 # 50
H0: p1=p2
Ha: not equal
The test is finding whether there is a difference between the mean response rates of the test drug and reference drug
TwoSampleProportion.Equality(alpha, beta, p1, p2, k)
TwoSampleProportion.Equality(alpha, beta, p1, p2, k)
alpha |
significance level |
beta |
power = 1-beta |
p1 |
the mean response rate for test drug |
p2 |
the rate for reference drug |
k |
k=n1/n2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.2.4<-TwoSampleProportion.Equality(0.05,0.2,0.65,0.85,1) Example.4.2.4
Example.4.2.4<-TwoSampleProportion.Equality(0.05,0.2,0.65,0.85,1) Example.4.2.4
Ho:
Ha: |p1-p2| < margin
The proportion of response p1 is equivalent to the reference drug p2 is the null hypothesis is rejected
TwoSampleProportion.Equivalence(alpha, beta, p1, p2, k, delta, margin)
TwoSampleProportion.Equivalence(alpha, beta, p1, p2, k, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
p1 |
the mean response rate for test drug |
p2 |
the rate for reference drug |
k |
k=n1/n2 |
delta |
delta=p1-p2 |
margin |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.2.4<-TwoSampleProportion.Equivalence(0.05,0.2,0.75,0.8,1,0.2,0.05) Example.4.2.4
Example.4.2.4<-TwoSampleProportion.Equivalence(0.05,0.2,0.75,0.8,1,0.2,0.05) Example.4.2.4
Ho:
Ha: p1-p2 > margin
if margin >0, the rejection of Null Hypothesis indicates the true rate p1 is superior over the reference value p2;
if margin <0, the rejection of the null hypothesis implies the true rate p1 is non-inferior against the reference value p2.
TwoSampleProportion.NIS(alpha, beta, p1, p2, k, delta, margin)
TwoSampleProportion.NIS(alpha, beta, p1, p2, k, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
p1 |
the mean response rate for test drug |
p2 |
the rate for reference drug |
k |
k=n1/n2 |
delta |
delta=p1-p2 |
margin |
the superiority or non-inferiority margin |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.2.4<-TwoSampleProportion.NIS(0.05,0.2,0.65,0.85,1,0.2,0.05) Example.4.2.4
Example.4.2.4<-TwoSampleProportion.NIS(0.05,0.2,0.65,0.85,1,0.2,0.05) Example.4.2.4
H0: p2-p1 = 0 Ha: not equal to 0
TwoSampleSeqCrossOver.Equality(alpha, beta, sigma, sequence, delta)
TwoSampleSeqCrossOver.Equality(alpha, beta, sigma, sequence, delta)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
sequence |
total sequence number |
delta |
delta=p2-p1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.3.4<-TwoSampleSeqCrossOver.Equality(0.05,0.2,0.25,2,0.2) Example.4.3.4
Example.4.3.4<-TwoSampleSeqCrossOver.Equality(0.05,0.2,0.25,2,0.2) Example.4.3.4
Ho:
Ha: |p1-p2| < margin
TwoSampleSeqCrossOver.Equivalence(alpha, beta, sigma, sequence, delta, margin)
TwoSampleSeqCrossOver.Equivalence(alpha, beta, sigma, sequence, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
sequence |
total sequence number |
delta |
the superiority or non-inferiority margin |
margin |
margin=p2-p1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.3.4<-TwoSampleSeqCrossOver.Equivalence(0.05,0.2,0.25,2,0,0.2) Example.4.3.4
Example.4.3.4<-TwoSampleSeqCrossOver.Equivalence(0.05,0.2,0.25,2,0,0.2) Example.4.3.4
H0: p2-p1 <= margin
Ha: p2-p1 > margin
TwoSampleSeqCrossOver.NIS(alpha, beta, sigma, sequence, delta, margin)
TwoSampleSeqCrossOver.NIS(alpha, beta, sigma, sequence, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
sequence |
total sequence number |
delta |
the superiority or non-inferiority margin |
margin |
margin=p2-p1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.3.4<-TwoSampleSeqCrossOver.NIS(0.05,0.2,0.25,2,0,-0.2) Example.4.3.4
Example.4.3.4<-TwoSampleSeqCrossOver.NIS(0.05,0.2,0.25,2,0,-0.2) Example.4.3.4
unconditional versus conditional
TwoSampleSurvival.Conditional(alpha,beta,lam1,lam2,eta1,eta2,k,ttotal,taccrual,g1,g2)
TwoSampleSurvival.Conditional(alpha,beta,lam1,lam2,eta1,eta2,k,ttotal,taccrual,g1,g2)
alpha |
significance level |
beta |
power = 1-beta |
lam1 |
the hazard rates of control group |
lam2 |
the hazard rates of a test drug |
eta1 |
in control group, the losses are exponentially distributed with loss hazard rate eta1 |
eta2 |
in treatment group, the losses are exponentially distributed with loss hazard rate eta2 |
k |
k=n1/n2 sample size ratio |
ttotal |
Total trial time |
taccrual |
accrual time period |
g1 |
parameter for the entry distribution of control group, which is uniform patient entry with gamma1=0. |
g2 |
parameter for the entry distribution of treatment group, which is uniform patient entry with gamma2=0. |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
H0: the difference between the hazard rates of two samples is equal to
Ha: not equal to 0
The test is finding whether there is a difference between the hazard rates of the test drug and the reference drug.
TwoSampleSurvival.Equality(alpha, beta, lam1, lam2, k, ttotal, taccrual, gamma)
TwoSampleSurvival.Equality(alpha, beta, lam1, lam2, k, ttotal, taccrual, gamma)
alpha |
significance level |
beta |
power = 1-beta |
lam1 |
the hazard rates of control group |
lam2 |
the hazard rates of a test drug |
k |
k=n1/n2 sample size ratio |
ttotal |
Total trial time |
taccrual |
accrual time period |
gamma |
parameter for exponential distribution. Assume Uniform patient entry if gamma =0 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.7.2.4<-TwoSampleSurvival.Equality(0.05,0.2,1,2,1,3,1,0.00001) Example.7.2.4
Example.7.2.4<-TwoSampleSurvival.Equality(0.05,0.2,1,2,1,3,1,0.00001) Example.7.2.4
margin=lamda1-lamda2, the true difference of hazard rates between control group lamda1 and a test drug group lamda2
H0: |margin| >= delta
Ha: |margin| < delta
This test is whether the test drug is equivalent to the control in average if the null hypothesis is rejected at significant level alpha
TwoSampleSurvival.Equivalence(alpha, beta, lam1, lam2, k, ttotal, taccrual, gamma, margin)
TwoSampleSurvival.Equivalence(alpha, beta, lam1, lam2, k, ttotal, taccrual, gamma, margin)
alpha |
significance level |
beta |
power = 1-beta |
lam1 |
the hazard rates of control group |
lam2 |
the hazard rates of a test drug |
k |
k=n1/n2 sample size ratio |
ttotal |
Total trial time |
taccrual |
accrual time period |
gamma |
parameter for exponential distribution. Assume Uniform patient entry if gamma =0 |
margin |
margin=lamda1-lamda2, the true difference of hazard rates between control group lamda1 and a test drug group lamda2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.7.2.4<-TwoSampleSurvival.Equivalence(0.05,0.2,1,1,1,3,1,0.00001,0.5) Example.7.2.4
Example.7.2.4<-TwoSampleSurvival.Equivalence(0.05,0.2,1,1,1,3,1,0.00001,0.5) Example.7.2.4
margin=lamda1-lamda2, the true difference of hazard rates between control group lamda1 and a test drug group lamda2
H0: margin <= delta
Ha: margin > delta
if delta >0, the rejection of Null Hypothesis indicates the superiority of the test drug over the control;
if delta <0, the rejection of the null hypothesis implies the non-inferiority of the test test drug against the control.
TwoSampleSurvival.NIS(alpha, beta, lam1, lam2, k, ttotal, taccrual, gamma,margin)
TwoSampleSurvival.NIS(alpha, beta, lam1, lam2, k, ttotal, taccrual, gamma,margin)
alpha |
significance level |
beta |
power = 1-beta |
lam1 |
the hazard rates of control group |
lam2 |
the hazard rates of a test drug |
k |
k=n1/n2 sample size ratio |
ttotal |
Total trial time |
taccrual |
accrual time period |
gamma |
parameter for exponential distribution. Assume Uniform patient entry if gamma =0 |
margin |
margin=lamda1-lamda2, the true difference of hazard rates between control group lamda1 and a test drug group lamda2 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.7.2.4<-TwoSampleSurvival.NIS(0.05,0.2,1,2,1,3,1,0.00001,0.2) Example.7.2.4
Example.7.2.4<-TwoSampleSurvival.NIS(0.05,0.2,1,2,1,3,1,0.00001,0.2) Example.7.2.4
Two-sided tests
Ho:
Ha: is not equal to 0
TwoSide.fixEffect(m, m1, delta, a1, r1, fdr)
TwoSide.fixEffect(m, m1, delta, a1, r1, fdr)
m |
m is the total number of multiple tests |
m1 |
m1 = m - m0. m0 is the number of tests which the null hypotheses are true ; m1 is the number of tests which the alternative hypotheses are true. (or m1 is the number of prognostic genes) |
delta |
|
a1 |
a1 is the allocation proportion for group 1. a2=1-a1. |
r1 |
r1 is the number of true rejection |
fdr |
fdr is the FDR level. |
alpha_star=r1*fdr/((m-m1)*(1-fdr)), which is the marginal type I error level for r1 true rejection with the FDR controlled at f.
beta_star=1-r1/m1, which is equal to 1-power.
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.12.2.3<-TwoSide.fixEffect(m=4000,m1=40,delta=1,a1=0.5,r1=24,fdr=0.01) Example.12.2.3 # n=73
Example.12.2.3<-TwoSide.fixEffect(m=4000,m1=40,delta=1,a1=0.5,r1=24,fdr=0.01) Example.12.2.3 # n=73
Two-sided tests
Ho:
Ha: is not equal to 0
TwoSide.varyEffect(s1, s2, m, m1, delta, a1, r1, fdr)
TwoSide.varyEffect(s1, s2, m, m1, delta, a1, r1, fdr)
s1 |
We use bisection method to find the sample size, which let the equation h(n)=0. Here s1 and s2 are the initial value, 0<s1<s2. h(s1) should be smaller than 0. |
s2 |
s2 is also the initial value, which is larger than s1 and h(s2) should be larger than 0. |
m |
m is the total number of multiple tests |
m1 |
m1 = m - m0. m0 is the number of tests which the null hypotheses are true ; m1 is the number of tests which the alternative hypotheses are true. (or m1 is the number of prognostic genes) |
delta |
|
a1 |
a1 is the allocation proportion for group 1. a2=1-a1. |
r1 |
r1 is the number of true rejection |
fdr |
fdr is the FDR level. |
alpha_star=r1*fdr/((m-m1)*(1-fdr)), which is the marginal type I error level for r1 true rejection with the FDR controlled at f.
beta_star=1-r1/m1, which is equal to 1-power.
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
delta=c(rep(1,40/2),rep(1/2,40/2)); Example.12.2.4<-TwoSide.varyEffect(s1=100,s2=200,m=4000,m1=40,delta=delta,a1=0.5,r1=24,fdr=0.01) Example.12.2.4 # n=164 s1<n<s2, h(s1)<0,h(s2)<0
delta=c(rep(1,40/2),rep(1/2,40/2)); Example.12.2.4<-TwoSide.varyEffect(s1=100,s2=200,m=4000,m1=40,delta=delta,a1=0.5,r1=24,fdr=0.01) Example.12.2.4 # n=164 s1<n<s2, h(s1)<0,h(s2)<0
Let sij be the severity score associated with the jth case in the ith treatment group. ,
.
H0: pT=pC and muT=muC
Ha: pT is not equal to pC and muT is not equal to muC
Vaccine.CEM(alpha, beta, mu_t, mu_c, sigma_t, sigma_c, pt, pc)
Vaccine.CEM(alpha, beta, mu_t, mu_c, sigma_t, sigma_c, pt, pc)
alpha |
significance level |
beta |
power=1-beta |
mu_t |
mean of treatment group |
mu_c |
mean of control group |
sigma_t |
standard deviation of treatment group |
sigma_c |
standard deviation of control group |
pt |
the true disease incidence rates of the nt vaccines |
pc |
the true disease incidence rates of the nc controls |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.6.4<-Vaccine.CEM(0.05,0.2,0.2,0.3,sqrt(0.15),sqrt(0.15),0.1,0.2) Example.15.6.4
Example.15.6.4<-Vaccine.CEM(0.05,0.2,0.2,0.3,sqrt(0.15),sqrt(0.15),0.1,0.2) Example.15.6.4
If the disease incidence rate is extremely low, the number of cases in the vaccine group given the total number of cases is distributed as a binomial random variable with parameter theta.
Ho:
Ha:
Vaccine.ELDI(alpha, beta, theta0, theta, pt, pc)
Vaccine.ELDI(alpha, beta, theta0, theta, pt, pc)
alpha |
significance level |
beta |
power=1-beta |
theta0 |
the true parameter for binomial distribution. Theta0 is usually equal to 0.5 |
theta |
theta=disease rate for treatment group/(disease rate for treatment group + for control group) |
pt |
the true disease incidence rates of the nt vaccines |
pc |
the true disease incidence rates of the nc controls |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.6.2<-Vaccine.ELDI(0.05,0.2,0.5,1/3,0.001,0.002) Example.15.6.2 # 17837
Example.15.6.2<-Vaccine.ELDI(0.05,0.2,0.5,1/3,0.001,0.002) Example.15.6.2 # 17837
The test is to find whether the vaccine can prevent the disease or reduce the incidence of the disease in the target population. Usually use prospective, randomized, placebo-controlled trials.
Vaccine.RDI(alpha, d, pt, pc)
Vaccine.RDI(alpha, d, pt, pc)
alpha |
significance level |
d |
the half length of the confidence interval of pt/pc |
pt |
the true disease incidence rates of the nt vaccines |
pc |
the true disease incidence rates of the nc controls |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.15.6.1<-Vaccine.RDI(0.05,0.2,0.01,0.02) Example.15.6.1 # 14214
Example.15.6.1<-Vaccine.RDI(0.05,0.2,0.01,0.02) Example.15.6.1 # 14214
Consider 2 by 2 crossover design.
.
,
Ho:
Ha:
Vitro.BE(alpha, beta, delta, sigmaBT, sigmaBR, sigmaWT, sigmaWR, thetaBE)
Vitro.BE(alpha, beta, delta, sigmaBT, sigmaBR, sigmaWT, sigmaWR, thetaBE)
alpha |
significance level |
beta |
power = 1-beta |
delta |
delta is the mean difference |
sigmaBT |
|
sigmaBR |
|
sigmaWT |
|
sigmaWR |
|
thetaBE |
here thetaBE=1 |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.10.5<-Vitro.BE(0.05,0.2,0,0.5,0.5,0.5,0.5,1) Example.10.5 # n=43 Vitro.BE reach 0
Example.10.5<-Vitro.BE(0.05,0.2,0,0.5,0.5,0.5,0.5,1) Example.10.5 # n=43 Vitro.BE reach 0
Ho:
Ha: not equal to 0
WilliamsDesign.Equality(alpha, beta, sigma, sequence, delta)
WilliamsDesign.Equality(alpha, beta, sigma, sequence, delta)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
sequence |
total sequence number |
delta |
delta= |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.5.4<-WilliamsDesign.Equality(0.05,0.2,0.75^2,6,0.2) Example.4.5.4
Example.4.5.4<-WilliamsDesign.Equality(0.05,0.2,0.75^2,6,0.2) Example.4.5.4
Ho:
Ha:
WilliamsDesign.Equivalence(alpha, beta, sigma, sequence, delta, margin)
WilliamsDesign.Equivalence(alpha, beta, sigma, sequence, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
sequence |
total sequence number |
delta |
the superiority or non-inferiority margin |
margin |
margin= |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.5.4<-WilliamsDesign.Equivalence(0.05,0.2,0.75^2,6,0.2,0.3) Example.4.5.4
Example.4.5.4<-WilliamsDesign.Equivalence(0.05,0.2,0.75^2,6,0.2,0.3) Example.4.5.4
H0:
Ha:
WilliamsDesign.NIS(alpha, beta, sigma, sequence, delta, margin)
WilliamsDesign.NIS(alpha, beta, sigma, sequence, delta, margin)
alpha |
significance level |
beta |
power = 1-beta |
sigma |
standard deviation in crossover design |
sequence |
total sequence number |
delta |
the superiority or non-inferiority margin |
margin |
margin= |
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
Example.4.5.4<-WilliamsDesign.NIS(0.05,0.2,0.75^2,6,0.2,0.05) Example.4.5.4
Example.4.5.4<-WilliamsDesign.NIS(0.05,0.2,0.75^2,6,0.2,0.05) Example.4.5.4