Transforms event times by the compensator of a Hawkes process,
\(\Lambda(t) = \int_0^t \lambda\): under the model the gaps
\(\tau_i = \Lambda(t_i) - \Lambda(t_{i-1})\) (with \(t_0 = 0\)) are
independent standard exponentials, so u = 1 - exp(-tau) are uniform
on [0, 1]. The Kolmogorov-Smirnov test compares u with the uniform,
with R's exact p-value below 100 events without ties and the limiting
distribution otherwise, as stats::ks.test() does. plot() draws the
uniform quantile plot with the test's 95% band.
Usage
hwkres(
times,
hor = NULL,
par = NULL,
kernel = "exp",
base = "const",
per = 365.25
)
# S3 method for class 'hwkres'
plot(x, ...)Arguments
- times
A fit from
hwkfit(), or event times as there.- hor, kernel, base, per
As for
hwkfit()(not read with a fit); one kernel and one baseline.- par
The parameters, as
parofhwkfit()(not read with a fit).- x
An
hwkresobject.- ...
Passed to
graphics::plot().
Value
An object of class hwkres, a list: tau, the rescaled gaps;
u, their uniform transforms; d and p, the Kolmogorov-Smirnov
statistic and p-value; and n.
References
Ogata, Y. (1988). Statistical models for earthquake occurrences and residual analysis for point processes. Journal of the American Statistical Association, 83(401), 9-27. doi:10.1080/01621459.1988.10478560
