Estimates the parameters of the generalized extreme value (GEV) distribution by
maximizing the generalized log‐likelihood, which incorporates a Beta prior on the
shape parameter. Initial parameter estimates are obtained using the method of L‐moments
and optimization is performed via stats::nlminb()
with repeated perturbations if
needed.
For NS-FFA: To estimate parameters for a nonstationary model, include the
observation years (ns_years
) and the nonstationary model structure (ns_structure
).
fit_gmle(data, prior, ns_years = NULL, ns_structure = NULL)
A list containing the results of parameter estimation:
data
: The data
argument.
prior
: The prior
argument.
ns_years
: The ns_years
argument, if given.
ns_structure
: The ns_structure
argument, if given.
method
: "GMLE"
.
params
: Numeric vector of estimated parameters.
mll
: The maximum value of the generalized log‐likelihood.
Numeric vector of observed annual maximum series values. Must be strictly positive, finite, and not missing.
Numeric vector of length 2. Specifies the parameters of the Beta prior for the shape parameter \(\kappa\).
For NS-FFA only: Numeric vector of observation years corresponding
to data
. Must be the same length as data
and strictly increasing.
For NS-FFA only: Named list indicating which distribution parameters are modeled as nonstationary. Must contain two logical scalars:
location
: If TRUE
, the location parameter has a linear temporal trend.
scale
: If TRUE
, the scale parameter has a linear temporal trend.
Calls fit_lmoments()
on the data to obtain initial parameter estimates.
Initializes trend parameters to zero if necessary.
Defines an objective function using utils_generalized_likelihood()
.
Runs stats::nlminb()
with box constraints. Attempts minimization up to 100 times.
El Adlouni, S., Ouarda, T.B.M.J., Zhang, X., Roy, R., Bobee, B., 2007. Generalized maximum likelihood estimators for the nonstationary generalized extreme value model. Water Resources Research 43 (3), 1–13. tools:::Rd_expr_doi("10.1029/2005WR004545")
Martins, E. S., and Stedinger, J. R. (2000). Generalized maximum-likelihood generalized extreme-value quantile estimators for hydrologic data. Water Resources Research, 36(3), 737–744. tools:::Rd_expr_doi("10.1029/1999WR900330")
utils_generalized_likelihood()
, fit_lmoments()
, stats::nlminb()
data <- rnorm(n = 100, mean = 100, sd = 10)
prior <- c(6, 9)
ns_years <- seq(from = 1901, to = 2000)
ns_structure <- list(location = TRUE, scale = FALSE)
fit_gmle(data, prior, ns_years, ns_structure)
Run the code above in your browser using DataLab