Learn R Programming

coprimary (version 1.0)

nbevent: Number of events estimates

Description

To determine the sample size N in clinical trials with time to event endpoint, it is necessary to proceed in two steps. In the first step, the numbers of events that need to be observed (e) are computed. In the second step, we determine the number of patients necessary to observe the number of events required. This function computes the number of event for one-time-to event.

Usage

nbevent(hypsurv,pe,alfa,beta,design)

Arguments

hypsurv
For Superiority=c(Sc,Se); for Non inferiority=c(Sc,Se,SeA); for Equivalence=c(Sc, Se), with Sc is survival rate in the control arm; Se is survival rate in experimental arm; SeA is the survival rate in the experimental arm under the alternative hypothesis.
pe
Proportion (ratio) of patients assigned to the experimental arm (with 0
alfa
Type I error, for Non inferiority, Equivalence and 1-sided superiority, alfa is a vector of length one. For 2-sided superiority, alfa is a vector to length two c(alpha.low, alpha.up).
beta
Probability of a type II error.
design
Superiority=c(1,sided)[with sided=1 if 1-sided and 2 if 2-sided]; Non inferiority=c(2); Equivalence=c(1,1)

Value

E: Number of eventsh: Hazard Ratio under null hypothesis(HR=log(Se)/log(Sc))h.alt: Hazard Ratio under alternative hypothesis (h.alt=log(SeA)/log(Sc))

Details

The nbevent function computes the required number of events to determine the number of patients.

References

Chow, S. C., Shao, J., Wang, H. (2003). Sample Size Calculation in Clinical Research. New York: Marcel Dekker.

Schoenfeld. Sample-size formula for the proportional-hazards regression model. Biometrics. 1983 39<499>503.