Learn R Programming

SampleSize4ClinicalTrials (version 0.1.1)

ssc: Sample Size Calculation for the Comparison of Means or Proportions in Phase III Clinical Trials

Description

This function aims to calculate sample size for the comparison of means or proportions in Phase III clinical trials.

Usage

ssc(cat=c("m","p"), design=c(1,2,3,4), ratio, alpha, power, sigma, p1, p2, theta, delta)

Arguments

cat

Type of the outcome for comparison. "m" stands for the comparison of means. "p" stands for the comparison of proportions.

design

The design of the clinical trials. 1 Testing for equality 2 Superiority trial 3 Non-inferiority trial 4 Equivalence trial.

ratio

The ratio between the number of subjects in the treatment arm and that in the control arm.

alpha

Type I error rate

power

Statistical power of the test (1-type II error rate)

sigma

The variance of observed outcomes in both arms (specified in the comparison of means for continuous outcomes)

p1

The response rate of the treatment arm (specified the comparison of proportions for binary outcomes)

p2

The response rate of the control arm

theta

The difference between means or proportions in the two arms

delta

The prespecified non-inferiority or equivalence margin in non-inferiority or equivalence trials

Value

samplesize

References

Yin, G. (2012). Clinical Trial Design: Bayesian and Frequentist Adaptive Methods. John Wiley & Sons.

Examples

Run this code
# NOT RUN {
##The comparison of means, a non-inferiority trial with a non-inferiority margin 0.5
##the true treatment difference is assumed to be zero in non-inferiority and equivalence trials
ssc(cat="m",design=3,ratio=1,alpha=0.05,power=0.9,sigma=1,theta=0,delta=0.5)
##The comparison of proportions, a superiority trial
ssc(cat="p",design=2,ratio=3,alpha=0.025,power=0.8,p1=0.4,p2=0.2,theta=0.2)
# }

Run the code above in your browser using DataLab