| predict_frailty | R Documentation |
Computes survival probabilities, hazard rates, median survival times, expected survival times,
risk scores, marginal survival curves, or future survival forecasts for a fitted multifrailty model.
predict_frailty(
fit,
newdata = NULL,
newtime = NULL,
type = c("survival", "hazard", "median", "expected", "risk", "marginal", "forecast"),
window = NULL
)
fit |
A fitted object of class |
newdata |
Optional data frame of new covariate values. If NULL, uses training data. |
newtime |
Optional vector of evaluation time points. If NULL, uses default grid. |
type |
Type of prediction: |
window |
Optional forecast window or horizon parameter. |
Vector or matrix of predictions depending on type.
Pandey, A., Hanagal, D. D., & Tyagi, S. (2022). Shared Frailty Models Based on Cancer Data. International Journal of Statistics and Reliability Engineering, 9(3), 461-474.
Pandey, A., & Tyagi, S. (2021). Comparison of Multiplicative Frailty Models Under Weibull Baseline Distribution. Lobachevskii Journal of Mathematics, 42(13), 3184-3195.
set.seed(123)
dat <- r_frailty(n = 60, baseline = "weibull", bpar = c(2, 1.5), frailty = "gamma", fpar = c(0.8))
fit <- fit_frailty(time = dat$time, status = dat$status, baseline = "weibull", frailty = "gamma")
pred_surv <- predict_frailty(fit, type = "survival", newtime = c(1, 2, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.