Description Usage Arguments Value See Also Examples
View source: R/predict.ICcforest.R
Compute predictions from ICcforest objects.
1 2 3 4 5 6 7 8 9 10 11 12 |
object |
an object as returned by |
newdata |
an optional data frame containing test data. |
OOB |
a logical specifying whether out-of-bag predictions are desired (only if |
suppress |
a logical specifying whether the messages from |
type |
a character string denoting the type of predicted value returned. For |
FUN |
a function to compute summary statistics. Predictions for each node must be
computed based on arguments |
simplify |
a logical indicating whether the resulting list of predictions should be
converted to a suitable vector or matrix (if possible), see |
scale |
a logical indicating scaling of the nearest neighbor weights by the sum of weights
in the corresponding terminal node of each tree, see |
... |
additional arguments. |
An object of class ICcforest
, as a subclass of cforest
.
sbrier_IC
for evaluation of model fit for interval-censored data
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(icenReg)
data(miceData)
## For ICcforest to run, Inf should be set to be a large number, for example, 9999999.
miceData$u[miceData$u == Inf] <- 9999999.
## First, fit an iterval-censored conditional inference forest
Cforest <- ICcforest(formula = Surv(l,u,type="interval2")~grp, data = miceData)
## Predict the survival function constructed using the non-parametric maximum likelihood estimator
Pred <- predict(Cforest, type = "prob")
## Out-of-bag prediction of the median survival time
PredOOB <- predict(Cforest, type = "response", OOB = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.