2019-05-31 22:13:24 +00:00
|
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
|
% Please edit documentation in R/cr_naiveConcordance.R
|
|
|
|
|
\name{naiveConcordance}
|
|
|
|
|
\alias{naiveConcordance}
|
|
|
|
|
\title{Naive Concordance}
|
|
|
|
|
\usage{
|
|
|
|
|
naiveConcordance(responses, predictedMortalities)
|
|
|
|
|
}
|
|
|
|
|
\arguments{
|
|
|
|
|
\item{responses}{A list of responses corresponding to the provided
|
|
|
|
|
mortalities; use \code{\link{CR_Response}}.}
|
|
|
|
|
|
|
|
|
|
\item{predictedMortalities}{A list of mortality vectors; each element of the
|
|
|
|
|
list should correspond to one of the events in the order of event 1 to J,
|
|
|
|
|
and should be a vector of the same length as responses.}
|
|
|
|
|
}
|
|
|
|
|
\value{
|
|
|
|
|
A vector of 1 minus the concordance scores, with each element
|
|
|
|
|
corresponding to one of the events. To be clear, the lower the score the
|
|
|
|
|
more accurate the model was.
|
|
|
|
|
}
|
|
|
|
|
\description{
|
|
|
|
|
Used to calculate a concordance index error. The user needs to supply a list
|
2019-06-06 22:53:25 +00:00
|
|
|
|
of mortalities, with each item in the list being a vector for the
|
|
|
|
|
corresponding event. To calculate mortalities a user should look to
|
2019-05-31 22:13:24 +00:00
|
|
|
|
\code{\link{extractMortalities}}.
|
|
|
|
|
}
|
2019-06-06 22:53:25 +00:00
|
|
|
|
\examples{
|
|
|
|
|
data <- data.frame(delta=c(1,1,0,0,2,2), T=1:6, x=1:6)
|
|
|
|
|
|
|
|
|
|
model <- train(CR_Response(delta, T) ~ x, data, ntree=100, numberOfSplits=0, mtry=1, nodeSize=1)
|
|
|
|
|
|
|
|
|
|
newData <- data.frame(delta=c(1,0,2,1,0,2), T=1:6, x=1:6)
|
|
|
|
|
predictions <- predict(model, newData)
|
|
|
|
|
|
|
|
|
|
mortalities <- list(
|
|
|
|
|
extractMortalities(predictions, 1, 6),
|
|
|
|
|
extractMortalities(predictions, 2, 6)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
naiveConcordance(CR_Response(newData$delta, newData$T), mortalities)
|
|
|
|
|
|
|
|
|
|
}
|
2019-07-22 18:41:25 +00:00
|
|
|
|
\references{
|
|
|
|
|
Section 3.2 of Wolbers, Marcel, Paul Blanche, Michael T. Koller,
|
|
|
|
|
Jacqueline C M Witteman, and Thomas A Gerds. 2014. “Concordance for
|
|
|
|
|
Prognostic Models with Competing Risks.” Biostatistics 15 (3): 526–39.
|
|
|
|
|
https://doi.org/10.1093/biostatistics/kxt059.
|
|
|
|
|
}
|