R package dfr.dist
: dynamic failure rate (DFR) distributions
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)
.
Installation
You can install the development version of dfr.dist
from GitHub repo with:
# install.packages("devtools")
devtools::install_github("queelius/dfr_dist")
Usage
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:
[ \lim_{t \to \infty} H(t, x_1, \ldots, x_p) = \infty, ](https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D&space;%5Cbg_white&space;%0A%20%5Clim_%7Bt%20%5Cto%20%5Cinfty%7D%20H%28t%2C%20x_1%2C%20%5Cldots%2C%20x_p%29%20%3D%20%5Cinfty%2C%0A%20%20 " \lim_{t \to \infty} H(t, x_1, \ldots, x_p) = \infty, ")
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.