nll_elife {longevity} | R Documentation |
Likelihood for arbitrary censored and truncated data
Description
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.
Usage
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,
...
)
Arguments
par |
vector of parameters, in the following order: scale, rate and shape |
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 |
type |
character string specifying the type of censoring. Possible values are " |
ltrunc |
lower truncation limit, default to |
rtrunc |
upper truncation limit, default to |
family |
string; choice of parametric family |
thresh |
vector of thresholds |
weights |
weights for observations |
status |
integer vector giving status of an observation. If |
arguments |
a named list specifying default arguments of the function that are common to all |
... |
additional arguments for optimization, currently ignored. |
Value
log-likelihood values
Examples
data(ewsim, package = "longevity")
nll_elife(par = c(5, 0.3),
family = "gp",
arguments = ewsim)