mvDFA {mvDFA}R Documentation

Analyze multivariate correlated time series and estimate long memory by the extension of the using univariate Detrended Fluctuations Analysis (DFA; Peng et al., 1995) to multivariate time series: mvDFA

Description

Analyze multivariate correlated time series and estimate long memory by the extension of the using univariate Detrended Fluctuations Analysis (DFA; Peng et al., 1995) to multivariate time series: mvDFA

Usage

mvDFA(
  X,
  steps = 50,
  degree = 1,
  verbose = FALSE,
  cores = 1,
  covlist = FALSE,
  brownian = FALSE
)

Arguments

X

Matrix or data.frame containing the time series in long format.

steps

Maximum number of window sizes. These are spread logarithmically. If time series is short and steps is large, fewer window sizes are drawn. Default to 50. The dimensions (ncol(X)) and the degree influence the smallest possible window size.

degree

The maximum order of the detrending polynomial in the segments. This influences the smallest window size minS such that minS = d + degree + 2, where d is the dimension of the time series.

verbose

Indicator whether additional info should be printed. Default to TRUE.

cores

Number of cores used in computation. Default to 1.

covlist

Indicator whether covariance of the time series per window size should be saved in a list.

brownian

Indicator whether time series are assumed to be brownian (i.e. variance increases proportional to time)

Value

An object of class mvDFA containing long memory coefficients (Hurst exponents) and corresponding further informations:

Ltot

the estimated long memory coefficient for the multivariate time series using the total variance approach

Lgen

the generalized approach

Lfull

the average covariance approach

LmeanUni

average Hurst exponent across all time series

univariate_DFA

univariate Hurst exponents

R2tot

R-squared of total variance approach in regression of log10(RMS) vs log10(S)

R2gen

R-squared of generalized variance approach in regression of log10(RMS) vs log10(S)

R2full

R-squared of covariance approach in regression of log10(RMS) vs log10(S)

R2meanUni

average R-squared across all time series in regression of log10(RMS) vs log10(S)

R2univariate_DFA

R-squares of single time series approach in regression of log10(RMS) vs log10(S)

RMS_tot

a list of Root Mean Squares per window size corresponding to the total variance approach

RMS_gen

a list of Root Mean Squares per window size corresponding to the total generalized approach

Cov_RMS_s

a list of Root Mean Squares per window size corresponding to the covariance approach

S

window sizes used

CovRMS_list

a list of covariance matrices per S may be returned

References

Peng, C. K., Havlin, S., Stanley, H. E., & Goldberger, A. L. (1995). Quantification of scaling exponents and crossover phenomena in nonstationary heartbeat time-series. Chaos, 5, 82–87. <doi:10.1063/1.166141>

Examples

Sigma <- matrix(.5, 3, 3); diag(Sigma) <- 1
# generate correlated Gaussian white noise (i.i.d. multivariate normal variables)
X <- mvtnorm::rmvnorm(n = 500, sigma = Sigma)
mvDFA(X = X, steps = 5) # steps = 5 is only for demonstration,
                        # use many steps instead, e.g. steps = 50!

[Package mvDFA version 0.0.4 Index]