obtain_suface_L2_norm: Obtain L2 norm of the autocovariance functions

Description Usage Arguments Value Examples

View source: R/estimate_distribution.R

Description

Returns the L2 norm of the lagged autocovariance functions \hat{C}_{h}. The L2 norm of these functions is defined as

√(\int \int \hat{C}^{2}_{h}(u,v)du dv)

Usage

1
obtain_suface_L2_norm(v, autocovSurface)

Arguments

v

Discretization points of the curves, by default seq(from = 0, to = 1, length.out = 100).

autocovSurface

An (m x m) matrix with the discretized values of the autocovariance operator \hat{C}_{0}, obtained by calling the function obtain_autocovariance. The value m indicates the number of points observed in each curve.

Value

A vector containing the L2 norm of the lagged autocovariance functions autocovSurface.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Example 1

N <- 100
v <- seq(from = 0, to = 1, length.out = 10)
sig <- 2
Y <- simulate_iid_brownian_bridge(N, v, sig)
nlags <- 1
autocovSurface <- obtain_autocovariance(Y=Y,nlags = nlags)
norms <- obtain_suface_L2_norm(v = v,autocovSurface = autocovSurface)
plot_autocovariance(fun.autocovariance = autocovSurface,lag = 1)
title(sub = paste0("Lag ",1," - L2 Norm: ",norms[2]))


# Example 2

N <- 400
v <- seq(from = 0, to = 1, length.out = 50)
sig <- 2
Y <- simulate_iid_brownian_bridge(N, v, sig)
nlags <- 2
autocovSurface <- obtain_autocovariance(Y=Y,nlags = nlags)
norms <- obtain_suface_L2_norm(v = v,autocovSurface = autocovSurface)
opar <- par(no.readonly = TRUE)
par(mfrow = c(1,3))
plot_autocovariance(fun.autocovariance = autocovSurface,lag = 0)
title(sub = paste0("Lag ",0," - L2 Norm: ",norms[1]))
plot_autocovariance(fun.autocovariance = autocovSurface,lag = 1)
title(sub = paste0("Lag ",1," - L2 Norm: ",norms[2]))
plot_autocovariance(fun.autocovariance = autocovSurface,lag = 2)
title(sub = paste0("Lag ",2," - L2 Norm: ",norms[3]))
par(opar)

fdaACF documentation built on Oct. 23, 2020, 8:05 p.m.