View source: R/LGICARL_CUSUM_Down.R
ARL_Clminus | R Documentation |
This function calculates the Average Run Length (ARL) of a CUSUM control chart based on the Gamma distribution, incorporating a cautious learning scheme for the dynamic update of parameters.
The function allows the evaluation of the CUSUM chart’s performance under different parameterization scenarios, ensuring efficient detection of process changes.
Based on the methodology presented in the work of Madrid-Alvarez, García-Díaz, and Tercero-Gómez (2024), this implementation uses Monte Carlo simulations optimized in C++ for efficient execution and progressive adjustment of the control chart parameters.
The values for H_minus
, H_delta
, K_l
, delay
, and tau
can be referenced in the tables from the article:
Madrid-Alvarez, H. M., García-Díaz, J. C., & Tercero-Gómez, V. G. (2024). A CUSUM control chart for the Gamma distribution with cautious parameter learning. Quality Engineering, 1-23.
Scenario 1: Known alpha
and estimated beta
The alpha
parameter is assumed to be fixed and known in advance.
beta
is estimated from a dataset or provided by the user.
The user must specify alpha
and an initial estimate of beta
(beta0_est
).
Scenario 2: Both alpha
and beta
are estimated
Both alpha
and beta
are estimated from an external dataset.
The user must calculate alpha0_est
and beta0_est
before calling the function.
beta0_est
is dynamically updated during the simulation when a predefined condition is met.
Implements Monte Carlo simulations for ARL estimation.
Allows dynamic updating of beta0_est
to improve model adaptation.
Uses C++ optimization for efficient and precise execution.
Compatible with scenarios where alpha
is either known or estimated.
Recommended values for H_minus
, H_delta
, K_l
, delay
, and tau
can be found in the reference article.
This function is ideal for quality control studies where reliable detection of process changes modeled with Gamma distributions is required.
ARL_Clminus(
alpha,
beta,
alpha0_est,
beta0_est,
known_alpha,
beta_ratio,
H_delta,
H_minus,
n_I,
replicates,
K_l,
delay,
tau
)
alpha |
Shape parameter of the Gamma distribution. |
beta |
Scale parameter of the Gamma distribution. |
alpha0_est |
Initial estimate of the shape parameter |
beta0_est |
Initial estimate of the scale parameter |
known_alpha |
|
beta_ratio |
Ratio between |
H_delta |
Increment of the lower control limit in the CUSUM chart. |
H_minus |
Initial control limit of the CUSUM chart for downward detection. |
n_I |
Sample size in Phase I. |
replicates |
Number of Monte Carlo simulations. |
K_l |
Secondary control threshold for parameter updating. |
delay |
Number of observations before updating |
tau |
Time point at which |
A numeric value corresponding to the ARL estimate for the downward CUSUM control chart with cautious learning.
# Option 1: Provide parameters directly
ARL_Clminus(
alpha = 1,
beta = 1,
alpha0_est = 1.067, # alpha = known_alpha
beta0_est = 0.2760, # Estimated Beta
known_alpha = TRUE,
beta_ratio = 1/2,
H_delta = 0.6946,
H_minus = -4.8272,
n_I = 500,
replicates = 1000,
K_l = 0.5,
delay = 25,
tau = 1
)
# Option 2: Use generated data
set.seed(123)
datos_faseI <- rgamma(n = 500, shape = 1, scale = 1)
alpha0_est <- mean(datos_faseI)^2 / var(datos_faseI) # Alpha estimation
beta0_est <- mean(datos_faseI) / alpha0_est # Beta estimation
ARL_Clminus(
alpha = 1,
beta = 1,
alpha0_est = 1.067, # alpha = known_alpha
beta0_est = 0.2760, # Estimated Beta
known_alpha = FALSE,
beta_ratio = 1/2,
H_delta = 0.6946,
H_minus = -4.8272,
n_I = 500,
replicates = 1000,
K_l = 0.5,
delay = 25,
tau = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.