wei.series.md.c1.c2.c3
Weibull series system estimation from data with censored lifetimes and masked component cause of failure.
Resources & Distribution
Source Code
Package Registries
R package: wei.series.md.c1.c2.c3
A likelihood model for series systems with Weibull component lifetimes. Accounts for right-censoring and candidate sets indicative of masked failure causes.
Related Publication
This package was developed to support the research presented in:
Towell, A. (2023). Reliability Estimation in Series Systems: Maximum Likelihood Techniques for Right-Censored and Masked Failure Data. Master’s Project, Southern Illinois University Edwardsville.
- Paper Repository: github.com/queelius/reliability-estimation-in-series-systems
- PDF: AlexTowellPaper.pdf
Abstract
This paper investigates maximum likelihood techniques to estimate component reliability from masked failure data in series systems. A likelihood model accounts for right-censoring and candidate sets indicative of masked failure causes. Extensive simulation studies assess the accuracy and precision of maximum likelihood estimates under varying sample size, masking probability, and right-censoring time for components with Weibull lifetimes. The studies specifically examine the accuracy and precision of estimates, along with the coverage probability and width of BCa confidence intervals. Despite significant masking and censoring, the maximum likelihood estimator demonstrates good overall performance. The bootstrap yields correctly specified confidence intervals even for small sample sizes.
Citation
If you use this package in your research, please cite:
@mastersthesis{towell2023reliability,
author = {Towell, Alexander},
title = {Reliability Estimation in Series Systems: Maximum Likelihood Techniques for Right-Censored and Masked Failure Data},
school = {Southern Illinois University Edwardsville},
year = {2023},
type = {Master's Project}
}
Installation
You can install the development version of wei.series.md.c1.c2.c3 from
GitHub with:
# install.packages("devtools")
#devtools::install_github("queelius/wei.series.md.c1.c2.c3")
library(algebraic.dist)
#> Registered S3 method overwritten by 'algebraic.dist':
#> method from
#> print.dist stats
library(algebraic.mle)
library(wei.series.md.c1.c2.c3)
Examples
# fit the model
fit <- mle_numerical(mle_lbfgsb_wei_series_md_c1_c2_c3(
df = guo_weibull_series_md$data,
theta0 = c(1,1,1,1,1,1),
control = list(
maxit = 1000L,
parscale = c(1, 1000, 1, 1000, 1, 1000))))
cbind(confint(fit),
"fit" = params(fit),
"guo mle" = guo_weibull_series_md$mle)
#> 2.5% 97.5% fit guo mle
#> param1 0.5736164 1.941626 1.257621 1.2576
#> param2 352.9027030 1635.838014 994.370358 994.3661
#> param3 0.5633925 1.763536 1.163464 1.1635
#> param4 310.1187793 1507.798853 908.958816 908.9458
#> param5 0.6054160 1.656147 1.130782 1.1308
#> param6 322.5652746 1357.623486 840.094380 840.1141
# log-likelihood
c("guo log-like" = guo_weibull_series_md$loglike, "fit log-like" = loglik_val(fit))
#> guo log-like fit log-like
#> -228.6851 -228.6851
We see that they are approximately the same MLE fits.
shapes <- params(fit)[seq(1, length(params(fit)), 2)]
scales <- params(fit)[seq(2, length(params(fit)), 2)]
data.frame(
"Component Cause" = wei_series_cause(1L:3L, shapes = shapes, scales = scales),
"Component MTTF" = wei_mttf(shape = shapes, scale = scales))
#> Component.Cause Component.MTTF
#> 1 0.2862058 924.8697
#> 2 0.3376112 862.1766
#> 3 0.3761829 803.5490
cat("System MTTF: ", wei_series_mttf(shapes = shapes, scales = scales))
#> System MTTF: 339.3773
(tq <- qwei_series(p = .825, shapes = shapes, scales = scales))
#> [1] 575.704
surv_wei_series(t = tq, shapes = shapes, scales = scales)
#> [1] 0.175
rwei_series(10L, shapes =shapes, scales = scales)
#> [1] 308.85201 447.56712 712.79056 395.01525 484.05539 408.41463 322.80853
#> [8] 445.56724 218.89491 40.37571
pwei_series(seq(1, 5, 1), shapes = shapes, scales = scales)
#> [1] 0.001024090 0.002293359 0.003675757 0.005136821 0.006658907
Brief Overview
This package implements a likelihood model for Weibull series systems from masked data, including functions for the log-likelihood, score, and hessian of the log-likelihood. Analytical solutions are provided for the log-likelihood and score functions, while the hessian is computed numerically. The package is designed to handle two types of data: masked component cause of failure data with exact failure time and right-censored system lifetime data.
The masked component data should approximately satisfy certain conditions. The conditions are as follows:
Condition 1
The component cause of failure is in the candidate set.
Condition 2
When we condition on the component cause of failure being any particular cause in the canidate set and and the time of failure, the probability of the given candidate set does not vary as we vary the component cause of failure.
Condition 3
The masking probabilities are independent of the series system lifetime parameter vector.
API
As a loglikelihood model, we provide the following functions:
loglik_wei_series_md_c1_c2_c3for the log-likelihoodscore_wei_series_md_c1_c2_c3for the score functionhessian_wei_series_md_c1_c2_c3for the hessian of the log-likelihood
For convenience, we also provide some wrappers around the optim
function to solve for the maximum likelihood estimates (MLE) of the
shape and scale parameters using the Nelder-Mead and simulated annealing
algorithms:
mle_nelder_wei_series_md_c1_c2_c3for the Nelder-Mead algorithmmle_sann_wei_series_md_c1_c2_c3for the simulated annealing algorithm
Since we base some of our results and analysis on Guo, Szidarovszky, and Niu (2013), we provide the data set from their paper, along with the maximum likelihood estimates of the shape and scale parameters for the Weibull series system. We also provide a function to solve for the MLE using the Nelder-Mead algorithm:
guo_weibull_series_mdfor a model that generates data similar to Guo, Szidarovszky, and Niu (2013)guo_weibull_series_table_2for the data from Table 2 in Guo, Szidarovszky, and Niu (2013)
We also provide a host of supporting functions and data tables, e.g., we provide Weibull series system distribution function that honors the established conventions in R:
dwei_seriesfor the probability density functionpwei_seriesfor the cumulative distribution functionqwei_seriesfor the quantile functionrwei_seriesfor random number generation
We also provide functions to compute the mean time to failure and the component cause of failure for the Weibull series distribution, along with the hazard and survival functions:
wei_series_mttffor the mean time to failurewei_series_causefor the component cause of failurehazard_wei_seriesfor the hazard functionsurv_wei_seriesfor the survival function (this is normally done by passing lower.tail = FALSE topwei_seriesbut we provide a function)
Finally, we also provide some functions for working with the components of the Weibull series system, e.g., we provide a function to compute the hazard function for the Weibull component lifetimes:
hazard_weifor the hazard function of the Weibull component lifetimeswei_mttffor the mean time to failure of the Weibull component lifetimes
Related Resources
Explore related blog posts, projects, and publications