ssizeCT.default: Sample Size Calculation in the Analysis of Survival Data for...

Description Usage Arguments Details Value Note References See Also Examples

View source: R/powerCT.R


Sample size calculation for the Comparison of Survival Curves Between Two Groups under the Cox Proportional-Hazards Model for clinical trials.


ssizeCT.default(power, k, pE, pC, RR, alpha = 0.05)



power to detect the magnitude of the hazard ratio as small as that specified by RR.


ratio of participants in group E (experimental group) compared to group C (control group).


probability of failure in group E (experimental group) over the maximum time period of the study (t years).


probability of failure in group C (control group) over the maximum time period of the study (t years).


postulated hazard ratio.


type I error rate.


This is an implementation of the sample size calculation method described in Section 14.12 (page 807) of Rosner (2006). The method was proposed by Freedman (1982).

Suppose we want to compare the survival curves between an experimental group (E) and a control group (C) in a clinical trial with a maximum follow-up of t years. The Cox proportional hazards regression model is assumed to have the form:

h(t|X_1)=h_0(t)\exp(β_1 X_1).

Let n_E be the number of participants in the E group and n_C be the number of participants in the C group. We wish to test the hypothesis H0: RR=1 versus H1: RR not equal to 1, where RR=\exp(β_1)=underlying hazard ratio for the E group versus the C group. Let RR be the postulated hazard ratio, α be the significance level. Assume that the test is a two-sided test. If the ratio of participants in group E compared to group C = n_E/n_C=k, then the number of participants needed in each group to achieve a power of 1-β is

n_E=\frac{m k}{k p_E + p_C}, n_C=\frac{m}{k p_E + p_C}


m=\frac{1}{k}≤ft(\frac{k RR + 1}{RR - 1}\right)^2≤ft( z_{1-α/2}+z_{1-β} \right)^2,

and z_{1-α/2} is the 100 (1-α/2) percentile of the standard normal distribution N(0, 1).


A two-element vector. The first element is n_E and the second element is n_C.


(1) The sample size formula assumes that the central-limit theorem is valid and hence is appropriate for large samples. (2) n_E and n_C will be rounded up to integers.


Freedman, L.S. (1982). Tables of the number of patients required in clinical trials using the log-rank test. Statistics in Medicine. 1: 121-129

Rosner B. (2006). Fundamentals of Biostatistics. (6-th edition). Thomson Brooks/Cole.

See Also



  # Example 14.42 in Rosner B. Fundamentals of Biostatistics. 
  # (6-th edition). (2006) page 809
  ssizeCT.default(power = 0.8, k = 1, pE = 0.3707, pC = 0.4890, 
    RR = 0.7, alpha = 0.05)

powerSurvEpi documentation built on May 19, 2017, 7:50 a.m.
Search within the powerSurvEpi package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.