plot_autocovariance: Generate a 3D plot of the autocovariance surface of a given...

Description Usage Arguments Examples

View source: R/plotting_functions.R

Description

Obtain a 3D plot of the autocovariance surfaces of a given functional time series. This visualization is useful to detect any kind of dependency between the discretization points of the series.

Usage

1
plot_autocovariance(fun.autocovariance, lag = 0, ...)

Arguments

fun.autocovariance

A list obtained by calling the function obtain_autocovariance.

lag

An integer between 0 and nlags, indicating the lagged autocovariance function to be plotted. By default 0.

...

Further arguments passed to the persp function.

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
# Example 1

N <- 100
v <- seq(from = 0, to = 1, length.out = 10)
sig <- 2
bbridge <- simulate_iid_brownian_bridge(N, v, sig)
nlags <- 1
lagged_autocov <- obtain_autocovariance(Y = bbridge,nlags = nlags)
plot_autocovariance(lagged_autocov,1)


# Example 2

N <- 500
v <- seq(from = 0, to = 1, length.out = 50)
sig <- 2
bbridge <- simulate_iid_brownian_bridge(N, v, sig)
nlags <- 4
lagged_autocov <- obtain_autocovariance(Y = bbridge,nlags = nlags)
opar <- par(no.readonly = TRUE)
par(mfrow = c(1,5))
for(k in 0:nlags){
   plot_autocovariance(lagged_autocov,k)
}
par(opar)

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