Learn R Programming

mev (version 1.17)

gev.bcor: Bias correction for GEV distribution

Description

Bias corrected estimates for the generalized extreme value distribution using Firth's modified score function or implicit bias subtraction.

Usage

gev.bcor(par, dat, corr = c("subtract", "firth"), method = c("obs", "exp"))

Value

vector of bias-corrected parameters

Arguments

par

parameter vector (scale, shape)

dat

sample of observations

corr

string indicating which correction to employ either subtract or firth

method

string indicating whether to use the expected ('exp') or the observed ('obs' --- the default) information matrix. Used only if corr='firth'

Details

Method subtractsolves $$\tilde{\boldsymbol{\theta}} = \hat{\boldsymbol{\theta}} + b(\tilde{\boldsymbol{\theta}}$$ for \(\tilde{\boldsymbol{\theta}}\), using the first order term in the bias expansion as given by gev.bias.

The alternative is to use Firth's modified score and find the root of $$U(\tilde{\boldsymbol{\theta}})-i(\tilde{\boldsymbol{\theta}})b(\tilde{\boldsymbol{\theta}}),$$ where \(U\) is the score vector, \(b\) is the first order bias and \(i\) is either the observed or Fisher information.

The routine uses the MLE (bias-corrected) as starting values and proceeds to find the solution using a root finding algorithm. Since the bias-correction is not valid for \(\xi < -1/3\), any solution that is unbounded will return a vector of NA as the solution does not exist then.

Examples

Run this code
set.seed(1)
dat <- mev::rgev(n=40, loc = 1, scale=1, shape=-0.2)
par <- mev::fit.gev(dat)$estimate
gev.bcor(par, dat, 'subtract')
gev.bcor(par, dat, 'firth') #observed information
gev.bcor(par, dat, 'firth','exp')

Run the code above in your browser using DataLab