Learn R Programming

HCTDesign (version 0.7.4)

calendar_time: Calculate Calendar Times for Interim Analysis Looks

Description

Calculate Calendar Times for Interim Analysis Looks

Usage

calendar_time(
  k,
  d2max,
  htime,
  hevent,
  delta,
  ta,
  tf,
  method = c("KM"),
  event_ind = 1
)

Value

Data frame with columns: Distribution, look, time fraction, events, calendar time

Arguments

k

Numeric vector of event fractions for each look (e.g., c(0.5, 1))

d2max

maximum number of events in the experimental group calculated from the design function.

htime

Historical survival times

hevent

Historical event indicators (0/1)

delta

Hazard ratio (experimental vs. historical)

ta

Accrual time

tf

Follow-up time

method

"exponential", "log_normal" or "KM" for survival function estimation(Default is KM)

event_ind

Event indicator value (default = 1)

Author

Tushar Patni, Yimei Li and Jianrong Wu.

References

doi:10.1002/pst.1756HCTDesign

doi:10.1080/10543406.2019.1684305HCTDesign

Examples

Run this code
time <- c(20, 65, 12, 50, 58, 65, 45, 44)
event <- c(1, 0, 0, 0, 1, 1, 1, 1)
gg<-calendar_time(k=c(0.5, 1),d2max=46,htime=time,hevent=event,delta=0.7,ta=5,tf=4,method="KM")

Run the code above in your browser using DataLab