View source: R/real_time_02_sof_pc.R
sof_pc_real_time | R Documentation |
This function produces a list of objects,
each of them contains the result of applying sof_pc
to
a scalar response variable and multivariate functional covariates
evolved up to an intermediate domain point.
See Capezza et al. (2020) for additional details on real-time monitoring.
sof_pc_real_time(
y,
mfd_real_time_list,
single_min_variance_explained = 0,
tot_variance_explained = 0.9,
selection = "PRESS",
components = NULL,
ncores = 1
)
y |
A numeric vector containing the observations of the scalar response variable. |
mfd_real_time_list |
A list created using
|
single_min_variance_explained |
See |
tot_variance_explained |
See |
selection |
See |
components |
See |
ncores |
If you want parallelization, give the number of cores/threads to be used when creating objects separately for different instants. |
A list of lists each produced by sof_pc
,
corresponding to a given instant.
C. Capezza
Capezza C, Lepore A, Menafoglio A, Palumbo B, Vantini S. (2020) Control charts for monitoring ship operating conditions and CO2 emissions based on scalar-on-function regression. Applied Stochastic Models in Business and Industry, 36(3):477–500. doi:10.1002/asmb.2507
sof_pc
,
get_mfd_df_real_time
,
get_mfd_list_real_time
library(funcharts)
data("air")
air <- lapply(air, function(x) x[1:10, , drop = FALSE])
mfdobj_list <- get_mfd_list_real_time(air[c("CO", "temperature")],
n_basis = 15,
lambda = 1e-2,
k_seq = c(0.5, 0.75, 1))
y <- rowMeans(air$NO2)
mod_list <- sof_pc_real_time(y, mfdobj_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.