Compute survival curves for a fitted spbp model.
Arguments
- formula
An object of class
"spbp"returned byspbp.- newdata
Optional data frame used to obtain survival curves for specific covariate values.
- times
Optional numeric vector of time points at which to return estimates.
- se.fit
Logical; if
TRUE, compute standard errors.- interval
Confidence level for intervals (e.g.
0.95).- type
Character; confidence interval transformation. One of
"log","log-log", or"plain".- ...
Further arguments (currently ignored or reserved for future use).
Examples
library(spsurv)
data(veteran, package = "survival")
#> Warning: data set ‘veteran’ not found
fit <- bpph(Surv(time, status) ~ karno + factor(celltype), data = veteran)
#> Priors are ignored because the MLE approach is used.
survfit(fit)
#> Call: survfit.spbp(formula = fit)
#>
#> n events median 0.95LCL 0.95UCL
#> [1,] 137 128 73 1 NA