View source: R/fts.cov.structure.R
fts.cov.structure | R Documentation |
This function is used to estimate a collection of cross-covariances operators of two stationary functional series.
fts.cov.structure(X, Y = X, lags = 0)
X |
an object of class |
Y |
an object of class |
lags |
an integer-valued vector (\ell_1,…, \ell_K) containing the lags for which covariances are calculated. |
Let X_1(u),…, X_T(u) and Y_1(u),…, Y_T(u) be two samples of functional data. This function determines empirical lagged covariances between the series (X_t(u)) and (Y_t(u)). More precisely it determines
(\widehat{c}^{XY}_h(u,v)\colon h\in lags ),
where \widehat{c}^{XY}_h(u,v) is the empirical version of the covariance kernel \mathrm{Cov}(X_h(u),Y_0(v)). For a sample of size T we set \hatμ^X(u)=\frac{1}{T}∑_{t=1}^T X_t(u) and \hatμ^Y(v)=\frac{1}{T}∑_{t=1}^T Y_t(v). Now for h ≥q 0
\frac{1}{T}∑_{t=1}^{T-h} (X_{t+h}(u)-\hatμ^X(u))(Y_t(v)-\hatμ^Y(v))
and for h < 0
\frac{1}{T}∑_{t=|h|+1}^{T} (X_{t+h}(u)-\hatμ^X(u))(Y_t(v)-\hatμ^Y(v)).
Since X_t(u)=\boldsymbol{b}_1^\prime(u)\mathbf{x}_t and Y_t(u)=\mathbf{y}_t^\prime \boldsymbol{b}_2(u) we can write
\widehat{c}^{XY}_h(u,v)=\boldsymbol{b}_1^\prime(u)\widehat{C}^{\mathbf{xy}}\boldsymbol{b}_2(v),
where \widehat{C}^{\mathbf{xy}} is defined as for the function “cov.structure” for series of coefficient vectors (\mathbf{x}_t\colon 1≤q t≤q T) and (\mathbf{y}_t\colon 1≤q t≤q T).
An object of class fts.timedom
. The list contains the following components:
operators
\quad an array. Element [,,k]
contains the covariance matrix of the coefficient vectors of the two time series related to lag \ell_k.
lags
\quad the lags vector from the arguments.
basisX
\quad X$basis
, an object of class basis.fd
(see create.basis
)
basisY
\quad Y$basis
, an object of class basis.fd
(see create.basis
)
The multivariate equivalent in the freqdom
package: cov.structure
# Generate an autoregressive process fts = fts.rar(d=3) # Get covariance at lag 0 fts.cov.structure(fts, lags = 0) # Get covariance at lag 10 fts.cov.structure(fts, lags = 10) # Get entire covariance structure between -20 and 20 fts.cov.structure(fts, lags = -20:20) # Compute covariance with another process fts0 = fts + fts.rma(d=3) fts.cov.structure(fts, fts0, lags = -2:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.