This function produces estimated values, intervals and plots for the hazard, cumulative hazard and survival functions.
hazsurv(x, eq, newdata, type = "surv", t.range = NULL, t.vec = NULL,
intervals = TRUE, n.sim = 100, prob.lev = 0.05, shade = FALSE,
bars = FALSE, ylim, ylab, xlab, pch, ls = 100, baseline = FALSE,
min.dn = 1e-200, min.pr = 1e-200, max.pr = 1, plot.out = TRUE,
print.progress = TRUE, ...)
It produces estimated values, intervals and plots for the hazard, cumulative hazard and survival functions.
A fitted gamlss
/gjrm
object.
Equation number. This can be ignored for univariate models.
A data frame or list containing the values of the model covariates at which predictions are required. This must always be provided.
For the individual survival/hazard/cumulative hazard function, the data frame must have one row containing the values of the model covariates corresponding to the individual of interest.
For the (sub-)population survival/hazard/cumulative hazard function, the data frame must have as many rows as there are individuals in the (sub-)population of interest. Each row must contain the values of the model covariates of the corresponding individual.
Either "surv"
, "hazard"
or "cumhaz"
. In the excess hazard setting these are, respectively, the net survival, the excess hazard and the cumulative excess hazard.
Time variable range. This must be a vector with only two elements: the minimum and maximum of the time range. If NULL
then it is determined automatically based on the observed data.
Vector of time values. This can also be a single time. Note you cannot provide both t.range
and t.vec
as they are two mutually exclusive ways of defining the time variable. If NULL
then it is determined automatically based on the observed data.
If TRUE
then intervals are also produced.
Number of simulated coefficient vectors from the posterior distribution of the estimated model parameters. This is used for interval calculations.
Overall probability of the left and right tails of the probabilities' distributions used for interval calculations.
If TRUE
then it produces shaded regions as confidence bands.
If TRUE
then the confidence intervals are plotted as bars rather than continuous curves. If t.vec
is used and only one time value is provided, this is the only possible plotting option for the confidence intervals. Note shade
and bars
are mutually exclusive.
Usual plot arguments.
Length of sequence to use for time variable.
If baseline is desired; this will set all covariate/smooth effects to zero.
Allowed minimum and maximum for estimated probabities and densities for survival, hazard and cumulative hazard calculations.
If FALSE
then the function does not produce a plot. The default is TRUE
.
If FALSE
then the function does not print progress made. The default is TRUE
.
Other arguments to pass to plot.
Maintainer: Giampiero Marra giampiero.marra@ucl.ac.uk