Compare right tails of two sample distributions using
a quantile-based approach (QBA);
see Soliman_etal_2014_insurance;textualfuntimes,
Soliman_etal_2015_insurance;textualfuntimes,
and Lyubchich_Gel_2017_insurance;textualfuntimes.
Usage
tails_q(x0, x1, q = 0.99)
Value
A list with two elements:
d
the step in probabilities for defining the quantiles.
Pk
vector of differences of the intervals' centers.
Arguments
x0, x1
vectors of the same length (preferably).
Tail in x1 is compared against the tail in x0.
q
a quantile defining the right tail for both x0 and x1.
Values above the thresholds quantile(x0, probs = q) and
quantile(x1, probs = q) are considered as the respective right tails.
Author
Vyacheslav Lyubchich, Yulia R. Gel
Details
Sturges' formula is used to calculate the number of intervals (\(k\))
to split the upper \(100(1 - q)\)\
(the right tails). Then, each tail is divided into equally-filled intervals
with a quantile step \(d=(1 - q)/k\). Pk reports the difference between
corresponding intervals' centers obtained from x0 and x1.