getSizeProp {GenTwoArmsTrialSize} | R Documentation |
General Formulas for Sample Size Calculation
Description
This function computes the sample size required for two arms clinical trials with binary outcome measure. Four hypothesis tests are available under two allocation designs.
Usage
getSizeProp(
design = c("parallel", "crossover"),
test = c("equality", "noninferiority", "superiority", "equivalence"),
alpha = 0.05,
beta = 0.2,
varsigma,
k = 1,
seqnumber,
delta = 0,
TTE,
rho = c(0.05, 0.07),
r = 0.1
)
Arguments
design |
allocation method ( |
test |
four hypothesis tests: |
alpha |
level of significance. |
beta |
type II error. |
varsigma |
(varsigma1 > 0, varsigma2 > 0) := (p1, p2) probability of mean response in control and treatment arms; ( |
k |
ratio of control to treatment. |
seqnumber |
Number of crossover sequences: 0 if parallel; 1+ if crossover (seqnumber>=0) |
delta |
delta margin in test hypothesis. |
TTE |
target treatment effect or effect size. |
rho |
vector of length 2, positive noncompliance rates of two arms. |
r |
projected proportion of trial uniform loss of follow-up. |
Value
sample size per arm.
Examples
# Ex 1. (n_trt=102, n_ctl=102)
getSizeProp(design="parallel", test="equality", alpha=0.05, beta=0.20,
varsigma=c(0.65, 0.85), k=1, seqnumber=0, delta=0, TTE=0,
rho=c(0.05, 0.07), r=0.1)
# Ex 2. (n_trt=33, n_ctl=33)
getSizeProp(design="parallel", test="noninferiority", alpha=0.05, beta=0.20,
varsigma=c(0.65,0.85), k=1, seqnumber=0, delta=-0.10, TTE=0.20,
rho=c(0.05, 0.07), r=0.1)
# Ex 3. (n_trt=157, n_ctl=157)
getSizeProp(design="parallel", test="superiority", alpha=0.05, beta=0.20,
varsigma=c(0.65,0.85), k=1, seqnumber=0, delta=0.05, TTE=0.20,
rho=c(0.05, 0.07), r=0.1)
# Ex 4. (n_trt=137, n_ctl=137)
getSizeProp(design="parallel", test="equivalence", alpha=0.05, beta=0.20,
varsigma=c(0.75,0.80), k=1, seqnumber=0, delta=0.20, TTE=0.05,
rho=c(0.05, 0.07), r=0.1)
# Ex 5. (n_trt=36, n_ctl=36)
getSizeProp(design="crossover", test="equality", alpha=0.05, beta=0.20,
varsigma=c(0.5,0.5), k=1, seqnumber=2, delta=0, TTE=0.20,
rho=c(0.05, 0.07), r=0.1)
# Ex 6. (n_trt=22, n_ctl=22)
getSizeProp(design="crossover", test="noninferiority", alpha=0.05,
beta=0.20, varsigma=c(0.5,0.5), k=1, seqnumber=2, delta=-0.20, TTE=0,
rho=c(0.05, 0.07), r=0.1)
# Ex 7. (n_trt=86, n_ctl=86)
getSizeProp(design="crossover", test="superiority", alpha=0.05, beta=0.20,
varsigma=c(0.5,0.5), k=1, seqnumber=2, delta=0.10, TTE=0,
rho=c(0.05, 0.07), r=0.1)
# Ex 8. (n_trt=30, n_ctl=30)
getSizeProp(design="crossover", test="equivalence", alpha=0.05, beta=0.20,
varsigma=c(0.5,0.5), k=1, seqnumber=2, delta=0.20, TTE=0,
rho=c(0.05, 0.07), r=0.1)