Learn R Programming

mev (version 1.11)

gpd.bcor: Bias correction for GP distribution using Firth's modified score function or bias substraction

Description

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 - additionally, passing a par argument with shape less than -1/3 will return an error if method="subtract" is selected, as the bias correction does not exist then. For small samples, expected and observed information can return very different estimates.

Usage

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

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"

Value

vector of bias-corrected parameters

Examples

Run this code
# NOT RUN {
set.seed(1)
dat <- evd::rgpd(n=40, scale=1, shape=-0.2)
par <- gp.fit(dat, threshold=0, show=FALSE)$estimate
gpd.bcor(par,dat, "subtract")
gpd.bcor(par,dat, "firth") #observed information
gpd.bcor(par,dat, "firth","exp")
# }

Run the code above in your browser using DataLab