fgev(x, start, ..., 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).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.
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.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 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, profile.evd,
profile2d.evduvdata <- rgev(100, loc = 0.13, scale = 1.1, shape = 0.2)
trend <- (-49:50)/100
M1 <- fgev(uvdata, nsloc = trend, control = list(trace = 1))
M2 <- fgev(uvdata)
M3 <- fgev(uvdata, shape = 0)
M4 <- fgev(uvdata, scale = 1, shape = 0)
anova(M1, M2, M3, M4)
plot(M2)
M2P <- profile(M2)
plot(M2P)
rnd <- runif(100, min = -.5, max = .5)
fgev(uvdata, nsloc = data.frame(trend = trend, random = rnd))
fgev(uvdata, nsloc = data.frame(trend = trend, random = rnd), locrandom = 0)Run the code above in your browser using DataLab