The CTRE package fits a CTRE model ("Continuous Time Random Exceedances") to extremes of 'bursty' time series.
- A bursty time series typically has heavy-tailed inter-arrival times.
- Given a high threshold, the times between threshold crossings follow a Mittag-Leffler distribution, whose scale parameter increases with the threshold.
The magnitudes of the extremes is modelled via the POT ("Peaks-Over-Threshold") method, which is standard in Extreme Value Theory. It is the time between threshold crossings that is the focus of the CTRE model.
You can install CTRE
from CRAN via
install.packages("CTRE")
library(CTRE)
Install the devtools
package first, then
# install.packages("devtools")
devtools::install_github("strakaps/CTRE")
library("CTRE")
- Create a
ctre
object from a time series, a data frame, or two vectors. - Plot it with
plot
- Discard the data below a threshold with
thin
- Extract data with
interarrival
,time
andmagnitudes
- Create stability plots with
MLestimates
- Look at diagnostic plots (
mlqqplot
,acf
,empcopula
)
- The package comes with two examples of bursty time series: solar flare magnitudes and bitcoin trading volumes.
- For parameter estimates of the Mittag-Leffler distribution, see the tab "Exceedance Times".
- For the POT model fit, see the tab "Exceedances"
- CTRE model assumptions are checked via
- a QQ plot of the Mittag-Leffler distribution
- an empirical copula plot checking for dependence between inter-arrival times and magnitudes
- a plot of the autocorrelation function for the two series (interarrival times and magnitudes).
To run the Shiny app from within RStudio:
runCTREshiny()
"Peaks Over Threshold for Bursty Time Series", Katharina Hees, Smarak Nayak, Peter Straka (2018). https://arxiv.org/abs/1802.05218