Description Usage Arguments Value References Examples
Function fitting parametric survival curves S_1, S_2 to two groups and yielding lower and upper (1-α)-confidence bounds for the difference S_1-S_2 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. m_1 and m_2 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.
1 | confint_diff(alpha, t0, m1, m2, B = 1000, data_r, data_t, plot = TRUE)
|
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 |
A list containing the difference S_1(t_0)-S_2(t_0), the lower and upper (1-α)-confidence bounds and a summary of the two model fits. Further a plot of the curves is given.
K.Moellenhoff and A.Tresch: Survival analysis under non-proportional hazards: investigating non-inferiority or equivalence in time-to-event data <arXiv:2009.06699>
1 2 3 4 5 6 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.