Learn R Programming

fdaACF (version 0.1.0)

obtain_FACF: Obtain the autocorrelation function for a given functional time series.

Description

Estimate the lagged autocorrelation function for a given functional time series and its distribution under the hypothesis of strong functional white noise. This graphic tool can be used to identify seasonal patterns in the functional data as well as auto-regressive or moving average terms. i.i.d. bounds are included to test the presence of serial correlation in the data.

Usage

obtain_FACF(Y, v, nlags, ci = 0.95, estimation = "MC", figure = TRUE, ...)

Arguments

Y

Matrix containing the discretized values of the functional time series. The dimension of the matrix is \((n x m)\), where \(n\) is the number of curves and \(m\) is the number of points observed in each curve.

v

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

nlags

Number of lagged covariance operators of the functional time series that will be used to estimate the autocorrelation function.

ci

A value between 0 and 1 that indicates the confidence interval for the i.i.d. bounds of the autocorrelation function. By default ci = 0.95.

estimation

Character specifying the method to be used when estimating the distribution under the hypothesis of functional white noise. Accepted values are:

  • "MC": Monte-Carlo estimation.

  • "Imhof": Estimation using Imhof's method.

By default, estimation = "MC".

figure

Logical. If TRUE, plots the estimated autocorrelation function with the specified i.i.d. bound.

...

Further arguments passed to the plot_FACF function.

Value

Return a list with:

  • Blueline: The upper prediction bound for the i.i.d. distribution.

  • rho: Autocorrelation values for each lag of the functional time series.

References

https://www.sciencedirect.com/science/article/pii/S0047259X17303512

Examples

Run this code
# NOT RUN {
# Example 1

N <- 100
v <- seq(from = 0, to = 1, length.out = 5)
sig <- 2
Y <- simulate_iid_brownian_bridge(N, v, sig)
obtain_FACF(Y,v,20)

# }
# NOT RUN {
# Example 2

data(elec_prices)
v <- seq(from = 1, to = 24)
nlags <- 50
obtain_FACF(Y = as.matrix(elec_prices), 
v = v,
nlags = nlags,
ci = 0.95,
figure = TRUE)
# }

Run the code above in your browser using DataLab