CoxWeights            package:risksetROC            R Documentation

_I_n_c_i_d_e_n_t/_D_y_n_a_m_i_c (_I/_D) _R_O_C _c_u_r_v_e, _A_U_C _a_n_d _i_n_t_e_g_r_a_t_e_d _A_U_C (_i_A_U_C)
_e_s_t_i_m_a_t_i_o_n _o_f _c_e_n_s_o_r_e_d _s_u_r_v_i_v_a_l _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     This function estimates of TP and FP based on a Cox model as
     discussed in Heagerty and Zheng, 2005, for incident/dynamic ROC
     curve. TP is estimated as Equation (1) and FP is estimated as
     Equation (2) of the paper.

_U_s_a_g_e:

     CoxWeights(marker, Stime, status, predict.time, entry)

_A_r_g_u_m_e_n_t_s:

  marker: estimated linear predictor from a set of covariates. Note
          that this linear predictor can be obtained from any model.

   Stime: For right censored data, this is the follow up time. For left
          truncated data, this is the ending time for the interval.

  status: Indicator of status, 1 if death or event, 0 otherwise.

predict.time: Time point of the ROC curve.

   entry: For left truncated data, this is the entry time of the
          interval. The default is set to \it{NULL} for right censored
          data.

_D_e_t_a_i_l_s:

     Suppose we have censored survival data (right censored or both
     left-truncated and right censored data) along with a marker value
     and  we want to see how well the marker predicts the  survival
     time for the subjects in the dataset using Incident/dynamic
     definition of ROC curve. In particular, suppose we have survival
     times in days and  we want to see how well the marker predicts the
     one-year survival (predict.time=365 days). This function
     CoxWeights(), returns the unique marker values, TP (True
     Positive), FP (False Positive)  and AUC (Area under (ROC) curve)
     corresponding to the  time point of interest (predict.time). Note
     that the linear predictor _marker_ can be obtained from any model,
     specifically, the survival model may be based on either a PH or a
     time-varying Cox model.

_V_a_l_u_e:

     Returns a list of the following items: 

     eta: unique marker values for calculation of TP and FP

      TP: True Positive values corresponding to unique marker values

      FP: False Positive values corresponding to unique marker values

     AUC: Area Under (ROC) Curve at time predict.time

_A_u_t_h_o_r(_s):

     Patrick J. Heagerty

_R_e_f_e_r_e_n_c_e_s:

     Heagerty, P.J., Zheng Y. (2005) Survival Model Predictive Accuracy
     and ROC curves _Biometrics_, *61*, 92 - 105

_E_x_a_m_p_l_e_s:

     library(MASS)
     data(VA)
     survival.time <- VA$stime
     survival.status <- VA$status
     score <- VA$Karn
     cell.type <- factor(VA$cell )
     tx <- as.integer( VA$treat==1 )
     age <- VA$age
     survival.status[VA$stime > 500 ] <- 0
     survival.time[VA$stime > 500 ] <- 500
     library(survival)
     fit0 <- coxph( Surv(survival.time,survival.status)
             ~ score + cell.type + tx + age, na.action=na.omit )
     summary(fit0)
     eta <- fit0$linear.predictor
     AUC <- NULL
     out <- CoxWeights(marker=eta, Stime=survival.time, status=survival.status,
     predict.time=30)
     ## to see how well the marker predicts one-month survival
     AUC <- out$AUC

