The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Lindley Approximation Method for Generalized Process Capability Indices

library(gpciLindleyApprox)

Introduction

The gpciLindleyApprox package provides a generalized framework for computing, estimating, and validating Generalized Process Capability Indices (GPCIs) using the Lindley Approximation Method for uncensored process data under Bayesian inference.

Supported GPCIs include: - \(C_{py}\) (Process Capability Index based on Yield; Maiti, Saha & Nanda, 2010) - \(C_p, C_{pk}, C_{pu}, C_{pl}, C_{pm}, C_{pmk}\) - \(C_{pTk}\) (Saha, Dey & Maiti, 2019) - \(S_{pmk}\) (Dey & Saha, 2019) - \(C_{pc}\) (Saha, Dey & Nadarajah, 2022) - \(CN_{pk}\) (Saha, Dey & Maiti, 2018) - \(CN_{pmc}\) (Alotaibi, Dey & Saha, 2022) - \(CN_{pmkc}\) (Saha, Tripathi & Dey, 2024) - \(C_p(u,v)\) Vännman’s family (1995)

Basic Example with Custom PDF/CDF

Below is an example estimating GPCIs for uncensored data generated from a normal process using the high-level user interface function gpci_lindley():

set.seed(42)
data_obs <- rnorm(50, mean = 10, sd = 1)

# Fit GPCIs using Lindley approximation and Bootstrap CIs
fit_res <- gpci_lindley(
  data = data_obs,
  pdf = function(x, mean = 0, sd = 1) dnorm(x, mean = mean, sd = sd),
  cdf = function(x, mean = 0, sd = 1) pnorm(x, mean = mean, sd = sd),
  chain_length = 300,
  burn_in = 50,
  thinning = 1,
  USL = 13,
  LSL = 7,
  B = 100
)

# Display Summary Diagnostics Table
summary(fit_res)
#>     Index  MLE_Estimate Lindley_Estimate    Chain_Mean          Bias
#> 1     Cpy  8.768377e-01     8.462389e-01  8.517148e-01 -2.512291e-02
#> 2      Cp  1.000000e+04     1.000000e+04  1.000000e+04  0.000000e+00
#> 3     Cpk -2.333333e+04    -2.333333e+04 -2.333333e+04  0.000000e+00
#> 4     Cpu  4.333333e+04     4.333333e+04  4.333333e+04  0.000000e+00
#> 5     Cpl -2.333333e+04    -2.333333e+04 -2.333333e+04  0.000000e+00
#> 6     Cpm  1.000000e-01     1.000000e-01  1.000000e-01  0.000000e+00
#> 7    Cpmk -2.333333e-01    -2.333333e-01 -2.333333e-01  0.000000e+00
#> 8    CpTk  1.612155e-01     1.409581e-01  1.501106e-01 -1.110489e-02
#> 9    Spmk  1.452600e+03     1.229395e+03  1.348160e+03 -1.044404e+02
#> 10    Cpc  1.000000e+04     1.000000e+04  1.000000e+04  0.000000e+00
#> 11   CNpk -9.333830e-03    -1.420153e-02 -1.406346e-02 -4.729627e-03
#> 12  CNpmc  1.652457e-02     1.644815e-02  1.645452e-02 -7.004957e-05
#> 13 CNpmkc -1.551438e-04    -2.360532e-04 -2.337581e-04 -7.861429e-05
#> 14  Cp_uv -2.333333e-01    -2.333333e-01 -2.333333e-01  0.000000e+00
#>             MSE   Risk_Value   HPD90_Lower   HPD90_Upper   HPD95_Lower
#> 1  6.813539e-03 7.442066e-03  7.210851e-01  9.771918e-01  7.210851e-01
#> 2  0.000000e+00 0.000000e+00  1.000000e+04  1.000000e+04  1.000000e+04
#> 3  0.000000e+00 0.000000e+00 -2.333333e+04 -2.333333e+04 -2.333333e+04
#> 4  0.000000e+00 0.000000e+00  4.333333e+04  4.333333e+04  4.333333e+04
#> 5  0.000000e+00 0.000000e+00 -2.333333e+04 -2.333333e+04 -2.333333e+04
#> 6  0.000000e+00 0.000000e+00  1.000000e-01  1.000000e-01  1.000000e-01
#> 7  0.000000e+00 0.000000e+00 -2.333333e-01 -2.333333e-01 -2.333333e-01
#> 8  2.436033e-04 3.666940e-04  1.343623e-01  1.653620e-01  1.271329e-01
#> 9  5.056062e+04 5.097038e+04  9.809115e+02  1.622972e+03  9.139125e+02
#> 10 0.000000e+00 0.000000e+00  1.000000e+04  1.000000e+04  1.000000e+04
#> 11 1.269809e-04 1.493326e-04 -2.921677e-02 -1.430780e-03 -3.388581e-02
#> 12 2.150084e-08 2.640772e-08  1.626008e-02  1.663420e-02  1.620269e-02
#> 13 3.508226e-08 4.126238e-08 -4.856315e-04 -2.378194e-05 -5.632387e-04
#> 14 0.000000e+00 0.000000e+00 -2.333333e-01 -2.333333e-01 -2.333333e-01
#>      HPD95_Upper   HPD99_Lower   HPD99_Upper    HW_Stat HW_Pvalue HW_Passed
#> 1   1.009890e+00  6.936857e-01  1.038376e+00 0.06135820       0.5      TRUE
#> 2   1.000000e+04  1.000000e+04  1.000000e+04 0.00000000       0.5      TRUE
#> 3  -2.333333e+04 -2.333333e+04 -2.333333e+04 0.00000000       0.5      TRUE
#> 4   4.333333e+04  4.333333e+04  4.333333e+04 0.00000000       0.5      TRUE
#> 5  -2.333333e+04 -2.333333e+04 -2.333333e+04 0.00000000       0.5      TRUE
#> 6   1.000000e-01  1.000000e-01  1.000000e-01 0.00000000       0.5      TRUE
#> 7  -2.333333e-01 -2.333333e-01 -2.333333e-01 0.00000000       0.5      TRUE
#> 8   1.654190e-01  1.165332e-01  1.654190e-01 0.18050519       0.5      TRUE
#> 9   1.659205e+03  8.920865e+02  1.742970e+03 0.22773878       0.5      TRUE
#> 10  1.000000e+04  1.000000e+04  1.000000e+04 0.00000000       0.5      TRUE
#> 11 -1.379886e-03 -4.986817e-02 -6.254820e-04 0.10081918       0.5      TRUE
#> 12  1.663602e-02  1.606730e-02  1.665190e-02 0.08155822       0.5      TRUE
#> 13 -2.293601e-05 -8.288921e-04 -1.039655e-05 0.10081918       0.5      TRUE
#> 14 -2.333333e-01 -2.333333e-01 -2.333333e-01 0.00000000       0.5      TRUE
#>    Convergence_Prob  Boot95_Lower  Boot95_Upper
#> 1               0.5  7.354685e-01  1.049653e+00
#> 2               0.5  1.000000e+04  1.000000e+04
#> 3               0.5 -2.333333e+04 -2.333333e+04
#> 4               0.5  4.333333e+04  4.333333e+04
#> 5               0.5 -2.333333e+04 -2.333333e+04
#> 6               0.5  1.000000e-01  1.000000e-01
#> 7               0.5 -2.333333e-01 -2.333333e-01
#> 8               0.5  1.194694e-01  1.640426e-01
#> 9               0.5  8.386396e+02  1.632434e+03
#> 10              0.5  1.000000e+04  1.000000e+04
#> 11              0.5 -3.407695e-02 -1.255760e-03
#> 12              0.5  1.620628e-02  1.663931e-02
#> 13              0.5 -5.664156e-04 -2.087283e-05
#> 14              0.5 -2.333333e-01 -2.333333e-01

Using Built-in Distribution Objects

The package provides pre-defined distribution objects such as dist_normal(), dist_weibull(), dist_gamma(), dist_logistic_exponential(), and dist_exponentiated_exponential():

dist_weib <- dist_weibull()

fit_weib <- lindley_gpci(
  data = rweibull(50, shape = 2, scale = 5),
  distribution = dist_weib,
  chain_length = 300,
  burn_in = 50,
  thinning = 1,
  USL = 8,
  LSL = 1,
  B = 100
)

summary(fit_weib)
#>     Index  MLE_Estimate Lindley_Estimate    Chain_Mean          Bias
#> 1     Cpy  6.107152e-01     5.998779e-01  6.002447e-01 -1.047052e-02
#> 2      Cp  1.166667e+04     1.166667e+04  1.166667e+04  0.000000e+00
#> 3     Cpk -3.333333e+03    -3.333333e+03 -3.333333e+03  0.000000e+00
#> 4     Cpu  2.666667e+04     2.666667e+04  2.666667e+04  0.000000e+00
#> 5     Cpl -3.333333e+03    -3.333333e+03 -3.333333e+03  0.000000e+00
#> 6     Cpm  2.592593e-01     2.592593e-01  2.592593e-01  0.000000e+00
#> 7    Cpmk -7.407407e-02    -7.407407e-02 -7.407407e-02  0.000000e+00
#> 8    CpTk  1.305948e-01     1.306411e-01  1.295821e-01 -1.012621e-03
#> 9    Spmk  2.230839e+03     2.328966e+03  2.207974e+03 -2.286572e+01
#> 10    Cpc  1.166667e+04     1.166667e+04  1.166667e+04  0.000000e+00
#> 11   CNpk -5.048286e-02    -5.504173e-02 -5.498003e-02 -4.497162e-03
#> 12  CNpmc  3.455816e-02     3.421865e-02  3.421933e-02 -3.388242e-04
#> 13 CNpmkc -1.864687e-03    -2.033079e-03 -2.030799e-03 -1.661118e-04
#> 14  Cp_uv -7.407407e-02    -7.407407e-02 -7.407407e-02  0.000000e+00
#>             MSE   Risk_Value   HPD90_Lower   HPD90_Upper   HPD95_Lower
#> 1  3.451728e-03 3.561168e-03  5.136530e-01  6.910673e-01  4.914843e-01
#> 2  0.000000e+00 0.000000e+00  1.166667e+04  1.166667e+04  1.166667e+04
#> 3  0.000000e+00 0.000000e+00 -3.333333e+03 -3.333333e+03 -3.333333e+03
#> 4  0.000000e+00 0.000000e+00  2.666667e+04  2.666667e+04  2.666667e+04
#> 5  0.000000e+00 0.000000e+00 -3.333333e+03 -3.333333e+03 -3.333333e+03
#> 6  0.000000e+00 0.000000e+00  2.592593e-01  2.592593e-01  2.592593e-01
#> 7  0.000000e+00 0.000000e+00 -7.407407e-02 -7.407407e-02 -7.407407e-02
#> 8  2.159494e-04 2.169746e-04  1.054837e-01  1.515815e-01  1.026981e-01
#> 9  1.386249e+05 1.387084e+05  1.482967e+03  2.703227e+03  1.374317e+03
#> 10 0.000000e+00 0.000000e+00  1.166667e+04  1.166667e+04  1.166667e+04
#> 11 7.179439e-04 7.381532e-04 -9.445815e-02 -1.907772e-02 -1.037342e-01
#> 12 1.333595e-06 1.448391e-06  3.267486e-02  3.580915e-02  3.183853e-02
#> 13 9.795230e-07 1.007115e-06 -3.489004e-03 -7.046744e-04 -3.831634e-03
#> 14 0.000000e+00 0.000000e+00 -7.407407e-02 -7.407407e-02 -7.407407e-02
#>      HPD95_Upper   HPD99_Lower   HPD99_Upper    HW_Stat HW_Pvalue HW_Passed
#> 1   7.100755e-01  4.554290e-01  7.548129e-01 0.11658476       0.5      TRUE
#> 2   1.166667e+04  1.166667e+04  1.166667e+04 0.00000000       0.5      TRUE
#> 3  -3.333333e+03 -3.333333e+03 -3.333333e+03 0.00000000       0.5      TRUE
#> 4   2.666667e+04  2.666667e+04  2.666667e+04 0.00000000       0.5      TRUE
#> 5  -3.333333e+03 -3.333333e+03 -3.333333e+03 0.00000000       0.5      TRUE
#> 6   2.592593e-01  2.592593e-01  2.592593e-01 0.00000000       0.5      TRUE
#> 7  -7.407407e-02 -7.407407e-02 -7.407407e-02 0.00000000       0.5      TRUE
#> 8   1.535985e-01  9.953666e-02  1.607303e-01 0.35399092       0.1      TRUE
#> 9   2.813694e+03  1.202666e+03  2.990766e+03 0.03601605       0.5      TRUE
#> 10  1.166667e+04  1.166667e+04  1.166667e+04 0.00000000       0.5      TRUE
#> 11 -1.169827e-02 -1.479361e-01 -1.169827e-02 0.28295145       0.5      TRUE
#> 12  3.580915e-02  3.067226e-02  3.616492e-02 0.16195705       0.5      TRUE
#> 13 -4.320995e-04 -5.464320e-03 -4.320995e-04 0.28295145       0.5      TRUE
#> 14 -7.407407e-02 -7.407407e-02 -7.407407e-02 0.00000000       0.5      TRUE
#>    Convergence_Prob  Boot95_Lower  Boot95_Upper
#> 1               0.5  5.182434e-01  7.236522e-01
#> 2               0.5  1.166667e+04  1.166667e+04
#> 3               0.5 -3.333333e+03 -3.333333e+03
#> 4               0.5  2.666667e+04  2.666667e+04
#> 5               0.5 -3.333333e+03 -3.333333e+03
#> 6               0.5  2.592593e-01  2.592593e-01
#> 7               0.5 -7.407407e-02 -7.407407e-02
#> 8               0.1  9.887280e-02  1.547374e-01
#> 9               0.5  1.319628e+03  2.724054e+03
#> 10              0.5  1.166667e+04  1.166667e+04
#> 11              0.5 -9.886863e-02 -2.096734e-02
#> 12              0.5  3.259221e-02  3.592499e-02
#> 13              0.5 -3.651914e-03 -7.744714e-04
#> 14              0.5 -7.407407e-02 -7.407407e-02

References

  1. Lindley, D. V. (1980). Approximate Bayesian methods. Trabajos de Estadística y de Investigación Operativa, 31(1), 223-245.
  2. Maiti, S. S., Saha, M., & Nanda, A. K. (2010). On generalizing process capability indices. Quality Technology & Quantitative Management, 7(3), 279-289.
  3. Saha, M., Dey, S., & Maiti, S. S. (2018). Parametric and non-parametric bootstrap confidence intervals of CNpk for exponential power distribution. Journal of Industrial and Production Engineering, 35(3), 160-169.
  4. Dey, S., & Saha, M. (2019). Assessing the process capability index Spmk using improved estimators. Life Cycle Reliability and Safety Engineering, 8, 81-88.
  5. Saha, M., Dey, S., & Maiti, S. S. (2019). Bootstrap confidence intervals of CpTk for two parameter logistic exponential distribution with applications. International Journal of System Assurance Engineering and Management.
  6. Alotaibi, R., Dey, S., & Saha, M. (2022). Estimation and confidence intervals of a new PCI CNpmc for logistic-exponential process distribution. Journal of Mathematics, 2022, 3135264.
  7. Saha, M., Dey, S., & Nadarajah, S. (2022). Parametric inference of the process capability index Cpc for exponentiated exponential distribution. Journal of Applied Statistics, 49(16), 4097-4121.
  8. Saha, M., Tripathi, V., & Dey, S. (2024). Classical inference of a new PCI CNpmkc for logistic-exponential process distribution. International Journal of Reliability, Quality and Safety Engineering, 31(3), 2450013.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.