Learn R Programming

flood (version 0.1.1)

hill: Hill's estimator

Description

Estimation of heavy tails with Hill's estimator

Usage

hill(x, k)

Arguments

x
Vector or matrix of observations
k
Number of relative excesses involved in the estimation of the extreme value index gamma. If k is missing, it will be set to
  • $k=floor(2*n^(2/3))$, where n is the sample length of the vector x after removing missing values
  • $k=floor(2*n^(2/3)/d^(1/3))$, where d is the number of columns of the matrix x and n the length of each column after removing missing values.

Value

Hill's estimator for each sample.

Examples

Run this code
library("evd")
x1 <- rgev(100, loc = 2, scale = 1, shape=0.4)
hill(x1, k=20)
x2 <- rgev(100, loc = 2, scale = 1, shape=0.5)
hill(cbind(x1, x2), k = c(20, 25))
x2[c(4,8,39)] <- NA
hill(cbind(x1, x2), k=c(20, 25))
# if leaving out k, it will be set to floor(2*n^(2/3)/d^(1/3)) = c(34,33):
hill(cbind(x1, x2)) # is the same as:
hill(cbind(x1, x2), k=c(34,33))

Run the code above in your browser using DataLab