% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CR_Response.R \name{CR_Response} \alias{CR_Response} \title{Competing Risk Response} \usage{ CR_Response(delta, u, C = NULL) } \arguments{ \item{delta}{A vector of integers detailing the event that occurred. A value of 0 denotes that censoring occurred first and that time was recorded.} \item{u}{A numeric vector detailing the recorded event times (possibly censored).} \item{C}{If the censoring times are known for all observations, they can be included which allows for \code{\link{GrayLogRankSplitFinder}} to be used. Default is \code{NULL}.} } \description{ Takes vectors of event time and event type and turns it into the internal objects used throughout the package. The result of this function shouldn't be used directly, but should instead by provided as the \code{y} parameter in \code{\link{train}}. } \details{ To be clear, if T1,...TJ are the J different competing risks, and C is the censoring time, then \code{u[i] = min(T1[i], ...TJ[i], C[i])}; and \code{delta[i]} denotes which time was the minimum, with a value of 0 if C[i] was the smallest. } \examples{ T1 <- rexp(10) T2 <- rweibull(10, 2, 2) C <- rexp(10) u <- pmin(T1, T2, C) delta <- ifelse(u == T1, 1, ifelse(u == T2, 2, 0)) responses <- CR_Response(delta, u) # Then use responses in train or naiveConcordance }