HillEstimator

vecxt_re.HillEstimator
object HillEstimator

Hill estimator for Pareto tail index estimation.

The Hill estimator is used to estimate the shape parameter (α) of a Pareto distribution from the upper tail of the data. For a Pareto distribution with survival function S(x) = (x_min/x)^α, the tail index α determines how heavy the tail is:

  • α < 2: Infinite variance
  • α < 1: Infinite mean
  • Larger α means lighter tails

By default the estimator uses the k largest order statistics over the (k+1)-th: α̂ = k / Σᵢ₌₁ᵏ log(X₍ᵢ₎ / X₍ₖ₊₁₎). See HillConvention for the alternatives.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class HillPlotResult(kValues: Array[Int], estimates: Array[Double], thresholds: Array[Double] = ..., nObs: Int = ..., convention: HillConvention = ...)

Result of a Hill plot computation containing k values and corresponding tail index estimates.

Result of a Hill plot computation containing k values and corresponding tail index estimates.

Value parameters

convention

Which estimator the estimates are, see HillConvention

estimates

Corresponding tail index estimates α̂(k)

kValues

Array of k values used

nObs

The number of observations n, so that k / n is the empirical exceedance probability of each threshold. 0 if not supplied.

thresholds

The threshold behind each estimate: the (k+1)-th largest observation, or the k-th for HillConvention.Embrechts. Empty if not supplied.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def apply(data: Array[Double], k: Int, convention: HillConvention = ...): Double

Computes the Hill estimator for the Pareto tail index using the k largest observations.

Computes the Hill estimator for the Pareto tail index using the k largest observations.

Value parameters

convention

Which estimator to compute, see HillConvention

data

The data array (will be sorted internally)

k

The number of upper order statistics to use, between convention.minK and convention.maxK(n)

Attributes

Returns

The estimated tail index α

Throws
IllegalArgumentException

if k is out of valid range or data is empty

def hillPlot(data: Array[Double], kMin: Int = ..., kMax: Int = ..., step: Int = ..., convention: HillConvention = ...): HillPlotResult

Computes a Hill plot: tail index estimates for a range of k values.

Computes a Hill plot: tail index estimates for a range of k values.

A Hill plot shows how the estimate varies with k. A good estimate should show a stable plateau region. Too small k gives high variance; too large k includes non-tail observations.

Value parameters

convention

Which estimator to compute, see HillConvention

data

The data array

kMax

Maximum k value (default: convention.maxK(n), every loss: n − 1, or n for HillConvention.Embrechts), lowered to convention.maxK(n) if larger

kMin

Minimum k value (default: convention.defaultKMin, 2, or 3 for HillConvention.Embrechts), raised to convention.minK if smaller

step

Step size for k values (default: 1)

Attributes

Returns

HillPlotResult containing k values and corresponding estimates