hazard_elife | R Documentation |
This function computes the hazard for different elife
parametric
models with profile-likelihood based confidence intervals.
It is also used to provide local hazard plots at varying thresholds.
hazard_elife(
x,
time,
time2 = NULL,
event = NULL,
status = NULL,
thresh = 0,
ltrunc = NULL,
rtrunc = NULL,
type = c("right", "left", "interval", "interval2"),
family = c("exp", "gp", "gomp", "weibull", "extgp"),
weights = rep(1, length(time)),
level = 0.95,
psi = NULL,
plot = FALSE,
arguments = NULL,
...
)
x |
value of the threshold exceedance at which to estimate the hazard |
time |
excess time of the event of follow-up time, depending on the value of event |
time2 |
ending excess time of the interval for interval censored data only. |
event |
status indicator, normally 0=alive, 1=dead. Other choices are |
status |
integer vector giving status of an observation. If |
thresh |
vector of thresholds |
ltrunc |
lower truncation limit, default to |
rtrunc |
upper truncation limit, default to |
type |
character string specifying the type of censoring. Possible values are " |
family |
string; choice of parametric family |
weights |
weights for observations |
level |
numeric; the level for the confidence intervals. Default to 0.95 |
psi |
optional vector of hazard at which to compute the profile log likelihood |
plot |
logical; if true, display the profile log-likelihood. Default to |
arguments |
a named list specifying default arguments of the function that are common to all |
... |
additional arguments for optimization, currently ignored. |
an invisible object of class elife_hazard
containing information about the profile likelihood
n <- 2500
time <- samp_elife(n = n, scale = 2,
family = "gp", shape = 0.1,
lower = ltrunc <- runif(n),
upper = rtrunc <- (5 + runif(n)), type2 = "ltrt")
hazard_elife(x = 2, time = time,
ltrunc = ltrunc, rtrunc = rtrunc, family = "exp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.