Series System Distributions from Dynamic Failure Rate Components
serieshaz 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:
\[h_{sys}(t) = \sum_{j=1}^{m} h_j(t, \theta_j)\]
The resulting object inherits from dfr_dist, so all
existing methods — hazard, survival, CDF, density, sampling,
log-likelihood, and MLE fitting — work automatically.
Install from r-universe:
install.packages("serieshaz", repos = "https://queelius.r-universe.dev")library(serieshaz)
# 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.005460dfr_dist
objects (Weibull, exponential, Gompertz, log-logistic, custom) into
series systemsfit()ncomponents(),
component(), param_layout(),
component_hazard(), sample_components()serieshaz builds on:
vignette("series-overview") — Package overview and
quick startvignette("series-math") — Mathematical foundationsvignette("series-fitting") — MLE fitting and
inferencevignette("series-advanced") — Advanced composition
patterns