MCMC Estimation of Generalized Process Capability Indices under Hybrid Type-II Censoring

Shikhar Tyagi, Vrijesh Tripathi

Introduction

The gpcihybridIImcmc package provides Bayesian Markov Chain Monte Carlo (MCMC) estimation methods using Metropolis-Hastings within Gibbs sampler for Generalized Process Capability Indices (GPCIs) under Hybrid Type-II censored lifetime data.

Under Hybrid Type-II censoring (Epstein 1954; Childs et al. 2003; Kundu and Pradhan 2009), \(n\) identical units are placed on life testing. The experiment stops at \(T^* = \max(x_r, T_c)\), where \(r \le n\) is the target number of failures and \(T_c > 0\) is the pre-fixed censoring time.

Supported capability indices include \(C_{py}\), \(C_p\), \(C_{pk}\), \(C_{pu}\), \(C_{pl}\), \(C_{pm}\), \(C_{pmk}\), \(S_{pmk}\), \(C_{pTk}\), \(C_{pc}\), \(C_{Np}\), \(C_{Npk}\), \(C_{Npm}\), \(C_{Npmk}\), \(C_{Npmc}\), and \(C_{Npmkc}\).

Usage with Custom Probability Functions

Users can pass custom probability density/mass functions (pdf), cumulative distribution functions (cdf), and survival functions (surv) as R functions:

library(gpcihybridIImcmc)

# User-defined Exponential lifetime distribution functions
my_pdf  <- function(x, rate) stats::dexp(x, rate = rate)
my_cdf  <- function(q, rate) stats::pexp(q, rate = rate)
my_surv <- function(q, rate) stats::pexp(q, rate = rate, lower.tail = FALSE)

# Hybrid Type-II censored sample: n = 10 units, target r = 3, censoring time tc = 2.5
data <- c(0.5, 1.2, 2.1, 3.4)

fit <- gpci_hybrid2_mcmc(
  x = data,
  r = 3,
  tc = 2.5,
  n = 10,
  pdf = my_pdf,
  cdf = my_cdf,
  surv = my_surv,
  param_names = "rate",
  start = c(rate = 0.5),
  length_chain = 1000,
  burn_in = 200,
  thinning = 2,
  USL = 8,
  LSL = 0,
  target = 4
)

print(fit)
#> --- Bayesian MCMC Estimation of GPCIs under Hybrid Type-II Censoring ---
#> Distribution:  Custom 
#> Observed Failures (d):  4  | Target (r):  3  | Total (n):  10 
#> Censoring Time (Tc):  2.5  | Effective Termination (T*):  2.5 
#> Specification Limits: LSL = 0 | Target = 4 | USL = 8 
#> 
#> Initial Parameter MLEs (under Hybrid Type-II Censoring):
#>   rate 
#> 0.1803 
#> 
#> Point Estimates of GPCIs (at Initial Estimates):
#>    Cpy     Cp    Cpk    Cpm   Cpmk   Spmk  CNpmc 
#> 0.7657 0.2404 0.1474 0.2315 0.1420 0.3802 0.2154 
#> 
#> Posterior GPCI Summary (Thinned MCMC Chain):
#>   Variable Estimate    Bias    MSE Bayes_Risk HPD_95_Lower HPD_95_Upper
#> 1      Cpy   0.7561 -0.0095 0.0219     0.0219       0.4942       0.9483
#> 2       Cp   0.2634  0.0230 0.0109     0.0104       0.1120       0.4766
#> 3      Cpk   0.1590  0.0116 0.0245     0.0245      -0.1070       0.3333
#> 4      Cpm   0.2525  0.0210 0.0112     0.0108       0.0933       0.4379
#> 5     Cpmk   0.1577  0.0157 0.0222     0.0221      -0.0893       0.3333
#> 6     Spmk   0.3932  0.0131 0.0161     0.0160       0.1845       0.5835
#> 7    CNpmc   0.2237  0.0084 0.0059     0.0059       0.0965       0.3473
#>   HW_Passed
#> 1      TRUE
#> 2      TRUE
#> 3      TRUE
#> 4      TRUE
#> 5      TRUE
#> 6      TRUE
#> 7      TRUE

Statistical Summaries & Convergence Diagnostics

The package automatically calculates: - Point estimates and initial MLE estimates under Hybrid Type-II censoring. - Posterior mean estimates, bias, Mean Squared Error (MSE), and Bayes Risk under squared error loss. - Highest Posterior Density (HPD) credible intervals at 90%, 95%, and 99% levels. - Heidelberger and Welch’s MCMC Convergence Diagnostics (stationarity and half-width tests). - Empirical coverage probabilities.

References