confint_km_diff {EquiSurv} | R Documentation |
Lower and upper confidence bounds for the difference of two Kaplan-Meier curves
Description
Function fitting Kaplan-Meier curves S_1
, S_2
to two groups and yielding
lower and upper (1-\alpha
)-confidence bounds for the difference S_1-S_2
of these
two curves at a specific time point by using Greenwood's formula.
Usage
confint_km_diff(alpha, t0, data_r, data_t, plot = TRUE)
Arguments
alpha |
confidence level |
t0 |
time point of interest |
data_r , data_t |
datasets containing time and status for each individual |
plot |
if TRUE, a plot of the two Kaplan Meier curves will be given |
Value
A list containing the difference S_1(t_0)-S_2(t_0)
and the lower and upper (1-\alpha
)-confidence bounds. Further a plot of the curves is given.
Examples
data(veteran)
veteran_r <- veteran[veteran$trt==1,]
veteran_t <- veteran[veteran$trt==2,]
alpha<-0.05
t0<-80
confint_km_diff(alpha=alpha,t0=t0,data_r=veteran_r,data_t=veteran_t)
[Package EquiSurv version 0.1.0 Index]