View source: R/predict.survdnn.R
| predict.survdnn | R Documentation |
Generate predictions from a fitted 'survdnn' model for new data. Supports linear predictors, survival probabilities at specified time points, or cumulative risk estimates.
## S3 method for class 'survdnn'
predict(object, newdata, times = NULL, type = c("survival", "lp", "risk"), ...)
object |
An object of class '"survdnn"' returned by [survdnn()]. |
newdata |
A data frame of new observations to predict on. |
times |
Numeric vector of time points at which to compute survival or risk probabilities. Required if 'type = "survival"' or 'type = "risk"' for Cox/AFT models. For CoxTime, 'times = NULL' is allowed when 'type="survival"' and defaults to event times. |
type |
Character string specifying the type of prediction to return:
|
... |
Currently ignored (for future extensions). |
A numeric vector (if 'type = "lp"' or '"risk"'), or a data frame (if 'type = "survival"') with one row per observation and one column per 'times'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.