| covFdcca {DCCA} | R Documentation | 
Autocovariance function of the detrended cross-covariance
Description
Calculates the autocovariance of the detrended cross-covariance.
Usage
covFdcca(m = 3, nu = 0, h = 0, overlap = TRUE, G1, G2, G12, Cumulants = NULL)
Arguments
m | 
 an integer or integer valued vector indicating the size of the window for the polinomial fit.   | 
nu | 
 a non-negative integer denoting the degree of the polinomial fit applied on the integrated series.  | 
h | 
 an integer or integer valued vector indicating the lags for which the autocovariance function is to be calculated. Negative values are not allowed.  | 
overlap | 
 logical: if true (the default), overlapping boxes are used for calculations. Otherwise, non-overlapping boxes are applied.  | 
G1, G2 | 
 the autocovariance matrices for the original time series. The dimension of   | 
G12 | 
 the cross-covariance matrix for the original time series. The dimension of   | 
Cumulants | 
 The matrix of cumulants. If not provided, it is assumed that the cumulants are all zero.  | 
Value
A matrix of dimension lenght(h) by length(m) with the autocovariance of lag h (rows), for each value of m (columns) provided. This matrix is obtained from expressions (24) for h = 0 and (25) for h > 0 in Prass and Pumi (2019).
Author(s)
Taiane Schaedler Prass
References
Prass, T.S. and Pumi, G. (2019). On the behavior of the DFA and DCCA in trend-stationary processes <arXiv:1910.10589>.
Examples
## Not run: 
ms = seq(3,100,1)
hs = seq(0,50,1)
overlap = TRUE
nu = 0
m_max = (max(ms)+1)*(max(hs)+1) - max(ms)*max(hs)*as.integer(overlap)
theta = c(c(1,(20:1)/10), rep(0, m_max - 20))
Gamma1 = diag(m_max+1)
Gamma2 = matrix(0, ncol = m_max+1, nrow = m_max+1)
Gamma12 = matrix(0, ncol = m_max+1, nrow = m_max+1)
for(t in 1:(m_max+1)){
    for(h in 0:(m_max+1-t)){
        Gamma2[t,t+h] = sum(theta[1:(length(theta)-h)]*theta[(1+h):length(theta)])
        Gamma2[t+h,t] = Gamma2[t,t+h]
        Gamma12[t,t+h] = theta[h+1]
    }
}
covdcca = covFdcca(m = ms, nu = 0, h = hs,
                   G1 = Gamma1, G2 = Gamma2, G12 = Gamma12)
                   
## End(Not run)