Maximum likelihood estimation for the generalized extreme value distribution
Source:R/mle.R
fit.gev.Rd
This function returns an object of class mev_gev
, with default methods for printing and quantile-quantile plots.
The default starting values are the solution of the probability weighted moments.
Usage
fit.gev(
xdat,
start = NULL,
method = c("nlminb", "BFGS"),
show = FALSE,
fpar = NULL,
warnSE = FALSE
)
Arguments
- xdat
a numeric vector of data to be fitted.
- start
named list of starting values
- method
string indicating the outer optimization routine for the augmented Lagrangian. One of
nlminb
orBFGS
.- show
logical; if
TRUE
(the default), print details of the fit.- fpar
a named list with optional fixed components
loc
,scale
andshape
- warnSE
logical; if
TRUE
, a warning is printed if the standard errors cannot be returned from the observed information matrix when the shape is less than -0.5.
Value
a list containing the following components:
estimate
a vector containing the maximum likelihood estimates.std.err
a vector containing the standard errors.vcov
the variance covariance matrix, obtained as the numerical inverse of the observed information matrix.method
the method used to fit the parameter.nllh
the negative log-likelihood evaluated at the parameterestimate
.convergence
components taken from the list returned byauglag
. Values other than0
indicate that the algorithm likely did not converge.counts
components taken from the list returned byauglag
.xdat
vector of data
Examples
xdat <- mev::rgev(n = 100)
fit.gev(xdat, show = TRUE)
#> Log-likelihood: -158.857
#>
#> Estimates
#> loc scale shape
#> 0.06211 1.05001 -0.07220
#>
#> Standard Errors
#> loc scale shape
#> 0.11896 0.08553 0.07731
#>
#> Optimization Information
#> Convergence: successful
#> Function Evaluations: 44
#> Gradient Evaluations: 18
#>
# Example with fixed parameter
fit.gev(xdat, show = TRUE, fpar = list(shape = 0))
#> Log-likelihood: -159.2538
#>
#> Estimates
#> loc scale
#> 0.02176 1.02766
#>
#> Standard Errors
#> loc scale
#> 0.10844 0.07963
#>
#> Parameters
#> loc scale shape
#> 0.02176 1.02766 0.00000
#>
#> Optimization Information
#> Convergence: successful
#> Function Evaluations: 55
#> Gradient Evaluations: 17
#>