mrs_stat: Max-robust-sum (MRS) test statistic to identify dragon kings...

Description Usage Arguments Value References Examples

Description

mrs_stat calculates the MRS test statistic to determine whether there is significant support for the existence of r DKs in vals. This test avoids denominator masking.

Usage

1
mrs_stat(vals, r, m)

Arguments

vals

numeric vector with at least 3 elements

r

integer indicating number of DKs in vals

m

pre-specified maximum number of DKs in vals

Value

MRS 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>

Examples

1
2
3
4
5
6
# generate a numeric vector with DKs
temp <- c(rexp(100),   # exponentially distributed RV
          15, 15, 15)  # DK elements

# calculate test statistic for DKs
mrs_stat(temp, r = 2, m = 3)

rrrlw/dragonking documentation built on May 30, 2019, 8:08 p.m.