survEvents: Compute number of events or power for a survival endpoint

View source: R/survEvents.R

survEventsR Documentation

Compute number of events or power for a survival endpoint

Description

For a given hazard ratio, significance level, and power, the function returns the required total number of events.

Usage

survEvents(
  HR,
  sig.level = 0.05,
  power = NULL,
  n.events = NULL,
  alloc.ratio = 1,
  non.inf.margin = 0,
  alternative = c("two.sided", "one.sided")
)

Arguments

HR

Hazard ratio of experimental group vs. control group.

sig.level

Significance level with default 0.05.

power

Desired power.

n.events

Required total number of events.

alloc.ratio

Allocation ratio: Ratio of the number of patients in the experimental group divided by the number of patients in the control group.

non.inf.margin

Non-inferiority margin. Default is 0 and implies a superiority trial.

alternative

"two.sided" (default) or "one.sided". Specifies whether the alternative hypothesis is one- or two-sided.

Details

For a given hazard ratio, significance level, and number of events, the function returns the corresponding power.

Value

If power is specified, the function returns the required total number of events. If n.events is specified, the function returns the power.

Note

Replaces NumEvents.

Author(s)

Uriah Daugaard and Leonhard Held
leonhard.held@uzh.ch

References

Collett, D. (2015). Modelling Survival Data in Medical Research. New York: Chapman and Hall/CRC.

Schoenfeld, D.A. (1983). Sample-Size Formula for the Proportional-Hazards Regression Model. Biometrics, 39, 499–503.

Examples


survEvents(HR = 0.65, sig.level = 0.05, power = 0.9, alloc.ratio = 1,
           non.inf.margin = 0, alternative = "two.sided")

survEvents(HR = 0.65, sig.level = 0.05, power = 0.9, alloc.ratio = 1,
           non.inf.margin = .5, alternative = "one.sided")

survEvents(HR = 0.65, sig.level = 0.05, n.events = 35, alloc.ratio = 1,
           non.inf.margin = 0, alternative = "two.sided")

survEvents(HR = 0.65, sig.level = 0.05, n.events = 35, alloc.ratio = 1,
           non.inf.margin = 1, alternative = "one.sided")


felix-hof/biostatUZH documentation built on Sept. 27, 2024, 1:48 p.m.