Currently supported distributions choices are "exponential", "weibull", "gamma",
"lnorm", "loglogistic" and "generalgamma" (i.e. generalized gamma distribution).
The logPriorFxn
should take in the a vector of values corresponding to all
the parameters of the model (baseline parameters first, regression parameters second) and returns the
log prior, calculated up to an additive constant. Default behavior is to use a flat prior.
See examples for an example of using the log prior function.
Sampling is done by a single MH block updater on all the parameters.
See ?bayesControls
for more details.
Response variable should either be of the form cbind(l, u)
or Surv(l, u, type = 'interval2')
,
where l
and u
are the lower and upper ends of the interval known to contain the event of interest.
Uncensored data can be included by setting l == u
, right censored data can be included by setting
u == Inf
or u == NA
and left censored data can be included by setting l == 0
.
Does not allow uncensored data points at t = 0 (i.e. l == u == 0
), as this will
lead to a degenerate estimator for most parametric families. Unlike the current implementation
of survival's survreg
, does allow left side of intervals of positive length to 0 and
right side to be Inf
.
In regards to weights, they are not standardized. This means that if weight[i] = 2,
this is the equivalent to having two observations with the same values as subject i.
For numeric stability, if abs(right - left) < 10^-6, observation are considered
uncensored rather than interval censored with an extremely small interval.