risksetAUC            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 creates risksetAUC from a survival data set

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

     risksetAUC(Stime, entry=NULL, status, marker, method="Cox",
                            span=NULL, order=1, window="asymmetric",
                            tmax, weight="rescale", plot=TRUE, type="l",
                            xlab="Time", ylab="AUC", ...)  

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

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

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

  status: survival status, 1 if had an event and 0 otherwise

  marker: marker

  method: either of "Cox", "LocalCox" and "Schoenfeld", default is
          "Cox"

    span: bandwidth parameter that controls the size of a local
          neighborhood, needed for _method="LocalCox"_ or
          _method="Schoenfeld"_

   order: 0 or 1, locally mean if 0 and local linear if 1, needed for
          method="Schoenfeld", default is 1

  window: either of "asymmetric" or "symmetric", default is asymmetric,
          needed for method="LocalCox"

    tmax: maximum time to be considered for calculation of AUC

  weight: either of "rescale" or "conditional". If _weight="rescale"_,
          then weights are rescaled so that the sum is unity. If
          _weight="conditional"_ both the event times are assumed to be
          less than _tmax_

    plot: TRUE or FALSE, default is TRUE

    type: default is "l", can be either of "p" for points, "l" for
          line, "b" for both

    xlab: label for x-axis

    ylab: label for y-axis

     ...: additional plot arguments

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

     This function creates and plots AUC based on incident/dynamic
     definition of Heagerty, et. al. based on a survival data and
     marker values. If proportional hazard is assumed then method="Cox"
     can be used. In case of non-proportional hazard, either of
     "LocalCox" or "Schoenfeld" can be used. These two methods differ
     in how the smoothing is done. If _plot="TRUE"_ then the AUC curve
     is plotted against time (till _tmax+1_). Additional plot arguments
     can be supplied.

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

     Returns a list of the following items: 

  utimes: ordered unique failure times

      St: estimated survival probability at utimes

     AUC: Area under ROC curve at utimes

  Cindex: Cindex

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

     Paramita Saha

_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

_S_e_e _A_l_s_o:

     IntegrateAUC(), weightedKM(), llCoxReg(), SchoenSmooth(),
     CoxWeights()

_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[survival.time>500 ] <- 0
     survival.time[survival.time>500 ] <- 500
     fit0 <- coxph( Surv(survival.time,survival.status)
             ~ score + cell.type + tx + age, na.action=na.omit )
     eta <- fit0$linear.predictor
     tmax=365
     AUC.CC=risksetAUC(Stime=survival.time,
            status=survival.status, marker=eta, method="Cox", tmax=tmax); 

