An R package for working with models in survival analysis in which the
distribution is parameterized by a very flexible failure rate function
(any function that satisfies properties like being non-negative,
integrating to infinity over the domain, and having a support of (0, Inf)
.
You can install the development version of dfr.dist
from GitHub repo
with:
# install.packages("devtools")
devtools::install_github("queelius/dfr_dist")
The R packge dfr_dist
provides an API for specifying and estimating
dynamic failure rate distributions. They can depend on the data in any
way, as the failure rate is any function of time and any set of
predictors, as long as the failure rate satsifies two key properties:
-
It’s non-negative. It is not meaningful to have a negative failure rate; the failure rate can decrease some times, and even go to , though.
-
At the limit as goes to infinity, the cumulative hazard also goes to infinity:
where . If this constraint isn’t satisfied, then the survival function is not well-defined, since it is defined as .
The dfr_dist
object satisfies all of the requirements of an algebraic
distribution (see algebraic.dist
) and a likelihoood model (see
likelihood.model
).
The package is designed to be used with the algebraic.mle
package,
which provides a framework for performing maximum likelihood estimation
(MLE).
A vignette showing how to use it is here.