Predicts according to the fitted SurvCART or LongCART tree
Predicts according to the fitted SurvCART or LongCART tree
Predicts according to the fitted SurvCART or LongCART tree.
## S3 method for class 'SurvCART'predict(object, newdata,...)## S3 method for class 'LongCART'predict(object, newdata, patid,...)
Arguments
object: a fitted object of class "SurvCART", containing a survival tree, or class "LongCART", containing a longitudinal tree.
newdata: The dataset for prediction.
patid: Variable name containing patient id in the new dataset. Must for prediction based on LongCART object
...: Please disregard.
Details
For prediction based on "SurvCART" algorithm, the predicted dataset includes the terminal node id the observation belongs to, and the median event and censoring times of the terminal id.
For prediction based on "LongCART" algorithm, the predicted dataset includes the terminal node id the observation belongs to, the fitted profile, and the predicted value based on the fitted profile. Note that the predicted value does not consider the random effects.
Returns
For prediction based on "SurvCART" algorithm, the dataset adds to the following variables in the new dataset: - node: Terminal node id the observation belongs to
median.T: Median event time of the terminal node id the observation belongs to
median.C: Median censoring time of the terminal node id the observation belongs to
Q1.T: First quartile for event time of the terminal node id the observation belongs to
Q1.C: First quartile for censoring time of the terminal node id the observation belongs to
Q3.T: Third quartile for event time of the terminal node id the observation belongs to
Q3.C: Third quartile for censoring time of the terminal node id the observation belongs to
For prediction based on LongCART algorithm, the dataset adds to the following variables in the new dataset: - node.id: Terminal node id the observation belongs to
profile: The fitted profile of the terminal node id the observation belongs to
predval: predicted value based on the fitted profile profile
Kundu, M. G., and Harezlak, J. (2019). Regression trees for longitudinal data with baseline covariates. Biostatistics & Epidemiology, 3(1):1-22.
Kundu, M. G., and Ghosh, S. (2021). Survival trees based on heterogeneity in time-to-event and censoring distributions using parameter instability test. Statistical Analysis and Data Mining: The ASA Data Science Journal, 14(5), 466-483.