| complexity | R Documentation |
Computes dynamic complexity and other rolling window measures for univariate time series data.
complexity(data, measures = "complexity", window = 7L, align = "center")
data |
[ |
measures |
[ |
window |
[ |
align |
[ |
The following measures can be calculated:
"complexity": Product of fluctuation and distribution measures.
"fluctuation": Root mean square of successive differences.
"distribution": Deviation from uniform distribution.
"autocorrelation": Lag-1 autocorrelation coefficient.
"max": Rolling maximum.
"min": Rolling minimum.
"variance": Rolling variance.
The option "all" computes all of the above.
A tibble with the time index, the original time-series data,
and the calculated measures.
set.seed(123)
ts_data <- stats::arima.sim(list(order = c(1, 1, 0), ar = 0.6), n = 200)
# Single measure
comp_single <- complexity(ts_data, measures = "complexity")
# Multiple measures
comp_multi <- complexity(ts_data, measures = c("complexity", "variance"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.