| Title: | Generalized Process Capability Indices under Hybrid Type-II Censoring |
|---|---|
| Description: | A comprehensive, generalized framework for computing, estimating, and validating Generalized Process Capability Indices (GPCIs) under Hybrid Type-II censored lifetime data. Supports user-supplied probability density or mass functions (PDF/PMF), cumulative distribution functions (CDF), survival functions (SF), and quantile functions. Parameter estimation under Hybrid Type-II censoring is performed via Maximum Likelihood Estimation using the 'MleCensoR' package (Childs et al., 2003 <doi:10.1007/BF02517803>; Balakrishnan & Kundu, 2013 <doi:10.1002/nav.21545>). Computes classical and non-normal capability indices, including Cpy (Maiti et al., 2010 <doi:10.1080/16843703.2010.11673233>), Spmk (Dey & Saha, 2019 <doi:10.1007/s41872-019-00081-4>), CpTk (Saha et al., 2019), Cpc (Saha et al., 2022 <doi:10.1080/02664763.2021.1971632>), CNpmc (Alotaibi et al., 2022 <doi:10.1155/2022/3135264>), CNpmkc (Saha et al., 2024 <doi:10.1142/S021853932450013X>), CNpk (Saha et al., 2018 <doi:10.1080/21681015.2018.1437793>), and Vannman's Cp(u,v) family. Evaluates parametric and non-parametric bootstrap confidence intervals at 90 percent, 95 percent, and 99 percent levels of significance using percentile, normal, basic, BCa, BCp, and studentized bootstrap methods. Computes standard errors, mean squared errors, and coverage probabilities for both distribution parameters and capability indices. Integrates goodness-of-fit testing for Hybrid Type-II censored data via the 'gofPHCS' package. |
| Authors: | Shikhar Tyagi [aut, cre] (ORCID: <https://orcid.org/0000-0003-1606-0844>), Sumit Kumar [aut], Arvind Pandey [aut], Bhupendra Singh [aut], Vrijesh Tripathi [aut] |
| Maintainer: | Shikhar Tyagi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-09-21 09:41:39 UTC |
| Source: | https://github.com/cran/gpcihybridII |
Computes parametric and non-parametric bootstrap confidence intervals for Generalized Process Capability Indices (GPCIs) and model parameters under Hybrid Type-II censoring at multiple significance levels (90 percent, 95 percent, and 99 percent).
boot_ci_hybrid2( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric"), parallel = FALSE, ncpus = 1 ) gpci_boot_hybrid2( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric"), parallel = FALSE, ncpus = 1 ) boot_ci( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric"), parallel = FALSE, ncpus = 1 )boot_ci_hybrid2( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric"), parallel = FALSE, ncpus = 1 ) gpci_boot_hybrid2( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric"), parallel = FALSE, ncpus = 1 ) boot_ci( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric"), parallel = FALSE, ncpus = 1 )
fit |
A |
B |
Positive integer scalar specifying number of bootstrap replicates. Defaults to 1000. |
alpha |
Numeric vector of significance levels. Defaults to |
method |
Character string specifying confidence interval method. Choices are: |
type |
Character string specifying resampling type: |
parallel |
Logical scalar. If |
ncpus |
Integer scalar specifying number of CPU cores to use if |
An S3 object of class "gpci_ci_hybrid2" containing:
ci_table |
Data frame of lower and upper confidence bounds, width, and confidence levels for all indices and parameters. |
param_perf |
Data frame summarizing parameter estimates, standard errors (SE), bias, and mean squared errors (MSE). |
index_perf |
Data frame summarizing capability index estimates, standard errors (SE), bias, and MSE. |
param_reps |
Matrix of bootstrap parameter replicates across all iterations. |
index_reps |
Matrix of bootstrap capability index replicates across all iterations. |
fit |
The original |
B |
Number of bootstrap replicates. |
dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) fit <- capability_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0) ci <- boot_ci_hybrid2(fit, B = 50, alpha = c(0.10, 0.05, 0.01), method = "percentile") print(ci)dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) fit <- capability_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0) ci <- boot_ci_hybrid2(fit, B = 50, alpha = c(0.10, 0.05, 0.01), method = "percentile") print(ci)
Computes classical and generalized Process Capability Indices (GPCIs) under Hybrid Type-II censored lifetime data.
capability_hybrid2( x = NULL, r = NULL, tc = NULL, n = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Spmk", "CpTk", "Cpc", "CNpmc", "CNpmkc", "CNpk", "Cp", "Cpk", "Cpm", "Cpmk"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, start = NULL, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL, ... ) gpci_fit_hybrid2( x = NULL, r = NULL, tc = NULL, n = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Spmk", "CpTk", "Cpc", "CNpmc", "CNpmkc", "CNpk", "Cp", "Cpk", "Cpm", "Cpmk"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, start = NULL, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL, ... ) capability( x = NULL, r = NULL, tc = NULL, n = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Spmk", "CpTk", "Cpc", "CNpmc", "CNpmkc", "CNpk", "Cp", "Cpk", "Cpm", "Cpmk"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, start = NULL, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL, ... )capability_hybrid2( x = NULL, r = NULL, tc = NULL, n = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Spmk", "CpTk", "Cpc", "CNpmc", "CNpmkc", "CNpk", "Cp", "Cpk", "Cpm", "Cpmk"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, start = NULL, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL, ... ) gpci_fit_hybrid2( x = NULL, r = NULL, tc = NULL, n = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Spmk", "CpTk", "Cpc", "CNpmc", "CNpmkc", "CNpk", "Cp", "Cpk", "Cpm", "Cpmk"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, start = NULL, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL, ... ) capability( x = NULL, r = NULL, tc = NULL, n = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Spmk", "CpTk", "Cpc", "CNpmc", "CNpmkc", "CNpk", "Cp", "Cpk", "Cpm", "Cpmk"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, start = NULL, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL, ... )
x |
Numeric vector of observed failure times. Can be |
r |
Positive integer target number of failures. Can be |
tc |
Positive numeric fixed censoring time. Can be |
n |
Positive integer total sample size placed on test. Can be |
distribution |
A |
USL |
Numeric Upper Specification Limit. Must satisfy |
LSL |
Numeric Lower Specification Limit. Must satisfy |
target |
Numeric process target. Defaults to |
indices |
Character vector of capability indices to compute. Choices include:
|
u |
Non-negative numeric weight parameter |
v |
Non-negative numeric weight parameter |
mode |
Character string specifying mode of computation: |
fit |
Logical scalar. If |
start |
Optional named list or numeric vector of starting parameter values for MLE. Defaults to |
C0 |
Non-negative numeric coefficient for the tolerance cost function in |
C1 |
Non-negative numeric coefficient for the tolerance cost function in |
C2 |
Non-negative numeric coefficient for the tolerance cost function in |
tolerance_t |
Positive numeric process tolerance |
P0 |
Desirable process yield for |
LDL |
Lower Desired Limit for |
UDL |
Upper Desired Limit for |
... |
Additional arguments passed to |
An S3 object of class "gpcifit_hybrid2" containing:
x |
Observed failure times. |
r |
Target number of failures. |
tc |
Fixed censoring time. |
n |
Total sample size. |
distribution |
Fitted or supplied |
USL |
Upper Specification Limit. |
LSL |
Lower Specification Limit. |
target |
Target value. |
indices |
Character vector of requested capability index names. |
estimates |
Named numeric vector of capability index point estimates. |
p_hat |
Expected process non-conformance proportion. |
mode |
Computation mode used ( |
options |
List of calculation options and parameters used. |
dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) res <- capability_hybrid2( x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0, target = 1.5, indices = c("Cpy", "Spmk", "CpTk", "Cpc", "CNpmc", "CNpmkc", "Cp", "Cpk", "Cpm", "Cpmk") ) print(res)dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) res <- capability_hybrid2( x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0, target = 1.5, indices = c("Cpy", "Spmk", "CpTk", "Cpc", "CNpmc", "CNpmkc", "Cp", "Cpk", "Cpm", "Cpmk") ) print(res)
Extract point estimates of capability indices or fitted distribution parameters.
## S3 method for class 'gpcifit_hybrid2' coef(object, what = c("indices", "parameters"), ...)## S3 method for class 'gpcifit_hybrid2' coef(object, what = c("indices", "parameters"), ...)
object |
An object of class |
what |
Character string: |
... |
Additional arguments. |
Named numeric vector of indices or parameters.
Evaluates standard errors, mean squared errors (MSE), bias, and empirical coverage probabilities for model parameters and Generalized Process Capability Indices (GPCIs) using bootstrap resampling.
compute_diagnostics_hybrid2( fit, true_params = NULL, true_indices = NULL, B = 1000, alpha = c(0.1, 0.05, 0.01) ) compute_diagnostics( fit, true_params = NULL, true_indices = NULL, B = 1000, alpha = c(0.1, 0.05, 0.01) )compute_diagnostics_hybrid2( fit, true_params = NULL, true_indices = NULL, B = 1000, alpha = c(0.1, 0.05, 0.01) ) compute_diagnostics( fit, true_params = NULL, true_indices = NULL, B = 1000, alpha = c(0.1, 0.05, 0.01) )
fit |
A |
true_params |
Optional named numeric list or vector of true parameter values. Defaults to |
true_indices |
Optional named numeric vector of true capability index values. Defaults to |
B |
Positive integer scalar specifying number of bootstrap replicates for estimation. Defaults to 1000. |
alpha |
Numeric vector of significance levels for coverage probabilities. Defaults to |
An S3 object of class "gpci_diagnostics_hybrid2" containing:
se_params |
Named numeric vector of standard errors for model parameters. |
bias_params |
Named numeric vector of empirical bias for model parameters. |
mse_params |
Named numeric vector of mean squared errors for model parameters. |
coverage_params |
List of parameter empirical coverage probabilities across significance levels. |
se_indices |
Named numeric vector of standard errors for capability indices. |
bias_indices |
Named numeric vector of empirical bias for capability indices. |
mse_indices |
Named numeric vector of mean squared errors for capability indices. |
coverage_indices |
List of capability index empirical coverage probabilities across significance levels. |
alpha_levels |
Numeric vector of significance levels used. |
bootstrap_replicates |
Number of bootstrap replicates. |
fit |
The original |
dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) fit <- capability_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0) diag <- compute_diagnostics_hybrid2(fit, B = 50, true_params = c(rate = 1)) print(diag)dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) fit <- capability_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0) diag <- compute_diagnostics_hybrid2(fit, B = 50, true_params = c(rate = 1)) print(diag)
Computes theoretical mean and variance of a distribution using adaptive numerical integration over effective quantile support.
compute_theoretical_moments_hybrid2(dist)compute_theoretical_moments_hybrid2(dist)
dist |
A |
A list with two numeric elements:
mean |
Theoretical mean of the distribution. |
var |
Theoretical variance of the distribution. |
dist_w <- dist_weibull(shape = 2, scale = 5) compute_theoretical_moments_hybrid2(dist_w)dist_w <- dist_weibull(shape = 2, scale = 5) compute_theoretical_moments_hybrid2(dist_w)
Calculate bootstrap confidence intervals for capability indices at specified significance levels (e.g. 90 percent, 95 percent, 99 percent).
## S3 method for class 'gpcifit_hybrid2' confint( object, parm = NULL, level = 0.95, B = 1000, method = "percentile", ... )## S3 method for class 'gpcifit_hybrid2' confint( object, parm = NULL, level = 0.95, B = 1000, method = "percentile", ... )
object |
An object of class |
parm |
Optional vector of index names. |
level |
Confidence level (default is 0.95; can be 0.90, 0.95, 0.99 or a vector). |
B |
Number of bootstrap replicates (default 1000). |
method |
Bootstrap CI method ( |
... |
Additional arguments passed to |
A matrix containing lower and upper confidence limits.
Constructor to define a continuous or discrete probability distribution for process capability analysis under Hybrid Type-II censored data. The distribution can be defined by specifying any one (or more) of its Probability Density/Mass Function (PDF/PMF), Cumulative Distribution Function (CDF), Survival Function (SF), or Quantile Function. Missing functions are automatically and numerically derived using adaptive integration and root-finding algorithms.
define_distribution_hybrid2( name, pdf = NULL, cdf = NULL, sf = NULL, quantile = NULL, params = list(), support = c(-Inf, Inf) ) gpci_dist_hybrid2( name, pdf = NULL, cdf = NULL, sf = NULL, quantile = NULL, params = list(), support = c(-Inf, Inf) ) define_distribution( name, pdf = NULL, cdf = NULL, sf = NULL, quantile = NULL, params = list(), support = c(-Inf, Inf) )define_distribution_hybrid2( name, pdf = NULL, cdf = NULL, sf = NULL, quantile = NULL, params = list(), support = c(-Inf, Inf) ) gpci_dist_hybrid2( name, pdf = NULL, cdf = NULL, sf = NULL, quantile = NULL, params = list(), support = c(-Inf, Inf) ) define_distribution( name, pdf = NULL, cdf = NULL, sf = NULL, quantile = NULL, params = list(), support = c(-Inf, Inf) )
name |
Character string naming the distribution (e.g. |
pdf |
Optional function representing the probability density/mass function (PDF/PMF). Must be of the form |
cdf |
Optional function representing the cumulative distribution function (CDF). Must be of the form |
sf |
Optional function representing the survival function (SF = 1 - CDF). Must be of the form |
quantile |
Optional function representing the quantile function. Must be of the form |
params |
Named list of numeric parameter values for the distribution. Defaults to |
support |
Numeric vector of length 2 defining the lower and upper support bounds. Defaults to |
An S3 object of class "gpci_dist_hybrid2" containing:
name |
Character string of the distribution name. |
pdf |
The probability density function. |
cdf |
The cumulative distribution function. |
sf |
The survival function. |
quantile |
The quantile function. |
params |
Named list of numeric parameter values. |
param_names |
Character vector of parameter names. |
support |
Numeric vector of length 2 specifying support limits. |
# Define custom Weibull distribution using only the survival function custom_weib <- define_distribution_hybrid2( name = "custom_weibull", sf = function(x, shape, scale) pweibull(x, shape, scale, lower.tail = FALSE), params = list(shape = 2, scale = 10), support = c(0, Inf) ) print(custom_weib)# Define custom Weibull distribution using only the survival function custom_weib <- define_distribution_hybrid2( name = "custom_weibull", sf = function(x, shape, scale) pweibull(x, shape, scale, lower.tail = FALSE), params = list(shape = 2, scale = 10), support = c(0, Inf) ) print(custom_weib)
Exponential Distribution Constructor
dist_exponential(rate = 1)dist_exponential(rate = 1)
rate |
Rate parameter. |
A gpci_dist_hybrid2 object for Exponential distribution.
dist_e <- dist_exponential(rate = 0.5)dist_e <- dist_exponential(rate = 0.5)
Gamma Distribution Constructor
dist_gamma(shape = 1, scale = 1)dist_gamma(shape = 1, scale = 1)
shape |
Shape parameter. |
scale |
Scale parameter. |
A gpci_dist_hybrid2 object for Gamma distribution.
dist_g <- dist_gamma(shape = 3, scale = 2)dist_g <- dist_gamma(shape = 3, scale = 2)
Logistic Distribution Constructor
dist_logistic(location = 0, scale = 1)dist_logistic(location = 0, scale = 1)
location |
Location parameter. |
scale |
Scale parameter. |
A gpci_dist_hybrid2 object for Logistic distribution.
dist_l <- dist_logistic(location = 0, scale = 1)dist_l <- dist_logistic(location = 0, scale = 1)
Log-Logistic Distribution Constructor
dist_loglogistic(shape = 1, scale = 1)dist_loglogistic(shape = 1, scale = 1)
shape |
Shape parameter. |
scale |
Scale parameter. |
A gpci_dist_hybrid2 object for Log-Logistic distribution.
dist_ll <- dist_loglogistic(shape = 2, scale = 3)dist_ll <- dist_loglogistic(shape = 2, scale = 3)
Lognormal Distribution Constructor
dist_lognormal(meanlog = 0, sdlog = 1)dist_lognormal(meanlog = 0, sdlog = 1)
meanlog |
Mean of the logarithm. |
sdlog |
Standard deviation of the logarithm. |
A gpci_dist_hybrid2 object for Lognormal distribution.
dist_ln <- dist_lognormal(meanlog = 1, sdlog = 0.5)dist_ln <- dist_lognormal(meanlog = 1, sdlog = 0.5)
Normal Distribution Constructor
dist_normal(mean = 0, sd = 1)dist_normal(mean = 0, sd = 1)
mean |
Mean parameter. |
sd |
Standard deviation parameter. |
A gpci_dist_hybrid2 object for Normal distribution.
dist_norm <- dist_normal(mean = 10, sd = 2)dist_norm <- dist_normal(mean = 10, sd = 2)
Weibull Distribution Constructor
dist_weibull(shape = 1, scale = 1)dist_weibull(shape = 1, scale = 1)
shape |
Shape parameter. |
scale |
Scale parameter. |
A gpci_dist_hybrid2 object for Weibull distribution.
dist_w <- dist_weibull(shape = 2, scale = 5)dist_w <- dist_weibull(shape = 2, scale = 5)
Evaluates empirical standard errors, bias, MSE, and coverage probabilities for model parameters and Generalized Process Capability Indices (GPCIs) across Monte Carlo simulation runs.
eval_performance_hybrid2( distribution, r, tc, n, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) ) eval_performance( distribution, r, tc, n, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) ) gpci_sim_hybrid2( distribution, r, tc, n, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) )eval_performance_hybrid2( distribution, r, tc, n, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) ) eval_performance( distribution, r, tc, n, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) ) gpci_sim_hybrid2( distribution, r, tc, n, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) )
distribution |
A |
r |
Positive integer target number of failures. |
tc |
Positive numeric fixed censoring time. |
n |
Positive integer total number of initial units placed on life test. |
USL |
Numeric Upper Specification Limit. |
LSL |
Numeric Lower Specification Limit. |
target |
Numeric process target. Defaults to |
true_indices |
Optional named numeric vector of true capability index values. If |
M |
Positive integer scalar specifying number of Monte Carlo simulation runs. Defaults to 100. |
B |
Positive integer scalar specifying number of bootstrap iterations per simulation run. Defaults to 200. |
alpha |
Numeric vector of significance levels. Defaults to |
An S3 object of class "gpci_sim_hybrid2" containing:
param_summary |
Data frame of true values, mean estimates, standard errors (SE), bias, and MSE for model parameters. |
index_summary |
Data frame of true values, mean estimates, standard errors (SE), bias, and MSE for capability indices. |
coverage_probabilities |
Matrix of empirical coverage probabilities across all significance levels. |
M |
Total number of simulation runs requested. |
valid_runs |
Number of successfully converged simulation runs. |
B |
Number of bootstrap replicates per run. |
true_parameters |
Vector of true parameter values. |
true_indices |
Vector of true capability index values. |
dist_true <- dist_weibull(shape = 2, scale = 5) sim_res <- eval_performance_hybrid2( distribution = dist_true, r = 5, tc = 4.0, n = 12, USL = 8, LSL = 1, M = 5, B = 20 ) print(sim_res)dist_true <- dist_weibull(shape = 2, scale = 5) sim_res <- eval_performance_hybrid2( distribution = dist_true, r = 5, tc = 4.0, n = 12, USL = 8, LSL = 1, M = 5, B = 20 ) print(sim_res)
Fits process distribution parameters under Hybrid Type-II censored data using
the MleCensoR package (MleCensoR::mle_hybrid_type2) with robust numerical optimization fallbacks.
fit_distribution_hybrid2( x, r, tc, n, distribution, start = NULL, method = NULL, lower = NULL, upper = NULL, ... ) gpci_fit_hybrid2_dist( x, r, tc, n, distribution, start = NULL, method = NULL, lower = NULL, upper = NULL, ... ) fit_hybrid2( x, r, tc, n, distribution, start = NULL, method = NULL, lower = NULL, upper = NULL, ... )fit_distribution_hybrid2( x, r, tc, n, distribution, start = NULL, method = NULL, lower = NULL, upper = NULL, ... ) gpci_fit_hybrid2_dist( x, r, tc, n, distribution, start = NULL, method = NULL, lower = NULL, upper = NULL, ... ) fit_hybrid2( x, r, tc, n, distribution, start = NULL, method = NULL, lower = NULL, upper = NULL, ... )
x |
Numeric vector of observed failure times (sorted in ascending order). |
r |
Positive integer scalar specifying the target number of failures. |
tc |
Positive numeric scalar specifying the fixed censoring time. |
n |
Positive integer scalar specifying the total initial sample size placed on test. |
distribution |
A |
start |
Optional named numeric vector or list of starting parameter values. If |
method |
Character string specifying optimization method (e.g. |
lower |
Optional numeric vector of lower bounds for parameters under bounded optimization. Defaults to |
upper |
Optional numeric vector of upper bounds for parameters under bounded optimization. Defaults to |
... |
Additional arguments passed to |
A fitted gpci_dist_hybrid2 distribution object with updated parameters and attributes:
vcov |
Asymptotic variance-covariance matrix of estimated parameters. |
se |
Numeric vector of standard errors for estimated parameters. |
std_errs |
Alias for |
loglik |
Scalar log-likelihood value at the optimum. |
vdata |
Validated Hybrid Type-II censoring data summary list. |
dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) fit <- fit_distribution_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp) print(fit)dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) fit <- fit_distribution_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp) print(fit)
Performs goodness-of-fit testing for Hybrid Type-II censored lifetime data using
the gofPHCS package (gofPHCS::gof_test).
gof_test_hybrid2( fit = NULL, x = NULL, r = NULL, tc = NULL, n = NULL, distribution = NULL, statistic = "auto", p.method = c("auto", "asymptotic", "montecarlo"), nsim = 999, seed = NULL, conf.level = 0.95, ... ) gof_test( fit = NULL, x = NULL, r = NULL, tc = NULL, n = NULL, distribution = NULL, statistic = "auto", p.method = c("auto", "asymptotic", "montecarlo"), nsim = 999, seed = NULL, conf.level = 0.95, ... )gof_test_hybrid2( fit = NULL, x = NULL, r = NULL, tc = NULL, n = NULL, distribution = NULL, statistic = "auto", p.method = c("auto", "asymptotic", "montecarlo"), nsim = 999, seed = NULL, conf.level = 0.95, ... ) gof_test( fit = NULL, x = NULL, r = NULL, tc = NULL, n = NULL, distribution = NULL, statistic = "auto", p.method = c("auto", "asymptotic", "montecarlo"), nsim = 999, seed = NULL, conf.level = 0.95, ... )
fit |
Optional |
x |
Numeric vector of observed failure times (required if |
r |
Positive integer target number of failures (required if |
tc |
Positive numeric fixed censoring time (required if |
n |
Positive integer total sample size (required if |
distribution |
A |
statistic |
Character string specifying the test statistic (e.g. |
p.method |
Character string specifying method for calculating p-values: |
nsim |
Positive integer scalar specifying number of Monte Carlo replicates. Defaults to 999. |
seed |
Optional integer seed for reproducibility. Defaults to |
conf.level |
Numeric confidence level for test. Defaults to 0.95. |
... |
Additional arguments passed to |
An S3 object of class "gpci_gof_hybrid2" containing:
fit |
The original |
cens_data |
The |
gof_result |
The returned test result object from |
distribution |
The tested |
dist_exp <- dist_exponential(rate = 0.5) x <- c(0.2, 0.5, 0.8, 1.1) fit <- capability_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0) gof_res <- gof_test_hybrid2(fit, p.method = "montecarlo", nsim = 50) print(gof_res)dist_exp <- dist_exponential(rate = 0.5) x <- c(0.2, 0.5, 0.8, 1.1) fit <- capability_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0) gof_res <- gof_test_hybrid2(fit, p.method = "montecarlo", nsim = 50) print(gof_res)
Extract a Specific Capability Index
gpci_index_hybrid2(fit, index)gpci_index_hybrid2(fit, index)
fit |
A |
index |
Name of the capability index to retrieve or compute. |
Numeric scalar value of the index.
dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) fit <- capability_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0) gpci_index_hybrid2(fit, "Cpy")dist_exp <- dist_exponential(rate = 1) x <- c(0.2, 0.5, 0.8, 1.1) fit <- capability_hybrid2(x = x, r = 3, tc = 1.0, n = 10, distribution = dist_exp, USL = 3, LSL = 0) gpci_index_hybrid2(fit, "Cpy")
Print Method for Hybrid Type-II Bootstrap CIs
## S3 method for class 'gpci_ci_hybrid2' print(x, ...)## S3 method for class 'gpci_ci_hybrid2' print(x, ...)
x |
An object of class |
... |
Additional print arguments. |
The invisible object x.
Print Method for Hybrid Type-II Diagnostics
## S3 method for class 'gpci_diagnostics_hybrid2' print(x, ...)## S3 method for class 'gpci_diagnostics_hybrid2' print(x, ...)
x |
An object of class |
... |
Additional print arguments. |
The invisible object x.
Print Method for gpci_dist_hybrid2
## S3 method for class 'gpci_dist_hybrid2' print(x, ...)## S3 method for class 'gpci_dist_hybrid2' print(x, ...)
x |
An object of class |
... |
Additional print arguments. |
The invisible object x.
Print Method for gpci_gof_hybrid2
## S3 method for class 'gpci_gof_hybrid2' print(x, ...)## S3 method for class 'gpci_gof_hybrid2' print(x, ...)
x |
An object of class |
... |
Additional print arguments. |
The invisible object x.
Print Method for Hybrid Type-II Monte Carlo Simulation
## S3 method for class 'gpci_sim_hybrid2' print(x, ...)## S3 method for class 'gpci_sim_hybrid2' print(x, ...)
x |
An object of class |
... |
Additional print arguments. |
The invisible object x.
Print Method for gpcifit_hybrid2
## S3 method for class 'gpcifit_hybrid2' print(x, ...)## S3 method for class 'gpcifit_hybrid2' print(x, ...)
x |
An object of class |
... |
Additional print arguments. |
The invisible object x.
Summary Method for Hybrid Type-II Bootstrap CIs
## S3 method for class 'gpci_ci_hybrid2' summary(object, ...)## S3 method for class 'gpci_ci_hybrid2' summary(object, ...)
object |
An object of class |
... |
Additional arguments. |
The invisible object object.
Summary Method for Hybrid Type-II Diagnostics
## S3 method for class 'gpci_diagnostics_hybrid2' summary(object, ...)## S3 method for class 'gpci_diagnostics_hybrid2' summary(object, ...)
object |
An object of class |
... |
Additional arguments. |
The invisible object object.
Summary Method for gpci_dist_hybrid2
## S3 method for class 'gpci_dist_hybrid2' summary(object, ...)## S3 method for class 'gpci_dist_hybrid2' summary(object, ...)
object |
An object of class |
... |
Additional arguments. |
The invisible object object.
Summary Method for gpci_gof_hybrid2
## S3 method for class 'gpci_gof_hybrid2' summary(object, ...)## S3 method for class 'gpci_gof_hybrid2' summary(object, ...)
object |
An object of class |
... |
Additional arguments. |
The invisible object object.
Summary Method for Hybrid Type-II Monte Carlo Simulation
## S3 method for class 'gpci_sim_hybrid2' summary(object, ...)## S3 method for class 'gpci_sim_hybrid2' summary(object, ...)
object |
An object of class |
... |
Additional arguments. |
The invisible object object.
Summary Method for gpcifit_hybrid2
## S3 method for class 'gpcifit_hybrid2' summary(object, ...)## S3 method for class 'gpcifit_hybrid2' summary(object, ...)
object |
An object of class |
... |
Additional arguments. |
The invisible object object.
Extract asymptotic variance-covariance matrix of fitted distribution parameters.
## S3 method for class 'gpcifit_hybrid2' vcov(object, ...)## S3 method for class 'gpcifit_hybrid2' vcov(object, ...)
object |
An object of class |
... |
Additional arguments. |
Variance-covariance matrix.