FRTM_PhaseII: Phase II of the FRTM method.

View source: R/FRTM.R

FRTM_PhaseIIR Documentation

Phase II of the FRTM method.

Description

This function implements the monitoring phase (Phase II) of FRTM method.

Usage

FRTM_PhaseII(data_oc, mod_phaseI, ncores = 1)

Arguments

data_oc

A list containing the following arguments: x_err a list containing the discrete observations for each curve to be monitored; grid_i a list of vector of time points where the curves to be monitored are sampled.

mod_phaseI

An object of class mod_phaseI_FRTM obtained as output of the function FRTM_PhaseI.

ncores

If ncores>1, then parallel computing is used, with ncores cores. Default is 1.

Value

A list containing the following arguments:

T2_fd List of T^{2} functions for each observation.

SPE_fd List of SPE functions for each observation.

CL_T2 Control limit of the Hotelling's T^{2} control chart.

CL_SPE Control limit of the SPE control chart.

x_err A list containing the discrete observations for each curve.

grid_i A list of vector of time points where the curves are sampled.

x_list_smooth Smooth curves.

mod_phaseI An object of class mod_phaseI_FRTM obtained as output of the function FRTM_PhaseI.

Author(s)

F. Centofanti

References

Centofanti, F., A. Lepore, M. Kulahci, and M. P. Spooner (2024). Real-time monitoring of functional data. Accepted for publication in Journal of Quality Technology.

Examples

library(funcharts)
data <- simulate_data_FRTM(n_obs = 20)

data_oc <-
  simulate_data_FRTM(
    n_obs = 2,
    scenario = "1",
    shift = "OC_h",
    severity = 0.5
  )

lambda <- 10 ^ -5
max_x <- max(unlist(data$grid_i))
seq_t_tot <- seq(0, 1, length.out = 30)[-1]
seq_x <- seq(0.1, max_x, length.out = 10)


## Not run: 
  mod_phaseI_FRTM <- FRTM_PhaseI(
    data_tra =  data,
    control.FDTW = list(
      M = 30,
      N = 30,
      lambda = lambda,
      seq_t = seq_t_tot,
      iter_tem = 1,
      iter = 1
    ),
    control.rtr = list(seq_x = seq_x)
  )
  mod_phaseII_FRTM <- FRTM_PhaseII(data_oc = data_oc , mod_phaseI = mod_phaseI_FRTM)

  plot(mod_phaseI_FRTM)
  plot(mod_phaseII_FRTM)

## End(Not run)


funcharts documentation built on April 3, 2025, 7:47 p.m.