MyNixOS website logo
Description

Statistical Methods for Life Data Analysis.

Provides statistical methods and visualizations that are often used in reliability engineering. Comprises a compact and easily accessible set of methods and visualization tools that make the examination and adjustment as well as the analysis and interpretation of field data (and bench tests) as simple as possible. Non-parametric estimators like Median Ranks, Kaplan-Meier (Abernethy, 2006, <ISBN:978-0-9653062-3-2>), Johnson (Johnson, 1964, <ISBN:978-0444403223>), and Nelson-Aalen for failure probability estimation within samples that contain failures as well as censored data are included. The package supports methods like Maximum Likelihood and Rank Regression, (Genschel and Meeker, 2010, <DOI:10.1080/08982112.2010.503447>) for the estimation of multiple parametric lifetime distributions, as well as the computation of confidence intervals of quantiles and probabilities using the delta method related to Fisher's confidence intervals (Meeker and Escobar, 1998, <ISBN:9780471673279>) and the beta-binomial confidence bounds. If desired, mixture model analysis can be done with segmented regression and the EM algorithm. Besides the well-known Weibull analysis, the package also contains Monte Carlo methods for the correction and completion of imprecisely recorded or unknown lifetime characteristics. (Verband der Automobilindustrie e.V. (VDA), 2016, <ISSN:0943-9412>). Plots are created statically ('ggplot2') or interactively ('plotly') and can be customized with functions of the respective visualization package. The graphical technique of probability plotting as well as the addition of regression lines and confidence bounds to existing plots are supported.

weibulltools

Lifecycle:stable CRANstatus R-CMD-check

Overview

The {weibulltools} package focuses on statistical methods and visualizations that are often used in reliability engineering. It provides a compact and easily accessible set of methods and visualization tools that make the examination and adjustment as well as the analysis and interpretation of field data (and bench tests) as simple as possible.

Besides the well-known Weibull analysis, the package supports multiple lifetime distributions and also contains Monte Carlo methods for the correction and completion of imprecisely recorded or unknown lifetime characteristics.

Plots are created statically {ggplot2} or interactively {plotly} and can be customized with functions of the respective visualization package.

Installation

The latest released version of {weibulltools} from CRAN can be installed with:

install.packages("weibulltools")

Development version

Install the development version of {weibulltools} from GitHub to use new features or to get a bug fix.

# install.packages("devtools")
devtools::install_github("Tim-TU/weibulltools")

Usage

Getting started

Create consistent reliability data with columns:

  • x - lifetime characteristic
  • status - binary data (0 for censored units and 1 for failed units)
  • id (optional) - identifier for units
library(weibulltools)

rel_tbl <- reliability_data(data = shock, x = distance, status = status)
rel_tbl
#> Reliability Data with characteristic x: 'distance':
#> # A tibble: 38 × 3
#>       x status id   
#>   <int>  <dbl> <chr>
#> 1  6700      1 ID1  
#> 2  6950      0 ID2  
#> 3  7820      0 ID3  
#> 4  8790      0 ID4  
#> 5  9120      1 ID5  
#> # … with 33 more rows

Probability estimation and visualization

Estimation of failure probabilities using different non-parametric methods:

prob_tbl <- estimate_cdf(x = rel_tbl, methods = c("mr", "kaplan", "johnson", "nelson"))
#> The 'mr' method only considers failed units (status == 1) and does not retain intact units (status == 0).
prob_tbl
#> CDF estimation for methods 'mr', 'kaplan', 'johnson', 'nelson':
#> # A tibble: 125 × 6
#>   id        x status  rank   prob cdf_estimation_method
#>   <chr> <int>  <dbl> <dbl>  <dbl> <chr>                
#> 1 ID1    6700      1     1 0.0614 mr                   
#> 2 ID5    9120      1     2 0.149  mr                   
#> 3 ID13  12200      1     3 0.237  mr                   
#> 4 ID15  13150      1     4 0.325  mr                   
#> 5 ID19  14300      1     5 0.412  mr                   
#> # … with 120 more rows

Visualization of the obtained results in a distribution-specific probability plot:

prob_vis <- plot_prob(x = prob_tbl, distribution = "weibull", 
                      title_main = "Weibull Probability Plot", 
                      title_x = "Distance", 
                      title_y = "Probability of Failure in %", 
                      title_trace = "Methods",
                      plot_method = "gg")
prob_vis

Model estimation and visualization

Parametric model estimation with respect to the used methods:

rr_list <- rank_regression(x = prob_tbl, distribution = "weibull")
rr_list
#> List of 4 model estimations:
#> Rank Regression
#> Coefficients:
#>      mu    sigma  
#> 10.2596   0.3632  
#> Method of CDF Estimation: johnson 
#> 
#> Rank Regression
#> Coefficients:
#>      mu    sigma  
#> 10.2333   0.3773  
#> Method of CDF Estimation: kaplan 
#> 
#> Rank Regression
#> Coefficients:
#>     mu   sigma  
#> 9.8859  0.3956  
#> Method of CDF Estimation: mr 
#> 
#> Rank Regression
#> Coefficients:
#>      mu    sigma  
#> 10.2585   0.3852  
#> Method of CDF Estimation: nelson

Model visualization in an existing probability plot:

mod_vis <- plot_mod(p_obj = prob_vis, x = rr_list, distribution = "weibull", 
                    title_trace = "RR") 
mod_vis

Getting help

If you notice a bug or have suggestions for improvements, please submit an issue with a minimal reproducible example on GitHub. For further questions, please contact Tim-Gunnar Hensel.

Metadata

Version

2.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows