nll_ditrunc_elife: Likelihood for doubly interval truncated data

View source: R/doubletruncation.R

nll_ditrunc_elifeR Documentation

Likelihood for doubly interval 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_ditrunc_elife(
  par,
  time,
  ltrunc1 = NULL,
  rtrunc1 = NULL,
  ltrunc2 = NULL,
  rtrunc2 = NULL,
  family = c("exp", "gp", "gomp", "gompmake", "weibull", "extgp", "gppiece",
    "extweibull", "perks", "beard", "perksmake", "beardmake"),
  thresh = 0,
  weights = rep(1, length(time)),
  arguments = NULL,
  ...
)

Arguments

par

vector of parameters

time

excess time of the event of follow-up time, depending on the value of event

ltrunc1

lower truncation limit, default to NULL

rtrunc1

upper truncation limit, default to NULL

ltrunc2

lower truncation limit, default to NULL

rtrunc2

upper truncation limit, default to NULL

family

string; choice of parametric family, either exponential (exp), Weibull (weibull), generalized Pareto (gp), Gompertz (gomp), Gompertz-Makeham (gompmake) or extended generalized Pareto (extgp).

thresh

vector of thresholds

weights

weights for observations

arguments

a named list specifying default arguments of the function that are common to all elife calls

...

additional arguments for optimization, currently ignored.

Value

log-likelihood value


longevity documentation built on Nov. 12, 2023, 5:07 p.m.