predict.aftree {nftbart} | R Documentation |
Estimating the survival and the hazard for AFT BART models.
Description
The function predict.aftree()
is provided for
performing posterior inference via test data set estimates
stored in a aftree
object returned from AFTree()
in a similar
fashion as that of predict.nft
. N.B.
the x.test
matrix must be provided on the AFTree()
function call. Here we are only calculating the survival function
by default, and, if requested, the hazard as well.
Usage
## S3 method for class 'aftree'
predict(
## data
object,
## predictions
events=NULL,
FPD=FALSE,
probs=c(0.025, 0.975),
take.logs=TRUE,
seed=NULL,
## default settings
ndpost=nrow(object$mix.prop),
nclust=ncol(object$mix.prop),
## etc.
...)
Arguments
object |
Object of type |
events |
You must specify a grid of time-points; however, they can be a matrix with rows for each subject. |
FPD |
Whether to yield the usual predictions or marginal predictions calculated by the partial dependence function. |
probs |
A vector of length two containing the lower and upper quantiles to be calculated for the predictions. |
take.logs |
Whether or not to take logarithms. |
seed |
If provided, then this value is used to generate random natural logarithms of event times from the predictive distribution. |
ndpost |
The number of MCMC samples generated. |
nclust |
The number of DPM clusters generated. |
... |
The et cetera objects passed to the |
Details
Returns a list with the following entries. If
hazard=TRUE
is specified, then a similar set of
entries for the hazard are produced.
Value
surv.fpd |
Survival function posterior draws on a grid of time-points by the partial dependence function when requested. |
surv.fpd.mean |
Survival function estimates on a grid of time-points by the partial dependence function when requested. |
surv.fpd.lower |
Survival function lower quantiles on a grid of time-points by the partial dependence function when requested. |
surv.fpd.upper |
Survival function upper quantiles on a grid of time-points by the partial dependence function when requested. |
Author(s)
Rodney Sparapani: rsparapa@mcw.edu