fgev.quantile(x, start, ..., prob, nsloc = NULL, std.err = TRUE,
corr = FALSE, method = "Nelder-Mead", warn.inf = TRUE)
start
is omitted the routine attempts to find good
starting values using moment estimators.optim
. If parameters of the distribution are included they
will be held fixed (see Details).quantile
parameter (see Details).x
, for linear modelling of the location
parameter (see Details).
The data frame is treated as a covariate matrix (excluding the
intercept).
A numeric vectorTRUE
(the default), the ``standard
errors'' are returned.TRUE
, the ``correlation matrix'' is
returned.optim
for
details).TRUE
(the default), a warning is
given if the negative log-likelihood is infinite when evaluated at
the starting values."evd"
. The generic accessor functions fitted
(or
fitted.values
), std.errors
and
deviance
extract various features of the returned
object.
The functions profile
and profile2d
are
used to obtain deviance profiles.
In particular, profiles of the quantile $z_p$ can be calculated
and plotted.
The function anova
compares nested models.
The function plot
produces diagnostic plots.
An object of class "evd"
is a list containing at most
the following components
optim
.x
.nsloc
.x
.profile2d.evd
fgev.quant
performs the same fit as fgev
,
but under a different parameterization.
For stationary fitting using fgev
, the likelihood is optimized
over $(a,b,s)$, where $a$ is the location parameter, $b$ is
the scale and $s$ is the shape.
For stationary fitting using fgev.quant
, the likelihood is
optimized over $(z_p,b,s)$, where $\code{prob} = p$ and
$$z_p = a - b/s (1 - (-\log(1 - p))^s)$$
is such that $G(z_p) = 1 - p$, where $G$ is the
generalized extreme value distribution function.
For non-stationary fitting the parameter $z_p$ is again given by the
equation above but $a$ becomes the intercept of the linear model
for the location parameter.
For stationary fitting, the parameters can be passed (either as
named components of start
or as fixed values) using
quantile
, 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''. 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 loctrend
.
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.
anova.evd
, optim
,
plot.evd
uvdata <- rgev(100, loc = 0.13, scale = 1.1, shape = 0.2)
M1 <- fgev.quantile(uvdata, prob = 0.1)
M2 <- fgev.quantile(uvdata, prob = 0.01)
M1P <- profile(M1, which = "quantile")
M2P <- profile(M2, which = "quantile")
plot(M1P)
plot(M2P)
Run the code above in your browser using DataLab