long_run_covariance: Estimate Long-run Covariance Kernel

View source: R/long_run_cov.R

long_run_covarianceR Documentation

Estimate Long-run Covariance Kernel

Description

Estimate the long-run covariance kernel for functional data. That is, solve C_{\epsilon}(t,t') = \sum_{l=-\inf}^{\inf} \text{Cov}(\epsilon_0(t), \epsilon_l(t')) with sequence (\epsilon_i : i \in \mathbb{Z}) defined as the centered data (can center based on changes if given).

Usage

long_run_covariance(
  X,
  h = 2 * ncol(X)^(1/5),
  K = bartlett_kernel,
  changes = NULL
)

Arguments

X

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

h

The window parameter parameter for the estimation of the long run covariance kernel. The default value is h=2*ncol(X)^(1/5). Note there exists an internal check such that h=min(h,ncol(X)-1) when alternative options are given.

K

Function indicating the kernel to use if h>0.

changes

Vector of numeric change point locations. Can be NULL.

Value

Symmetric data.frame of numerics with dim of ncol(data) x ncol(data).

Examples

result <- long_run_covariance(electricity, 2)

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