Learn R Programming

ddalpha (version 1.3.16)

Cmetric: Fast Computation of the Uniform Metric for Sets of Functional Data

Description

Returns the matrix of \(C\) (uniform) distances between two sets of functional data.

Usage

Cmetric(A, B)

Value

A symmetric matrix of the distances of the functions of size m*n.

Arguments

A

Functions of the first set, represented by a matrix of their functional values of size m*d. m stands for the number of functions, d is the number of the equi-distant points in the domain of the data at which the functional values of the m functions are evaluated.

B

Functions of the second set, represented by a matrix of their functional values of size n*d. n stands for the number of functions, d is the number of the equi-distant points in the domain of the data at which the functional values of the n functions are evaluated. The grid of observation points for the functions A and B must be the same.

Author

Stanislav Nagy, nagy@karlin.mff.cuni.cz

Details

For two sets of functional data of sizes m and n represented by matrices of their functional values, this function returns the symmetric matrix of size m*n whose entry in the i-th row and j-th column is the approximated \(C\) (uniform) distance of the i-th function from the first set, and the j-th function from the second set. This function is utilized in the computation of the h-mode depth.

See Also

depthf.hM

dataf2rawfd

Examples

Run this code
datapop = dataf2rawfd(dataf.population()$dataf,range=c(1950,2015),d=66)
A = datapop[1:20,]
B = datapop[21:50,]
Cmetric(A,B)

Run the code above in your browser using DataLab