AMFEWMA_PhaseI {funcharts} | R Documentation |
Adaptive Multivariate Functional EWMA control chart - Phase I
Description
This function performs Phase I of the Adaptive Multivariate Functional EWMA (AMFEWMA) control chart proposed by Capezza et al. (2024)
Usage
AMFEWMA_PhaseI(
mfdobj,
mfdobj_tuning,
lambda = NULL,
k = NULL,
ARL0 = 200,
bootstrap_pars = list(n_seq = 200, l_seq = 2000),
optimization_pars = list(lambda_grid = c(0.1, 0.2, 0.3, 0.5, 1), k_grid = c(1, 2, 3,
4), epsilon = 0.1, sd_small = 0.25, sd_big = 2),
discrete_grid_length = 25,
score_function = "huber",
fev = 0.9,
n_skip = 100
)
Arguments
mfdobj |
An object of class |
mfdobj_tuning |
An object of class |
lambda |
lambda parameter to be used in the score function.
See Equation (7) or (8) of Capezza et al. (2024).
If it is provided, it must be a number between zero and one.
If NULL, it is chosen through the selected according to the
optimization procedure presented in Section 2.4 of Capezza et al. (2024).
In this case, it is chosen among the values of
|
k |
k parameter to be used in the score function.
See Equation (7) or (8) of Capezza et al. (2024).
If it is provided, it must be a number greater than zero.
If NULL, it is chosen through the selected according to the
optimization procedure presented in Section 2.4 of Capezza et al. (2024).
In this case, it is chosen among the values of
|
ARL0 |
The nominal in-control average run length. Default value is 200. |
bootstrap_pars |
Parameters of the bootstrap procedure described in
Section 2.4 of Capezza et al. (2024) for the estimation of the
control chart limit.
It must be a list with two arguments.
|
optimization_pars |
Parameters to be used in the optimization procedure described in Section
2.4 of Capezza et al. (2024) for the selection of the parameters
lambda and k.
It must be a list of the following parameters.
|
discrete_grid_length |
The number of equally spaced argument values at which the |
score_function |
Score function to be used in Equation (7) or (8) of Capezza et al. (2024), to calculate the weighting parameter of the EWMA statistic for each observation of the sequence. Two values are possible. If "huber", it uses the score function (7) inspired by the Huber's function. If "tukey", it uses the score function (8) inspired by the Tukey's bisquare function. |
fev |
Number between 0 and 1 denoting the fraction
of variability that must be explained by the
principal components to be selected after
applying multivariate functional principal component analysis
on |
n_skip |
The upper control limit of the AMFEWMA control chart is set
to achieve a desired in-control ARL, evaluated after the
monitoring statistic has reached steady state.
A monitoring statistic is in a steady state
if the process has been in control long enough
for the effect of the starting value to become negligible
(Lucas and Saccucci, 1990).
In this regard, the first |
Value
A list with the following elements.
lambda
is the selected lambda parameter.
k
is the selected k parameter.
mod_1
contains the estimated Phase I model. It is a list with
the following elements.
-
mfdobj
themfdobj
object passed as input to this function, -
mfdobj_tuning
themfdobj_tuning
object passed as input to this function, -
inv_sigmaY_reg
: the matrix containing the discretized version of the function K^*(s,t) defined in Equation (9) of Capezza et al. (2024), -
mean_mfdobj
: the estimated mean function, -
h
: the calculated upper control limit of the AMFEWMA control chart, -
ARL0
: the estimated in-control ARL, which should be close to the nominal value passed as input to this function, -
lambda
: the lambda parameter selected by the optimization procedure described in Section 2.4 of Capezza et al. (2024). -
k
: The function C_j(t)=k sigma_j(t) appearing in the score functions (7) and (8) of Capezza et al. (2024). -
grid_points
: the grid containing the points over which the functional data are discretized before computing the AMFEWMA monitoring statistic and estimating all the model parameters. -
V2_mat
: then_seq
Xl_seq
matrix containing, in each column, the AMFEWMA monitoring statistic values of each bootstrap sequence. This matrix is used to set the control chart limith
to ensure that the desired average run length is achieved. -
n_skip
: then_skip
input parameter passed to this function, -
huber
: if the input parameterscore_function
is"huber"
, this is TRUE, else is FALSE, -
vectors
: the discretized eigenfunctions psi_l(t) of the covariance function, appearing in Equation (9) of Capezza et al. (2024). -
values
: the eigenvalues rho_l of the covariance function, appearing in Equation (9) of Capezza et al. (2024).
References
Capezza, C., Capizzi, G., Centofanti, F., Lepore, A., Palumbo, B. (2024) An Adaptive Multivariate Functional EWMA Control Chart. Accepted for publication in Journal of Quality Technology.
Lucas, J. M., Saccucci, M. S. (1990) Exponentially weighted moving average control schemes: properties and enhancements. Technometrics, 32(1), 1-12.
Examples
## Not run: set.seed(0)
library(funcharts)
dat_I <- simulate_mfd(nobs = 1000,
correlation_type_x = c("Bessel", "Bessel", "Bessel"),
sd_x = c(0.3, 0.3, 0.3))
dat_tun <- simulate_mfd(nobs = 1000,
correlation_type_x = c("Bessel", "Bessel", "Bessel"),
sd_x = c(0.3, 0.3, 0.3))
dat_II <- simulate_mfd(nobs = 200,
correlation_type_x = c("Bessel", "Bessel", "Bessel"),
shift_type_x = c("C", "C", "C"),
d_x = c(2, 2, 2),
sd_x = c(0.3, 0.3, 0.3))
mfdobj_I <- get_mfd_list(dat_I$X_list)
mfdobj_tun <- get_mfd_list(dat_tun$X_list)
mfdobj_II <- get_mfd_list(dat_II$X_list)
p <- plot_mfd(mfdobj_I[1:100])
lines_mfd(p, mfdobj_II, col = "red")
mod <- AMFEWMA_PhaseI(mfdobj = mfdobj_I, mfdobj_tuning = mfdobj_tun)
print(mod$k)
cc <- AMFEWMA_PhaseII(mfdobj_2 = rbind_mfd(mfdobj_I[1:100], mfdobj_II),
mod_1 = mod)
plot_control_charts(cc$cc, nobsI = 100)
## End(Not run)