autocorrelation: Estimate the autocorrelation function of the series

View source: R/autodependence.R

autocorrelationR Documentation

Estimate the autocorrelation function of the series

Description

Obtain the empirical autocorrelation function for the given lags of a functional time series, X. Given a functional time series, the sample autocovariance functions \hat{C}_{h}(u,v) are given by:

\hat{C}_{h}(u,v) = \frac{1}{N} \sum_{i=1}^{N-|h|}(X_{i}(u) - \overline{X}_{N}(u))(X_{i+|h|}(v) - \overline{X}_{N}(v))

where \overline{X}_{N}(u) = \frac{1}{N} \sum_{i = 1}^{N} X_{i}(t) denotes the sample mean function and h is the lag parameter. The autocorrelation functions are defined over the range (0,1) by normalizing these functions using the factor \int\hat{C}_{0}(u,u)du.

Usage

autocorrelation(X, lags)

Arguments

X

A dfts object or data which can be automatically converted to that format. See dfts().

lags

Numeric(s) for the lags to estimate the lagged operator.

Value

Return a list or data.frame with the lagged autocorrelation function(s) estimated from the data. Each function is given by a (r x r) matrix, where r is the number of points observed in each curve.

See Also

autocovariance()

Examples

N <- 100
v <- seq(from = 0, to = 1, length.out = 10)
bbridge <- generate_brownian_bridge(N = N, v = v)
lagged_autocor <- autocorrelation(X = bbridge, lags = 0:1)

fChange documentation built on June 21, 2025, 9:08 a.m.