Creates an object of class 'ctre'
(Continuous Time Random
Maxima).
ctre(x, y = NULL, drop.duplicate.times = FALSE)
x | Either
The first component/column must contain the event times and be of class "numeric", "Date" or "POSIXct"; the second component/column must contain the event magnitudes and be of type "numeric". |
---|---|
y | If x is a vector, y needs to be supplied as a vector of same length. |
drop.duplicate.times | If there are duplicate time stamps present, should duplicates be dropped? |
An object of class 'ctre'
based on a time series of
magnitudes.
times <- cumsum(MittagLeffleR::rml(n = 1000, tail = 0.8, scale = 5)) magnitudes <- rexp(n = 1000) sim_ctre <- ctre(times, magnitudes) sim_ctre#> 'ctre' object with 1000 timestamps and magnitudes. #> Timestamps: #> num [1:1000] 2.98 4.36 12.57 19.65 30.59 ... #> Magnitudes: #> num [1:1000] 0.5016 0.8388 1.042 1.7023 0.0333 ...