tails_q | R Documentation |
Compare right tails of two sample distributions using a quantile-based approach (QBA); see \insertCiteSoliman_etal_2014_insurance;textualfuntimes, \insertCiteSoliman_etal_2015_insurance;textualfuntimes, and \insertCiteLyubchich_Gel_2017_insurance;textualfuntimes.
tails_q(x0, x1, q = 0.99)
x0, x1 |
vectors of the same length (preferably).
Tail in |
q |
a quantile defining the right tail for both |
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
.
A list with two elements:
d |
the step in probabilities for defining the quantiles. |
Pk |
vector of differences of the intervals' centers. |
Vyacheslav Lyubchich, Yulia R. Gel
i.tails
x0 <- rnorm(1000)
x1 <- rt(1000, 5)
tails_q(x0, x1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.