# upperparams

Upper Pareto tail parameters

## Description

example

params = upperparams(pd) returns the two-element vector params, which includes the shape and scale parameters of the generalized Pareto distribution (GPD) in the upper tail of pd.

upperparams does not return the location parameter of the GPD. The location parameter is the quantile value corresponding to the upper tail cumulative probability. Use the boundary function to return the location parameter.

## Examples

collapse all

Generate a sample data set and fit a piecewise distribution with Pareto tails to the data by using paretotails. Find the distribution parameters of the upper Pareto tail by using the object function upperparams.

Generate a sample data set containing 20% outliers.

rng('default');  % For reproducibility
left_tail = -exprnd(1,100,1);
right_tail = exprnd(5,100,1);
center = randn(800,1);
x = [left_tail;center;right_tail];

Create a paretotails object by fitting a piecewise distribution to x. Specify the boundaries of the tails using the lower and upper tail cumulative probabilities so that a fitted object consists of the empirical distribution for the middle 80% of the data set and GPDs for the lower and upper 10% of the data set.

pd = paretotails(x,0.1,0.9)
pd =
Piecewise distribution with 3 segments
-Inf < x < -1.33251    (0 < p < 0.1): lower tail, GPD(-0.0063504,0.567017)
-1.33251 < x < 1.80149  (0.1 < p < 0.9): interpolated empirical cdf
1.80149 < x < Inf    (0.9 < p < 1): upper tail, GPD(0.24874,3.00974)

Return the shape and scale parameters of the fitted GPD of the upper tail by using the upperparams function.

params = upperparams(pd)
params = 1×2

0.2487    3.0097

You can also get the upper Pareto tail parameters by using the UpperParameters property. Access the UpperParameters property by using dot notation.

pd.UpperParameters
ans = 1×2

0.2487    3.0097

The location parameter of the GPD is equal to the quantile value of the upper tail cumulative probability. Return the location parameter by using the boundary function.

[p,q] = boundary(pd)
p = 2×1

0.1000
0.9000

q = 2×1

-1.3325
1.8015

The values in p are the cumulative probabilities at the boundaries, and the values in q are the corresponding quantiles. q(1) is the location parameter of the GPD of the upper tail.

Use the lowerparams function or the LowerParameters property to get the lower Pareto tail parameters.

## Input Arguments

collapse all

Piecewise distribution with Pareto tails, specified as a paretotails object.

## Version History

Introduced in R2007a