KMMI {SurvMI}R Documentation

Kaplan-Meier estimation with event uncertainty

Description

KM estimation for survival data when event uncertainty presents. KM plot will be output if plot=TRUE specfied.

Usage

KMMI(data_list,nMI,covariates,data_orig = NULL,plot = TRUE,
time_var=NULL,event_var=NULL)

Arguments

data_list

The data list which has been transformed from the long format by uc_data_transform function.

nMI

Number of imputations (>1). If missing, weighted statistics would be output instead.

covariates

The grouping varaible, no need to be factorized. If missing then the overall KM is returned.

plot

T/F, whether output a KM plot, the plot potentially contains KM curves from original dataset and imputed/weighted dataset.

data_orig

The original data without any uncertain events. If supplies then user can compare results from certain events only and all possible events.

time_var

Time variable in data_orig. If user provides the orig dataset then user need to specify the time and event indicator variable in the orignal dataset.

event_var

Event indicator variable in the original data set.

Value

KM_mi

A dataset contains MI estimation and variance at all potential event time

KM_cook

A dataset contains weighted KM estimation and variance at all potential event time

ngroup

Number of groups

cate_level

Values of the categorical variable

nMI

Number of imputed datasets

Author(s)

Yiming Chen

References

[1]Cook TD. Adjusting survival analysis for the presence of unadjudicated study events. Controlled clinical trials. 2000;21(3):208-222.

[2]Cook TD, Kosorok MR. Analysis of time-to-event data with incomplete event adjudication. Journal of the american statistical association. 2004;99(468):1140-1152.

[3]Klein JP, Moeschberger ML. Survival Analysis : Techniques for Censored and Truncated Data. New York: Springer; 1997.

[4]Rubin DB. Multiple Imputation for Nonresponse in Surveys. New York: Wiley; 1987

See Also

uc_data_transform

Examples

##an example with more potential event case
##data_orig was created as keeping the event with largest weights for individuals
df_x<-data_sim(n=500,0.8,haz_c=0.5/365)
data_intrim<-uc_data_transform(data=df_x,
                               var_list=c("id_long","trt_long"),
                               var_list_new=c("id","trt"),
                               time="time_long",
                               prob="prob_long")
df_y<-data_sim2(data_list=data_intrim,covariates=c("trt"),percentage=1)
data_orig<-df_y[df_y$prob==0|df_y$prob==1,]
data_orig<-data_orig[!duplicated(data_orig$id),]
data_orig$cens<-data_orig$prob


##weighted estimation
KM_res<-KMMI(data_list=data_intrim,nMI=NULL,covariates=c("trt"),plot=TRUE,data_orig=NULL)

##MI estimation
KMMI(data_list=data_intrim,nMI=1000,covariates=c("trt"),plot=TRUE,data_orig=NULL)

data_intrim2<-uc_data_transform(data=df_y, var_list=c("id","trt"),
                               var_list_new=NULL,time="time", prob="prob")

KMMI(data_list=data_intrim2,nMI=1000,covariates=c("trt"),plot=TRUE,data_orig=data_orig,
time_var=c("time"),event_var=c("cens"))


[Package SurvMI version 0.1.0 Index]