trParetoQQ: Truncated Pareto quantile plot

View source: R/Truncation.R

trParetoQQR Documentation

Truncated Pareto quantile plot

Description

Extension of the Pareto QQ-plot as described in Beirlant et al. (2016).

Usage

trParetoQQ(data, r = 1, DT, kstar = NULL, plot = TRUE, main = "TPa QQ-plot", ...)

Arguments

data

Vector of n observations.

r

Trimming parameter, default is 1 (no trimming).

DT

Vector of n-1 estimates for the truncation odds D_T obtained from trDT.

kstar

Value for k used to construct the plot. When NULL (default), a value will be chosen by maximising the correlation between the empirical and theoretical quantiles (see Details).

plot

Logical indicating if the quantiles should be plotted in a Pareto QQ-plot, default is TRUE.

main

Title for the plot, default is "TPa QQ-plot".

...

Additional arguments for the plot function, see plot for more details.

Details

The Pareto QQ-plot for truncated data plots

(-\log(\hat{D}_{T,r,k^*,n}+j/(n+1)), \log(X_{n-j+1,n}) )

for j=1,\ldots,n.

The value for k^* can be be given by the user or can be determined automatically. In the latter case, we use the k^* that maximises the absolute value of the correlation between -\log(\hat{D}_{T,r,k^*,n}+j/(n+1)) and \log(X_{n-j+1,n}) for j=1,\ldots,k and k^*>10.

When taking D_T=0, one obtains the ordinary Pareto QQ-plot.

Note that the definition here differs slightly from the one in Beirlant et al. (2016). We plot the empirical and theoretical quantiles the other way around and therefore have to add a minus (before the log).

See Beirlant et al. (2016) for more details.

Value

A list with following components:

pqq.the

Vector of theoretical quantiles -\log(\hat{D}_{T,r,k^*,n}+j/(n+1)), see Details.

pqq.emp

Vector of the empirical quantiles from the log-transformed data.

kstar

Optimal value for k or input argument kstar, see Details.

DTstar

Estimate of D_T corresponding to kstar.

Author(s)

Tom Reynkens.

References

Beirlant, J., Fraga Alves, M.I. and Gomes, M.I. (2016). "Tail fitting for Truncated and Non-truncated Pareto-type Distributions." Extremes, 19, 429–462.

See Also

ParetoQQ, trDT

Examples

# Endpoint of truncated Pareto distribution
endpoint <- qpareto(0.99, shape=2)

# Generate sample from truncated Pareto distribution
X <- rtpareto(1000, shape=2, endpoint=endpoint)

# Ordinary Pareto QQ-plot
ParetoQQ(X)

# Truncated Hill estimates
gamma <- trHill(X)$gamma

# Estimates for truncation odds
dt <- trDT(X, gamma=gamma)$DT

# Truncated Pareto QQ-plot
trParetoQQ(X, DT=dt)

TReynkens/ReIns documentation built on Nov. 9, 2023, 1:29 p.m.