ss_stat {dragonking} | R Documentation |
Sum-sum (SS) test statistic to identify dragon kings (DKs)
Description
ss_stat
calculates the SS test statistic to determine whether
there is significant support for the existence of r
DKs in
vals
. This test is susceptible to swamping.
Usage
ss_stat(vals, r)
Arguments
vals |
numeric vector with at least 3 elements |
r |
integer indicating number of DKs in |
Value
SS 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>
Balakrishnan K (1996). Exponential distribution: Theory, methods and applications. CRC Press. pp. 228-30. ISBN: 9782884491921
Chikkagoudar MS, Kunchur SH (1983). Distributions of test statistics for multiple outliers in exponential samples. Commun Stat Theory Methods, 12: 2127-42. <doi:10.1080/03610928308828596>
Lewis T, Fieller NRJ (1979). A recursive algorithm for null distributions for outliers: I gamma samples. Technometrics, 21(3): 371-6. <doi:10.2307/1267762>
Examples
# generate a numeric vector with DKs
temp <- c(rexp(100), # exponentially distributed RV
15, 15, 15) # DK elements
# calculate test statistic for DKs
ss_stat(temp, r = 3)