hazsurv {GJRM} | R Documentation |
Post-estimation calculation of hazard, cumulative hazard and survival functions
Description
This function produces estimated values, intervals and plots for the hazard, cumulative hazard and survival functions.
Usage
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, ...)
Arguments
x |
A fitted |
eq |
Equation number. This can be ignored for univariate models. |
newdata |
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. |
type |
Either |
t.range |
Time variable range. This must be a vector with only two elements: the minimum and maximum of the time range. If |
t.vec |
Vector of time values. This can also be a single time. Note you cannot provide both |
intervals |
If |
n.sim |
Number of simulated coefficient vectors from the posterior distribution of the estimated model parameters. This is used for interval calculations. |
prob.lev |
Overall probability of the left and right tails of the probabilities' distributions used for interval calculations. |
shade |
If |
bars |
If |
ylim , ylab , xlab , pch |
Usual plot arguments. |
ls |
Length of sequence to use for time variable. |
baseline |
If baseline is desired; this will set all covariate/smooth effects to zero. |
min.dn , min.pr , max.pr |
Allowed minimum and maximum for estimated probabities and densities for survival, hazard and cumulative hazard calculations. |
plot.out |
If |
print.progress |
If |
... |
Other arguments to pass to plot. |
Value
It produces estimated values, intervals and plots for the hazard, cumulative hazard and survival functions.
Author(s)
Maintainer: Giampiero Marra giampiero.marra@ucl.ac.uk