fit_ditrunc_elife {longevity}R Documentation

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,
  ...
)

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.

Value

an object of class elife_par

Note

The extended generalized Pareto model is constrained to avoid regions where the likelihood is flat so \xi \in [-1, 10] in the optimization algorithm.

The standard errors are obtained via the observed information matrix, calculated using the hessian. In many instances, such as when the shape parameter is zero or negative, the hessian is singular and no estimates are returned.


[Package longevity version 1.0.0 Index]