EF2dfa {DCCA} | R Documentation |
Expected value of the detrended variance
Description
Calculates the expected value of the detrended variance.
Usage
EF2dfa(m = 3, nu = 0, G, K = 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. |
G |
the autocovariance matrix for the original time series. The dimension of |
K |
optional: the matrix |
Value
A vector of size containing the expected values of the detrended variance corresponding to the values of
provided. This is expression (20) 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
m = 3
K = Km(m = m, nu = 0)
G = diag(m+1)
EF2dfa(G = G, K = K)
# same as
EF2dfa(m = 3, nu = 0, G = G)
# An AR(1) example
phi = 0.4
n = 500
burn.in = 50
eps = rnorm(n + burn.in)
z.temp = numeric(n + burn.in)
z.temp[1] = eps[1]
for(i in 2:(n + burn.in)){
z.temp[i] = phi*z.temp[i-1] + eps[i]
}
z = z.temp[(burn.in + 1):(n + burn.in)]
F2.dfa = F2dfa(z, m = 3:100, nu = 0, overlap = TRUE)
plot(3:100, F2.dfa, type="o", xlab = "m")