Calculate survival probabilities
get_surv_prob(
newdata,
object,
ci = TRUE,
ci_type = c("default", "delta", "sim"),
se_mult = 2L,
time_var = NULL,
interval_length = "intlen",
nsim = 100L,
...
)
A data frame or list containing the values of the model covariates at which predictions
are required. If this is not provided then predictions corresponding to the
original data are returned. If newdata
is provided then
it should contain all the variables needed for prediction: a
warning is generated if not. See details for use with link{linear.functional.terms}
.
a fitted gam
object as produced by gam()
.
logical
. Indicates if confidence intervals should be
calculated. Defaults to TRUE
.
Factor by which standard errors are multiplied for calculating the confidence intervals.
Name of the variable used for the baseline hazard. If
not given, defaults to "tend"
for gam
fits, else
"interval"
. The latter is assumed to be a factor, the former
numeric.
The variable in newdata containing the interval lengths.
Can be either bare unquoted variable name or character. Defaults to "intlen"
.
Further arguments passed to predict.gam
and
get_hazard