View source: R/simulate_cMTS.R
simulate_cMTS | R Documentation |
Approximation of correlated time series with given "Hurst" exponents. Internally longmemo::simFGN0
or longmemo::simFGN.fft
are used which simulate Gaussian series by generating fractional ARIMA(0,h,0) models (with $h=H-1/2$, longmemo::FGN0
), or fractional Gaussian noise longmemo::FGN.fft
. We cautiously note that we use empirical scaling (i.e., the variances are scaled to be 1 in the sample not the population), hence the between sample variance may be underrepresented. We further note that the covariance estimates for correlated time series (not using increments) is unstable.
simulate_cMTS(
N,
H,
Sigma,
simulation_process = "FGN0",
decomposition = "chol",
cor_increments = TRUE,
X0 = rep(0, ncol(Sigma))
)
N |
Length of Times Series |
H |
Hurst Exponents for |
Sigma |
Positive semi definite covariance matrix of desired multi-dimensional time series. |
simulation_process |
The simulation process passed to the |
decomposition |
Character whether the Cholesky decomposition |
cor_increments |
Logical, whether to correlate the increments or the time series themselves. Default to |
X0 |
Starting values for the time series if increments are correlated. Default to |
Returns a multivariate correlated time series with covariance matrix Sigma
. The Hurst exponents are only approximating the univariate ones, since they result from mixed time series. Uncorrelated time series keep their univariate Hurst exponents H
.
Sigma <- matrix(.5, 3, 3); diag(Sigma) <- c(1,2,3)
data <- simulate_cMTS(N = 10^5, Sigma = Sigma, H = c(.2, .5, .7),
cor_increments = TRUE)
cov(data)
cov(apply(data,2,diff))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.