Learn R Programming

longevity (version 1.2.1)

fit_ditrunc_elife: Fit excess lifetime models for doubly interval truncated data

Description

This function is a wrapper around constrained optimization routines for different models with non-informative censoring and truncation patterns.

Usage

fit_ditrunc_elife(
  time,
  ltrunc1 = NULL,
  rtrunc1 = NULL,
  ltrunc2 = NULL,
  rtrunc2 = NULL,
  thresh = 0,
  family = c("exp", "gp", "gomp", "gompmake", "weibull", "extgp", "gppiece",
    "extweibull", "perks", "beard", "perksmake", "beardmake"),
  weights = NULL,
  export = FALSE,
  start = NULL,
  restart = FALSE,
  arguments = NULL,
  ...
)

Value

an object of class elife_par

Arguments

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

thresh

vector of thresholds

family

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

weights

weights for observations

export

logical; should data be included in the returned object to produce diagnostic plots? Default to FALSE.

start

vector of starting values for the optimization routine. If NULL, the algorithm attempts to find default values and returns a warning with false convergence diagnostic if it cannot.

restart

logical; should multiple starting values be attempted? Default to FALSE.

arguments

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

...

additional arguments for optimization, currently ignored.