54 lines
2.1 KiB
Text
54 lines
2.1 KiB
Text
|
% Generated by roxygen2: do not edit by hand
|
||
|
% Please edit documentation in R/cr_components.R
|
||
|
\name{CR_FunctionCombiner}
|
||
|
\alias{CR_FunctionCombiner}
|
||
|
\title{Competing Risk Function Combiner}
|
||
|
\usage{
|
||
|
CR_FunctionCombiner(events, times = NULL)
|
||
|
}
|
||
|
\arguments{
|
||
|
\item{events}{A vector of integers specifying which competing risk events's
|
||
|
functions should be processed. This should correspond to all of the
|
||
|
competing risk events that can occur, from 1 to the largest number.}
|
||
|
|
||
|
\item{times}{An optional numeric vector that forces the output functions to
|
||
|
only update at these time points. Pre-specifying the values can result in
|
||
|
faster performance when predicting, however if the times are not exhaustive
|
||
|
then the resulting curves will not update at that point (they'll be flat).
|
||
|
If left blank, the package will default to using all of the time points.}
|
||
|
}
|
||
|
\value{
|
||
|
A response combiner object to be used in \code{\link{train}}; not
|
||
|
useful on its own. However, internally, a response combiner object is a
|
||
|
list consisting of the following objects: \describe{
|
||
|
\item{\code{javaObject}}{The java object used in the algorithm}
|
||
|
\item{\code{call}}{The call (used in \code{print})}
|
||
|
\item{\code{outputClass}}{The R class of the outputs; used in
|
||
|
\code{\link{predict.JRandomForest}}} \item{\code{convertToRFunction}}{An R
|
||
|
function that converts a Java prediction from the combiner into R output
|
||
|
that is readable by a user.} }
|
||
|
}
|
||
|
\description{
|
||
|
Creates a CompetingRiskFunctionCombiner rJava object, which is used
|
||
|
internally for constructing a forest. The forest uses it when creating
|
||
|
predictions to average the cumulative incidence curves, cause-specific
|
||
|
cumulative hazard functions, and Kaplan-Meier curves generated by each tree
|
||
|
into individual functions.
|
||
|
}
|
||
|
\details{
|
||
|
The user only needs to pass this object into \code{\link{train}} as the
|
||
|
\code{forestResponseCombiner} parameter.
|
||
|
}
|
||
|
\examples{
|
||
|
T1 <- rexp(1000)
|
||
|
T2 <- rweibull(1000, 1, 2)
|
||
|
C <- rexp(1000)
|
||
|
|
||
|
u <- round(pmin(T1, T2, C))
|
||
|
# ...
|
||
|
|
||
|
forestCombiner <- CR_FunctionCombiner(1:2) # there are two possible events
|
||
|
# or, since we know that u is always an integer
|
||
|
forestCombiner <- CR_FunctionCombiner(1:2, 0:max(u))
|
||
|
}
|