R/schoenfeld_formula.R

Defines functions schoenfeld_formula

Documented in schoenfeld_formula

#' Schoenfeld's formula
#'
#' @description Schoenfeld's formula to calculate the number of events required
#' @export 
#' @keywords internal 
#'
#'
#'
schoenfeld_formula <- function(alpha,power,HR) E <- 4*(qnorm(1-alpha/2) +  qnorm(power))^2 / (log(HR))^2

Try the CompAREdesign package in your browser

Any scripts or data that you put into this service are public.

CompAREdesign documentation built on Oct. 2, 2022, 5:08 p.m.