cov.structure: Estimate cross-covariances of two stationary multivariate...

View source: R/cov.structure.R

cov.structureR Documentation

Estimate cross-covariances of two stationary multivariate time series

Description

This function computes the empirical cross-covariance of two stationary multivariate time series. If only one time series is provided it determines the empirical autocovariance function.

Usage

cov.structure(X, Y = X, lags = 0)

Arguments

X

vector or matrix. If matrix, then each row corresponds to a timepoint of a vector time series.

Y

vector or matrix. If matrix, then each row corresponds to a timepoint of a vector time series.

lags

an integer-valued vector (\ell_1,…, \ell_K) containing the lags for which covariances are calculated.

Details

Let [X_1,…, X_T]^\prime be a T\times d_1 matrix and [Y_1,…, Y_T]^\prime be a T\times d_2 matrix. We stack the vectors and assume that (X_t^\prime,Y_t^\prime)^\prime is a stationary multivariate time series of dimension d_1+d_2. This function determines empirical lagged covariances between the series (X_t) and (Y_t). More precisely it determines \widehat{C}^{XY}(h) for h\in lags, where \widehat{C}^{XY}(h) is the empirical version of \mathrm{Cov}(X_h,Y_0). For a sample of size T we set \hatμ^X=\frac{1}{T}∑_{t=1}^T X_t and \hatμ^Y=\frac{1}{T}∑_{t=1}^T Y_t and

\hat C^{XY}(h) = \frac{1}{T}∑_{t=1}^{T-h} (X_{t+h} - \hatμ^X)(Y_{t} - \hatμ^Y)'

and for h < 0

\hat C^{XY}(h) = \frac{1}{T}∑_{t=|h|+1}^{T} (X_{t+h} - \hatμ^X)(Y_{t} - \hatμ^Y)'.

Value

An object of class timedom. The list contains

  • operators \quad an array. Element [,,k] contains the covariance matrix related to lag \ell_k.

  • lags \quad returns the lags vector from the arguments.


freqdom documentation built on Oct. 4, 2022, 5:05 p.m.