Calculates the expected information matrix for the GEV distribution.

gev11e(scale, shape)

gev22e(scale, shape, eps = 0.003)

gev33e(shape, eps = 0.003)

gev12e(scale, shape, eps = 0.003)

gev13e(scale, shape, eps = 0.003)

gev23e(scale, shape, eps = 0.003)

gevExpInfo(scale, shape, eps = 0.003)

Arguments

scale, shape

Numeric vectors. Respective values of the GEV parameters scale parameter \(\sigma\) and shape parameter \(\xi\). For gevExpInfo, scale and shape must have length 1.

eps

A numeric scalar. For values of \(\xi\) in shape that lie in (-eps, eps) an approximation is used instead of a direct calculation. See Details. If eps is a vector then only the first element is used.

Value

gevExpInfo returns a 3 by 3 numeric matrix with row and column named loc, scale, shape. The other functions return a numeric vector of length equal to the maximum of the lengths of the arguments, excluding eps.

Details

gevExpInfo calculates, for single pair of values \((\sigma, \xi) = \) (scale, shape), the expected information matrix for a single observation from a GEV distribution with distribution function $$F(x) = P(X \leq x) = \exp\left\{ -\left[ 1+\xi\left(\frac{x-\mu}{\sigma}\right) \right]_+^{-1/\xi} \right\},$$ where \(x_+ = \max(x, 0)\). The GEV expected information is defined only for \(\xi > -0.5\) and does not depend on the value of \(\mu\).

The other functions are vectorized and calculate the individual contributions to the expected information matrix. For example, gev11e calculates the expectation \(i_{\mu\mu}\) of the negated second derivative of the GEV log-density with respect to \(\mu\), that is, each 1 indicates one derivative with respect to \(\mu\). Similarly, 2 denotes one derivative with respect to \(\sigma\) and 3 one derivative with respect to \(\xi\), so that, for example, gev23e calculates the expectation \(i_{\sigma\xi}\) of the negated GEV log-density after one taking one derivative with respect to \(\sigma\) and one derivative with respect to \(\xi\). Note that \(i_{\xi\xi}\), calculated using gev33e, depends only on \(\xi\).

The expectation in gev11e can be calculated in a direct way for all \(\xi > -0.5\). For the other components, direct calculation of the expectation is unstable when \(\xi\) is close to 0. Instead, we use a quadratic approximation over (-eps, eps), from a Lagrangian interpolation of the values from the direct calculation for \(\xi = \) -eps, \(0\) and eps.

Examples

# Expected information matrices for ...
# ... scale = 2 and shape = -0.4
gevExpInfo(2, -0.4)
#>             loc     scale     shape
#> loc   0.4131759 0.4744927  1.768649
#> scale 0.4744927 1.3526141  3.932333
#> shape 1.7686493 3.9323334 16.905985
# ... scale = 3 and shape = 0.001
gevExpInfo(3, 0.001)
#>               loc       scale     shape
#> loc    0.11120536 -0.04722437 0.1371977
#> scale -0.04722437  0.20255785 0.1095938
#> shape  0.13719772  0.10959382 2.4181684
# ... scale = 3 and shape = 0
gevExpInfo(3, 0)
#>               loc       scale     shape
#> loc    0.11111111 -0.04697604 0.1372801
#> scale -0.04697604  0.20263118 0.1108283
#> shape  0.13728011  0.11082830 2.4236061
# ... scale = 1 and shape = 0.1
gevExpInfo(1, 0.1)
#>              loc       scale      shape
#> loc    1.1109842 -0.64498331 0.41951015
#> scale -0.6449833  1.80124846 0.01231181
#> shape  0.4195102  0.01231181 1.99698389

# The individual components of the latter matrix
gev11e(1, 0.1)
#> [1] 1.110984
gev12e(1, 0.1)
#> [1] -0.6449833
gev13e(1, 0.1)
#> [1] 0.4195102
gev22e(1, 0.1)
#> [1] 1.801248
gev23e(1, 0.1)
#> [1] 0.01231181
gev33e(0.1)
#> [1] 1.996984