predict_fof_pc {funcharts}R Documentation

Use a function-on-function linear regression model for prediction

Description

Predict new observations of the functional response variable and calculate the corresponding prediction error (and their standardized or studentized version) given new observations of functional covariates and a fitted function-on-function linear regression model.

Usage

predict_fof_pc(object, mfdobj_y_new, mfdobj_x_new)

Arguments

object

A list obtained as output from fof_pc, i.e. a fitted function-on-function linear regression model.

mfdobj_y_new

An object of class mfd containing new observations of the functional response.

mfdobj_x_new

An object of class mfd containing new observations of the functional covariates.

Value

A list of mfd objects. It contains:

References

Centofanti F, Lepore A, Menafoglio A, Palumbo B, Vantini S. (2021) Functional Regression Control Chart. Technometrics, 63(3), 281–294. doi:10.1080/00401706.2020.1753581

Examples

library(funcharts)
data("air")
air <- lapply(air, function(x) x[1:10, , drop = FALSE])
fun_covariates <- c("CO", "temperature")
mfdobj_x <- get_mfd_list(air[fun_covariates], lambda = 1e-2)
mfdobj_y <- get_mfd_list(air["NO2"], lambda = 1e-2)
mod <- fof_pc(mfdobj_y, mfdobj_x)
predict_fof_pc(mod,
               mfdobj_y_new = mfdobj_y,
               mfdobj_x_new = mfdobj_x)

[Package funcharts version 1.5.0 Index]