lpost_elife {longevity}R Documentation

Log posterior distribution with MDI priors

Description

Log of the posterior distribution for excess lifetime distribution with maximal data information priors.

Usage

lpost_elife(
  par,
  time,
  time2 = NULL,
  event = NULL,
  type = c("right", "left", "interval", "interval2"),
  ltrunc = NULL,
  rtrunc = NULL,
  family = c("exp", "gp", "gomp"),
  thresh = 0,
  weights = rep(1, length(time)),
  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 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.

type

character string specifying the type of censoring. Possible values are "right", "left", "interval", "interval2".

ltrunc

lower truncation limit, default to NULL

rtrunc

upper truncation limit, default to NULL

family

string; choice of parametric family

thresh

vector of thresholds

weights

weights for observations

status

integer vector giving status of an observation. If NULL (default), this argument is computed internally based on type.

arguments

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

...

additional arguments for optimization, currently ignored.

Value

a vector proportional to the log posterior (the sum of the log likelihood and log prior)


[Package longevity version 1.1.1 Index]