The gpciIntCensor package provides a unified,
comprehensive framework for evaluating Generalized Process Capability
Indices (GPCIs) under interval-censored data using Maximum Likelihood
Estimation (MLE) via MleCensoR and bootstrap confidence
intervals.
Supported capability indices include: * \(C_{py}\) (Maiti et al., 2010) * \(S_{pmk}\) (Dey & Saha, 2019) * \(C_{pTk}\) (Saha et al., 2019) * \(C_{pc}\) (Saha et al., 2022) * \(C_{Npmc}\) (Alotaibi et al., 2022) * \(C_{Npmkc}\) (Saha et al., 2024) * \(C_{Npk}\) (Saha et al., 2018) * Vännman’s \(C_p(u,v)\) family and quantile analogs.
fit_cap <- capability_censor(
data_left = data_left,
data_right = data_right,
distribution = dist_norm,
USL = 14,
LSL = 6,
target = 10,
indices = c("Cpy", "Cp", "Cpk", "Cpm", "Cpmk", "Spmk", "CpTk", "CNpmc"),
mode = "moments"
)
print(fit_cap)
#> --- Process Capability Analysis for Interval-Censored Data ---
#> Distribution: normal
#> Parameters: mean = 9.9293, sd = 1.4396
#> Spec Limits: LSL = 6 , USL = 14 , Target = 10
#> Mode: moments
#> Expected Nonconforming (p_hat): 0.5516 %
#>
#> Point Estimates of Capability Indices:
#> Cpy Cp Cpk Cpm Cpmk Spmk CpTk CNpmc
#> 0.9972 0.9262 0.9098 0.9251 0.9087 0.9240 0.9607 0.7601ci_res <- boot_ci_censor(
fit = fit_cap,
B = 100,
alpha = c(0.10, 0.05, 0.01),
method = "percentile",
type = "nonparametric"
)
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
print(ci_res)
#> --- Bootstrap Confidence Intervals (Interval-Censored Data) ---
#> Bootstrap Type: nonparametric
#> CI Method: percentile
#> Replicates (B): 100
#>
#> index estimate method type alpha conf_level lower upper
#> 1 Cpy 0.9972 percentile nonparametric 0.10 90% 0.9807 1.0019
#> 2 Cpy 0.9972 percentile nonparametric 0.05 95% 0.9776 1.0024
#> 3 Cpy 0.9972 percentile nonparametric 0.01 99% 0.9738 1.0026
#> 4 Cp 0.9262 percentile nonparametric 0.10 90% 0.7712 1.1300
#> 5 Cp 0.9262 percentile nonparametric 0.05 95% 0.7664 1.2478
#> 6 Cp 0.9262 percentile nonparametric 0.01 99% 0.7424 1.2855
#> 7 Cpk 0.9098 percentile nonparametric 0.10 90% 0.6999 1.0734
#> 8 Cpk 0.9098 percentile nonparametric 0.05 95% 0.6859 1.1631
#> 9 Cpk 0.9098 percentile nonparametric 0.01 99% 0.6528 1.2616
#> 10 Cpm 0.9251 percentile nonparametric 0.10 90% 0.7636 1.1135
#> 11 Cpm 0.9251 percentile nonparametric 0.05 95% 0.7470 1.2032
#> 12 Cpm 0.9251 percentile nonparametric 0.01 99% 0.7280 1.2822
#> 13 Cpmk 0.9087 percentile nonparametric 0.10 90% 0.6665 1.0714
#> 14 Cpmk 0.9087 percentile nonparametric 0.05 95% 0.6536 1.1306
#> 15 Cpmk 0.9087 percentile nonparametric 0.01 99% 0.6120 1.2583
#> 16 Spmk 0.9240 percentile nonparametric 0.10 90% 0.7305 1.0930
#> 17 Spmk 0.9240 percentile nonparametric 0.05 95% 0.7164 1.1633
#> 18 Spmk 0.9240 percentile nonparametric 0.01 99% 0.6842 1.2789
#> 19 CpTk 0.9607 percentile nonparametric 0.10 90% 0.6724 0.9728
#> 20 CpTk 0.9607 percentile nonparametric 0.05 95% 0.6397 0.9873
#> 21 CpTk 0.9607 percentile nonparametric 0.01 99% 0.6060 0.9991
#> 22 CNpmc 0.7601 percentile nonparametric 0.10 90% 0.6627 0.8547
#> 23 CNpmc 0.7601 percentile nonparametric 0.05 95% 0.6516 0.8932
#> 24 CNpmc 0.7601 percentile nonparametric 0.01 99% 0.6389 0.9242
#> width
#> 1 0.0212
#> 2 0.0248
#> 3 0.0288
#> 4 0.3589
#> 5 0.4814
#> 6 0.5431
#> 7 0.3736
#> 8 0.4772
#> 9 0.6088
#> 10 0.3499
#> 11 0.4562
#> 12 0.5542
#> 13 0.4049
#> 14 0.4770
#> 15 0.6464
#> 16 0.3625
#> 17 0.4470
#> 18 0.5947
#> 19 0.3004
#> 20 0.3476
#> 21 0.3931
#> 22 0.1920
#> 23 0.2416
#> 24 0.2853diag_res <- compute_diagnostics_censor(
fit = fit_cap,
true_params = list(mean = 10, sd = 1.5),
true_indices = c(Cpy = 1.0, Cp = 1.33),
B = 50
)
#> Warning in stats::pnorm(x, mean, sd): NaNs produced
#> Warning in stats::pnorm(x, mean, sd): NaNs produced
#> Warning in stats::pnorm(x, mean, sd): NaNs produced
#> Warning in stats::pnorm(x, mean, sd): NaNs produced
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
#> Warning in norm.inter(t, alpha): extreme order statistics used as endpoints
print(diag_res)
#> --- Diagnostics for Interval-Censored Data ---
#> Bootstrap Replicates: 50
#>
#> Standard Errors for Parameters:
#> mean sd
#> 0.049890 0.030722
#>
#> Mean Squared Errors for Parameters:
#> mean sd
#> 0.004992 0.003651
#>
#> Standard Errors for Capability Indices:
#> Cpy Cp Cpk Cpm Cpmk Spmk CpTk CNpmc
#> 0.006762 0.151569 0.151158 0.148054 0.152630 0.148090 0.092541 0.074686
#>
#> Mean Squared Errors for Capability Indices:
#> Cpy.Cpy Cp.Cp Cpk Cpm Cpmk Spmk CpTk CNpmc
#> 0.000008 0.163056 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
#>
#> Coverage Probabilities for Capability Indices:
#>
#> Alpha level: alpha_0.1
#> Cpy Cp Cpk Cpm Cpmk Spmk CpTk CNpmc
#> 1 0 0 0 0 0 0 0
#>
#> Alpha level: alpha_0.05
#> Cpy Cp Cpk Cpm Cpmk Spmk CpTk CNpmc
#> 1 0 0 0 0 0 0 0
#>
#> Alpha level: alpha_0.01
#> Cpy Cp Cpk Cpm Cpmk Spmk CpTk CNpmc
#> 1 1 0 0 0 0 0 0
#>
#> Coverage Probabilities for Parameters:
#>
#> Alpha level: alpha_0.1
#> mean sd
#> 1 0
#>
#> Alpha level: alpha_0.05
#> mean sd
#> 1 0
#>
#> Alpha level: alpha_0.01
#> mean sd
#> 1 1