Learn R Programming

evd (version 1.1-0)

uvmle: Maximum-likelihood Fitting of Univariate Extreme Value Distributions

Description

Maximum-likelihood estimates for the Frechet, Gumbel, reversed Weibull and generalized extreme value distributions, including linear modelling of the location parameter, and allowing any of the parameters to be held fixed if desired.

Usage

ffrechet(x, start, ..., nsloc = NULL, std.err = TRUE, method = "BFGS")
fgumbel(x, start, ..., nsloc = NULL, std.err = TRUE, method = "BFGS") 
frweibull(x, start, ..., nsloc = NULL, std.err = TRUE, method = "BFGS") 
fgev(x, start, ..., nsloc = NULL, std.err = TRUE, method = "BFGS")

Arguments

x
A numeric vector, which may contain missing values.
start
A named list giving the parameters to be optimized with initial values (see Details). If start is omitted the routine attempts to find good starting values using moment estimators.
...
Additional parameters, either for the distribution or for optim. If parameters of the distribution are included they will be held fixed (see Details).
nsloc
A data frame with the same number of rows as the length of x, for linear modelling of the location parameter (see Details). The data frame is treated as a covariate matrix (excluding the intercept). A numeric vector
std.err
Logical; if TRUE (the default), the ``standard errors'' are returned.
method
The optimization method (see optim for details).

Value

  • A list with with components
  • estimatea vector containing the maximum likelihood estimates.
  • std.erra vector containing the ``standard errors'' (if $\code{std.err} = \code{TRUE}$).
  • deviancethe deviance at the maximum likelihood estimates.
  • countsa two-element integer vector giving the number of calls to the log-likelihood function and the number gradient approximations respectively.

Details

Maximization of the log-likelihood is performed. The std.err component of the returned list is taken from the observed information, calculated by a numerical approximation. The ``standard errors'' must be interpreted with caution because the usual asymptotic properties of maximum likelihood estimators may not hold (Smith, 1985). For stationary fitting, the parameters can be passed (either as named components of start or as fixed values) using loc, scale and shape.

For non-stationary fitting, the non-stationary parameters can be passed using the column names of the data frame nsloc with the prefix ``loc''. The intercept of the linear model can be passed as loc. If nsloc1 is a vector it is converted into a one column data frame with column name ``trend'', so that the associated parameter can be passed as loc1trend.

For non-stationary fitting it is recommended that the covariates within the linear model for the location parameter are (at least approximately) centered and scaled, particularly if automatic starting values are used, since the starting values for all the associated parameters are taken to be zero.

References

Smith, R. L. (1985) Maximum likelihood estimation in a class of non-regular cases. Biometrika, 72, 67--90.

See Also

optim

Examples

Run this code
data <- rgev(100, loc = 0.13, scale = 1.1, shape = 0.2)
fgev(data, control = list(trace = 1))
fgev(data, shape = 0)
fgev(data, scale = 1, shape = 0)
fgev(data, start = list(loc = 0), scale = 1, shape = 0)
fgev(data, nsloc = (-49:50)/100)
fgev(data, nsloc = data.frame(trend = (-49:50)/100, random =
runif(100, min=-.5, max=.5)))
fgev(data, nsloc = data.frame(trend = (-49:50)/100, random =
runif(100, min=-.5, max=.5)), locrandom = 0)

Run the code above in your browser using DataLab