Maximum-likelihood fitting for the distribution of the maximum/minimum of a given number of independent variables from a specified distribution.
fextreme(x, start, densfun, distnfun, ..., distn, mlen = 1, largest =
TRUE, std.err = TRUE, corr = FALSE, method = "Nelder-Mead")
Returns an object of class c("extreme","evd")
.
The generic accessor functions fitted
(or
fitted.values
), std.errors
,
AIC
extract various features of the
returned object.
The function anova
compares nested models.
An object of class c("extreme","evd")
is a list containing
at most the following components
A vector containing the maximum likelihood estimates.
A vector containing the standard errors.
The deviance at the maximum likelihood estimates.
The correlation matrix.
The variance covariance matrix.
Components taken from the
list returned by optim
.
The call of the current function.
The data passed to the argument x
.
The length of x
.
A numeric vector.
A named list giving the initial values for the parameters over which the likelihood is to be maximized.
Density and distribution function of the specified distribution.
Additional parameters, either for the specified
distribution or for the optimization function optim
.
If parameters of the distribution are included they will be
held fixed at the values given (see Examples). If
parameters of the distribution are not included either here
or as a named component in start
they will be held
fixed at the default values specified in the corresponding
density and distribution functions (assuming they exist; an
error will be generated otherwise).
A character string, optionally specified as an alternative
to densfun
and distnfun
such that the density and
distribution functions are formed upon the addition of the
prefixes d
and p
respectively.
The number of independent variables.
Logical; if TRUE
(default) use maxima,
otherwise minima.
Logical; if TRUE
(the default), the standard
errors are returned.
Logical; if TRUE
, the correlation matrix is
returned.
The optimization method (see optim
for
details).
Maximization of the log-likelihood is performed. The estimated standard errors are taken from the observed information, calculated by a numerical approximation.
If the density and distribution functions are user defined, the order
of the arguments must mimic those in R base (i.e. data first,
parameters second).
Density functions must have log
arguments.
anova.evd
, forder
, optim
uvdata <- rextreme(100, qnorm, mean = 0.56, mlen = 365)
fextreme(uvdata, list(mean = 0, sd = 1), distn = "norm", mlen = 365)
fextreme(uvdata, list(rate = 1), distn = "exp", mlen = 365,
method = "Brent", lower=0.01, upper=10)
fextreme(uvdata, list(scale = 1), shape = 1, distn = "gamma", mlen = 365,
method = "Brent", lower=0.01, upper=10)
fextreme(uvdata, list(shape = 1, scale = 1), distn = "gamma", mlen = 365)
Run the code above in your browser using DataLab