Computes the log-likelihood for various parametric models suitable for threshold exceedances. If threshold is non-zero, then only right-censored, observed event time and interval censored data whose timing exceeds the thresholds are kept.
nll_elife(
par,
time,
time2 = NULL,
event = NULL,
type = c("right", "left", "interval", "interval2"),
ltrunc = NULL,
rtrunc = NULL,
family = c("exp", "gp", "gomp", "gompmake", "weibull", "extgp", "gppiece",
"extweibull", "perks", "beard", "perksmake", "beardmake"),
thresh = 0,
weights = NULL,
status = NULL,
arguments = NULL,
...
)
log-likelihood values
vector of parameters, in the following order: scale, rate and shape
excess time of the event of follow-up time, depending on the value of event
ending excess time of the interval for interval censored data only.
status indicator, normally 0=alive, 1=dead. Other choices are TRUE
/FALSE
(TRUE
for death).
For interval censored data, the status indicator is 0=right censored, 1=event at time, 2=left censored, 3=interval censored.
Although unusual, the event indicator can be omitted, in which case all subjects are assumed to have experienced an event.
character string specifying the type of censoring. Possible values are "right
", "left
", "interval
", "interval2
".
lower truncation limit, default to NULL
upper truncation limit, default to NULL
string; choice of parametric family
vector of thresholds
weights for observations
integer vector giving status of an observation. If NULL
(default), this argument is computed internally based on type
.
a named list specifying default arguments of the function that are common to all elife
calls
additional arguments for optimization, currently ignored.
data(ewsim, package = "longevity")
nll_elife(par = c(5, 0.3),
family = "gp",
arguments = ewsim)
Run the code above in your browser using DataLab