sof_pc_real_time: Get a list of scalar-on-function linear regression models...

Description Usage Arguments Value References See Also Examples

View source: R/real_time_02_sof_pc.R

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

1
2
3
4
5
6
7
8
9
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 get_mfd_df_real_time or get_mfd_list_real_time, denoting a list of functional data objects, each evolving up to an intermediate domain point, with observations of the multivariate functional covariates.

single_min_variance_explained

See sof_pc.

tot_variance_explained

See sof_pc.

selection

See sof_pc.

components

See sof_pc.

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

1
2
3
4
5
6
7
8
9
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)

funcharts documentation built on March 15, 2021, 5:07 p.m.