| simulate_data_RoMFCC | R Documentation |
Generate multivariate functional data under different contamination models (casewise, componentwise, or both) for use in simulation studies of the Robust Multivariate Functional Control Chart (RoMFCC) as described in Capezza, Centofanti, Lepore, and Palumbo (2024).
simulate_data_RoMFCC(
nobs = 1000,
p = 3,
p_cellwise = 0,
p_casewise = 0,
sd_e = 0.005,
sd = 0.002,
T_exp = 0.6,
outlier = "no",
M_outlier_case = 0,
M_outlier_cell = 0,
OC = "no",
M_OC = 0,
P = 100,
max_n_cellwise = Inf,
correlation = "decreasing",
k = 1,
which_OC = 5
)
nobs |
Integer. Number of observations to simulate (default 1000). |
p |
Integer. Number of functional components (variables) (default 3). |
p_cellwise |
Numeric in |
p_casewise |
Numeric in |
sd_e |
Numeric. Standard deviation of the additive measurement noise (default 0.005). |
sd |
Numeric. Standard deviation scaling of the functional part (default 0.002). |
T_exp |
Numeric in |
outlier |
Character. Type of contamination in Phase I sample:
|
M_outlier_case |
Numeric. Magnitude of casewise outlier contamination (default 0). |
M_outlier_cell |
Numeric. Magnitude of cellwise outlier contamination (default 0). |
OC |
Character. Out-of-control model in Phase II data:
|
M_OC |
Numeric. Magnitude of out-of-control shift (default 0). |
P |
Integer. Number of grid points in each functional profile (default 100). |
max_n_cellwise |
Integer. Maximum number of components per observation
allowed to be cellwise contaminated (default |
correlation |
Character. Correlation structure among components:
typically |
k |
Integer. Correlation parameter (default 1). |
which_OC |
Integer vector. Indices of components subject to out-of-control shifts in Phase II (default 5). |
The generated data mimic dynamic resistance curves (DRCs) in resistance spot welding processes and allow for controlled introduction of casewise and/or componentwise outliers, as in the Monte Carlo study presented in the RoMFCC paper.
The function generates nobs realizations of a p-variate functional
quality characteristic observed on an equally spaced grid of size P.
The underlying process is simulated through a Karhunen–Loève expansion
with eigenfunctions and eigenvalues derived from a specified correlation
structure. Outliers can be introduced at cellwise level (single components),
casewise level (entire observation), or both, using probability parameters
p_cellwise and p_casewise and magnitudes
M_outlier_cell, M_outlier_case.
Out-of-control shifts in Phase II can be introduced via the OC argument.
This setup mirrors the simulation design in Section 4 of Capezza et al. (2024) where RoMFCC was benchmarked against competing control charts under various contamination scenarios.
A list with two elements:
A list of length p, each element a matrix of
dimension nobs × P with the simulated functional observations.
A list of length p, each element containing the
indices of observations contaminated in that component.
Capezza, C., Centofanti, F., Lepore, A., Palumbo, B. (2024) Robust Multivariate Functional Control Chart. Technometrics, 66(4):531–547, doi:10.1080/00401706.2024.2327346.
# Simulate uncontaminated data (Phase I)
sim <- simulate_data_RoMFCC(nobs = 200, p = 3, outlier = "no", OC = "no")
str(sim$X_mat_list)
# Simulate with componentwise outliers in Phase I
sim2 <- simulate_data_RoMFCC(nobs = 200, p = 3,
p_cellwise = 0.05, M_outlier_cell = 0.03,
outlier = "outlier_E")
# Simulate Phase II with a mean shift in one component
sim3 <- simulate_data_RoMFCC(nobs = 200, p = 3,
OC = "OC_M", M_OC = 0.04, which_OC = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.