Bias corrected estimates for the generalized Pareto distribution using Firth's modified score function or implicit bias subtraction.
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 gpd.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 as starting value 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 bias correction does not exist then.
Examples
set.seed(1)
dat <- rgp(n=40, scale=1, shape=-0.2)
par <- gp.fit(dat, threshold=0, show=FALSE)$estimate
gpd.bcor(par,dat, 'subtract')
#> scale shape
#> 0.960597 -0.141139
gpd.bcor(par,dat, 'firth') #observed information
#> scale shape
#> 0.9625726 -0.1613215
gpd.bcor(par,dat, 'firth','exp')
#> scale shape
#> 0.9375194 -0.1123656