norm: Calculate the norm of functional data

Description Arguments Details Value Warning See Also Examples

Description

This function calculates the norm for each observation of a funData, irregFunData or multiFunData object.

Arguments

object

An object of class funData, irregFunData or multiFunData.

...

Further parameters (see Details).

Details

For funData objects, the standard L^2 norm is calculated:

||f|| = (\int f(t)^2 dt)^{1/2}.

For irregFunData objects, each observed function is integrated only on the observed grid points (unless fullDom = TRUE).

The (weighted) norm of a multivariate functional data object f = (f_1 , …, f_p) is defined as

||| f ||| := ( ∑ w_j || f_j ||^2 )^{1/2}.

Further parameters passed to this function may include:

Value

A numeric vector representing the norm of each observation.

Warning

The function is currently implemented only for functional data with one- and two-dimensional domains.

See Also

funData, irregFunData, multiFunData, integrate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Univariate
object <- funData(argvals = 1:5, X = rbind(1:5, 6:10))
norm(object)

# Univariate (irregular)
irregObject <- irregFunData(argvals = list(1:5, 2:4), X = list(2:6, 3:5))
norm(irregObject) # no extrapolation
norm(irregObject, fullDom = TRUE) # extrapolation (of second function)

# Multivariate
multiObject <- multiFunData(object, funData(argvals = 1:3, X = rbind(3:5, 6:8)))
norm(multiObject)
norm(multiObject, weight = c(2,1)) # with weight vector, giving more weight to the first element

funData documentation built on Oct. 17, 2021, 5:06 p.m.