Description Usage Arguments Value Examples
View source: R/estimate_distribution.R
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)
1 | obtain_suface_L2_norm(v, autocovSurface)
|
v |
Discretization points of the curves, by default
|
autocovSurface |
An (m x m) matrix with
the discretized values of the autocovariance operator
\hat{C}_{0}, obtained by calling the
function |
A vector containing the L2 norm of the
lagged autocovariance functions autocovSurface
.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.