Bias corrected estimates for the generalized extreme value distribution using Firth's modified score function or implicit bias subtraction.
Arguments
- par
parameter vector (
scale
,shape
)- dat
sample of observations
- corr
string indicating which correction to employ either
subtract
orfirth
- method
string indicating whether to use the expected (
'exp'
) or the observed ('obs'
--- the default) information matrix. Used only ifcorr='firth'
Details
Method subtract
solves
$$\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
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')
#> loc scale shape
#> 1.0069581 0.9460791 -0.2291570
gev.bcor(par, dat, 'firth') #observed information
#> loc scale shape
#> 1.0042124 0.9378109 -0.2387444
gev.bcor(par, dat, 'firth','exp')
#> loc scale shape
#> 0.9933414 0.9475920 -0.1991981