predict.DStreebag: Prediction from bagged Discrete-Time Survival Trees

Description Usage Arguments Value References Examples

View source: R/DStreebag.predict.R

Description

Predict the median survival time, hazard and survival probabilities from a DStreebag object.

Usage

1
2
## S3 method for class 'DStreebag'
predict(object, data, ...)

Arguments

object

a fitted object of class DStreebag

data

data frame containing the values at which predictions are required. The predictors referred to in the right side of formula(object) as well as the 'status' variable must be present by name in newdata.

...

further arguments passed to or from other methods.

Value

A named list with the following elements: The vector MedSurv contains the predicted median survival times of the observations in data. The matrices Surv and Haz contain the predicted probabilities and hazard rates, respectively, where each row refers to an individual and each column refers to an observed time point (1,2,...).

References

Bou-Hamad I., Larocque D.,Ben-Ameur H., Masse L. C., Vitaro F. and Tremblay R. E. (2009), Discrete-Time Survival Trees. Canadian Journal of Statistics 37 (1), 17-32.

Hothorn T., Lausen B., Benner A. and Radespiel-Troeger M. (2004), Bagging Survival Trees. Statistics in Medicine 23 (1), 77-91.

Examples

1
2
3
4
5
6
7
8
data(cost)
## Discretize observed days to years
d.cost<-dis.cost(cost)

# Bagging Tree
bag <- bag(time~prevStroke+age+sex+alcohol+smoke,status="status",data=d.cost[1:330,],nBoot=10)
pred <- predict(bag,newdata=d.cost[331:518,])
pred$MedSurv

DStree documentation built on May 2, 2019, 3:37 p.m.