cor_mfd: Correlation Function for Multivariate Functional Data

View source: R/00_mfd.R

cor_mfdR Documentation

Correlation Function for Multivariate Functional Data

Description

Computes the correlation function for two multivariate functional data objects of class mfd.

Usage

cor_mfd(mfdobj1, mfdobj2 = mfdobj1)

Arguments

mfdobj1

An object of class mfd representing the first multivariate functional data set. It contains N observations of a p-dimensional multivariate functional variable.

mfdobj2

An object of class mfd representing the second multivariate functional data set. Defaults to mfdobj1. If provided, it must also contain N observations of a p-dimensional multivariate functional variable.

Details

The function calculates the correlation between all pairs of dimensions from the two multivariate functional data objects. The data is first scaled using scale_mfd, and the correlation is then computed as the covariance of the scaled data using cov_mfd.

Value

A bifd object representing the correlation function of the two input objects. The output is a collection of p^2 functional surfaces, each corresponding to the correlation between two components of the multivariate functional data.

Examples

## Not run: 
library(funcharts)
data("air")
x <- get_mfd_list(air[1:3])
cor_result <- cor_mfd(x)
plot_bifd(cor_result)

## End(Not run)


funcharts documentation built on April 3, 2025, 7:47 p.m.