Calculate predicted hazard
a fitted gam
object as produced by gam()
.
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}
.
Further arguments passed to predict.gam
and
get_hazard
A data frame with number of rows equal to nrow(newdata)
or
one, or a named list with (partial) covariate specifications. See examples.
logical
. Indicates if confidence intervals should be
calculated. Defaults to TRUE
.
Either "response"
or "link"
. The former calculates
hazard, the latter the log-hazard.
The method by which standard errors/confidence intervals
will be calculated. Default transforms the linear predictor at
respective intervals. "delta"
calculates CIs based on the standard
error calculated by the Delta method. "sim"
draws the
property of interest from its posterior based on the normal distribution of
the estimated coefficients. See here
for details and empirical evaluation.
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.
Factor by which standard errors are multiplied for calculating the confidence intervals.