active
library
dfr.dist.series
Series system distributions from dynamic failure rate components
Resources & Distribution
Source Code
Package Registries
dfr.dist.series
Series System Distributions from Dynamic Failure Rate Components
dfr.dist.series composes multiple dfr_dist objects into a series
system distribution. A series system fails when any component fails,
so the system hazard is the sum of component hazards:
The resulting object inherits from dfr_dist, so all existing methods —
hazard, survival, CDF, density, sampling, log-likelihood, and MLE
fitting — work automatically.
Installation
Install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("queelius/dfr.dist.series")
Quick Start
library(dfr.dist.series)
# Three-component server with different failure modes
server <- dfr_dist_series(list(
dfr_weibull(shape = 2, scale = 500), # disk wear-out
dfr_exponential(0.001), # random memory failure
dfr_gompertz(a = 0.0001, b = 0.02) # PSU degradation
))
# Evaluate system hazard and survival
h <- hazard(server)
S <- surv(server)
h(100) # system hazard at t = 100
#> [1] 0.002538906
S(100) # probability of surviving past t = 100
#> [1] 0.8420252
# Sample system lifetimes
set.seed(42)
samp <- sampler(server)
times <- samp(5)
times
#> [1] 294.9884 302.0998 150.3888 274.2224 236.8369
# Introspect: which component contributes most at t = 200?
for (j in 1:ncomponents(server)) {
hj <- component_hazard(server, j)
cat(sprintf("Component %d hazard at t=200: %.6f\n", j, hj(200)))
}
#> Component 1 hazard at t=200: 0.001600
#> Component 2 hazard at t=200: 0.001000
#> Component 3 hazard at t=200: 0.005460
Key Features
- Composition: Combine any
dfr_distobjects (Weibull, exponential, Gompertz, log-logistic, custom) into series systems - Full interface: All distribution methods (hazard, survival, CDF, density, quantile, sampling) work out of the box
- MLE fitting: Fit series system parameters to observed failure data
with
fit() - Introspection:
ncomponents(),component(),param_layout(),component_hazard(),sample_components() - Nesting: Series systems can be nested as components of larger series systems
- Analytical cumulative hazard: When all components provide closed-form cumulative hazard, the series system does too
Ecosystem
dfr.dist.series builds on:
- algebraic.dist — Base distribution generics
- likelihood.model — Statistical inference generics
- dfr.dist — Dynamic failure rate distributions
Documentation
vignette("series-overview")— Package overview and quick startvignette("series-math")— Mathematical foundationsvignette("series-fitting")— MLE fitting and inferencevignette("series-advanced")— Advanced composition patterns