preaverage {ccid} | R Documentation |
Preaveraging the multivariate time series
Description
This function pre-processes the given data in order to remove serial correlation that might exist in the given data.
Usage
preaverage(X, scal = 3)
Arguments
X |
A numerical matrix representing the multivariate time series, with the columns representing its components. |
scal |
A positive integer number with default value equal to 3. It is used to define the way we pre-average the data sequences. |
Details
For a given natural number scal
and data matrix X
of
dimensionality T \times d
, let us denote by
Q = \lceil T/scal \rceil
. Then, preaverage
calculates,
for all j = 1,2, ..., d
,
\tilde{X}_{q, j} = 1/scal\sum_{t=(q-1) * sc + 1}^{q * sc}X_{t, j},
for q=1, 2, ..., Q-1
, while
\tilde{x}_{Q, j} = (T - (Q-1) * sc)^{-1}\sum_{t = (Q-1) * sc + 1}^{T}X_{t, j}.
Value
The “preaveraged” matrix \tilde{X}
of dimensionality
Q \times d
, as explained in Details.
Author(s)
Andreas Anastasiou, anastasiou.andreas@ucy.ac.cy
References
“Cross-covariance isolate detect: a new change-point method for estimating dynamic functional connectivity”, Anastasiou et al (2020), preprint <doi:10.1101/2020.12.20.423696>.
Examples
A <- matrix(1:32, 8, 4)
A
A1 <- preaverage(A, scal = 3)
A1