Learn R Programming

funcharts (version 1.8.0)

mean.mfd: Mean Function for Multivariate Functional Data

Description

Computes the mean function for an object of class mfd.

Usage

# S3 method for mfd
mean(x, ...)

Value

An object of class mfd representing the mean function. The output contains a single observation, corresponding to the mean function for each variable.

Arguments

x

An object of class mfd, containing \(N\) observations of a \(p\)-dimensional multivariate functional variable.

...

Further arguments are ignored (required for S3 consistency).

Details

The method averages the coefficient array across the observation dimension, resulting in a new mfd object with one observation (the sample mean).

See Also

mfd, plot.mfd

Examples

Run this code
# \donttest{
library(funcharts)
data(air)
mfdobj <- get_mfd_list(air)
mean_result <- mean(mfdobj)
plot(mean_result)
# }

Run the code above in your browser using DataLab