tails_q {funtimes}R Documentation

Quantile-Based Tails Comparison

Description

Compare right tails of two sample distributions using a quantile-based approach (QBA); see Soliman et al. (2014), Soliman et al. (2015), and Lyubchich and Gel (2017).

Usage

tails_q(x0, x1, q = 0.99)

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.

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.

Value

A list with two elements:

d

the step in probabilities for defining the quantiles.

Pk

vector of differences of the intervals' centers.

Author(s)

Vyacheslav Lyubchich, Yulia R. Gel

References

Lyubchich V, Gel YR (2017). “Can we weather proof our insurance?” Environmetrics, 28(2), e2433. doi:10.1002/env.2433.

Soliman M, Lyubchich V, Gel YR, Naser D, Esterby S (2015). “Evaluating the impact of climate change on dynamics of house insurance claims.” In Lakshmanan V, Gilleland E, McGovern A, Tingley M (eds.), Machine Learning and Data Mining Approaches to Climate Science, chapter 16, 175–183. Springer, Switzerland. doi:10.1007/978-3-319-17220-0_16.

Soliman M, Naser D, Lyubchich V, Gel YR, Esterby S (2014). “Evaluating the impact of climate change on dynamics of house insurance claims.” In Ebert-Uphoff I (ed.), The 4th International Workshop on Climate Informatics: CI2014.

See Also

i.tails

Examples

x0 <- rnorm(1000)
x1 <- rt(1000, 5)
tails_q(x0, x1)


[Package funtimes version 9.1 Index]