# median survival time for treatment and control: 16 months vs 12 months
# entry time: 12 months ; follow-up time: 18 months
# the shape parameter for weibull drop-out : 0.5
# median time for drop-out : 48 =>
# scale parameter: 48/log(2)^(1/0.5)=100
RR <- 1; l1 <- log(2)/16; l0 <- log(2)/12
t_enrl <- 12; t_fup <- 18
cal_event(1,l1,l0,t_enrl,t_fup,0.5,100)
Run the code above in your browser using DataLab