View source: R/autodependence.R
autocorrelation | R Documentation |
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
.
autocorrelation(X, lags)
X |
A dfts object or data which can be automatically converted to that
format. See |
lags |
Numeric(s) for the lags to estimate the lagged operator. |
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.
autocovariance()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.