sof_pc_real_time {funcharts} | R Documentation |
Get a list of scalar-on-function linear regression models estimated on functional data each evolving up to an intermediate domain point.
Description
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.
Usage
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
)
Arguments
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. |
Value
A list of lists each produced by sof_pc
,
corresponding to a given instant.
References
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
See Also
sof_pc
,
get_mfd_df_real_time
,
get_mfd_list_real_time
Examples
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)