confint_diff {EquiSurv} | R Documentation |
Lower and upper confidence bounds for the difference of two parametric survival curves
Description
Function fitting parametric survival curves ,
to two groups and
yielding lower and upper (1-
)-confidence bounds for the difference
of these
two curves at a specific time point, based on approximating the variance via bootstrap.
For the bootstrap exponentially distributed random censoring is assumed and the parameters estimated from the datasets.
and
are parametric survival models following a Weibull, exponential, gaussian, logistic, log-normal or log-logistic distribution.
For the generation of the bootstrap data exponentially distributed right-censoring is assumed and the rates estimated from the datasets.
See Moellenhoff and Tresch <arXiv:2009.06699> for details.
Usage
confint_diff(alpha, t0, m1, m2, B = 1000, data_r, data_t, plot = TRUE)
Arguments
alpha |
confidence level |
t0 |
time point of interest |
m1 , m2 |
type of parametric model. Possible model types are "weibull", "exponential", "gaussian", "logistic", "lognormal" and "loglogistic" |
B |
number of bootstrap repetitions. The default is B=1000 |
data_r , data_t |
datasets containing time and status for each individual (have to be referenced as this) |
plot |
if TRUE, a plot of the two survival curves will be given |
Value
A list containing the difference , the lower and upper (1-
)-confidence bounds and a summary of the two model fits. Further a plot of the curves is given.
References
K.Moellenhoff and A.Tresch: Survival analysis under non-proportional hazards: investigating non-inferiority or equivalence in time-to-event data <arXiv:2009.06699>
Examples
data(veteran)
veteran_r <- veteran[veteran$trt==1,]
veteran_t <- veteran[veteran$trt==2,]
alpha<-0.05
t0<-80
confint_diff(alpha=alpha,t0=t0,m1="weibull",m2="weibull",data_r=veteran_r,data_t=veteran_t)