srs_stat {dragonking} | R Documentation |
Sum-robust-sum (SRS) test statistic to identify dragon kings (DKs)
Description
srs_stat
calculates the SRS test statistic to determine whether
there is significant support for the existence of r
DKs in
vals
. This test provides robustness to denominator masking.
Usage
srs_stat(vals, r, m)
Arguments
vals |
numeric vector with at least 3 elements |
r |
integer indicating number of DKs in |
m |
pre-specified maximum number of DKs in |
Value
SRS test statistic
References
Wheatley S, Sornette D (2015). Multiple outlier detection in samples with exponential & pareto tails: Redeeming the inward approach & detecting dragon kings. Swiss Finance Institute Research Paper Series No. 15-28. <doi:10.2139/ssrn.2645709>
Iglewicz B, Martinez J (1982). Outlier detection using robust measures of scale. J Stat Comput Simul, 15(4): 285-93. <doi:10.1080/00949658208810595>
Examples
# generate a numeric vector with DKs
temp <- c(rexp(100), # exponentially distributed RV
15, 15, 15) # DK elements
# calculate test statistic for DKs
srs_stat(temp, r = 2, m = 3)
[Package dragonking version 0.1.0 Index]