fbvevd {evd} | R Documentation |
Fit models for one of eight parametric bivariate extreme value distributions, including linear modelling of the marginal location parameters, and allowing any of the parameters to be held fixed if desired.
fbvevd(x, model = "log", start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE, dsm = TRUE, corr = FALSE, method = "BFGS", warn.inf = TRUE)
x |
A matrix or data frame with two columns, which may contain missing values. |
model |
The specified model; a character string. Must be
either "log" (the default), "alog" , "hr" ,
"neglog" , "aneglog" , "bilog" ,
"negbilog" or "ct" (or any unique partial match),
for the logistic, asymmetric logistic, Husler-Reiss, negative
logistic, asymmetric negative logistic, bilogistic, negative
bilogistic and Coles-Tawn models respectively. The definition
of each model is given in rbvevd . |
start |
A named list giving the initial values for the
parameters over which the likelihood is to be maximized.
If start is omitted the routine attempts to find good
starting values using marginal maximum likelihood estimators. |
... |
Additional parameters, either for the bivariate extreme
value model or for the optimization function optim . If
parameters of the model are included they will be held fixed at
the values given (see Examples). |
nsloc1, nsloc2 |
A data frame with the same number of rows as
x , for linear modelling of the location parameter on the
first/second margin (see Details).
The data frames are treated as covariate matrices, excluding the
intercept. A numeric vector can be given as an alternative to a
single column data frame. |
std.err |
Logical; if TRUE (the default), the standard
errors are returned. |
dsm |
Logical; if TRUE (the default), summaries of the
dependence structure are returned. |
corr |
Logical; if TRUE , the correlation matrix is
returned. |
method |
The optimization method (see optim for
details). |
warn.inf |
Logical; if TRUE (the default), a warning is
given if the negative log-likelihood is infinite when evaluated at
the starting values. |
The dependence parameter names are one or more of dep
,
asy1
, asy2
, alpha
and beta
, depending on
the model selected (see rbvevd
). The marginal parameter
names are loc1
, scale1
and shape1
for the first
margin, and loc2
, scale2
and shape2
for the
second margin.
If nsloc1
is not NULL
, so that a linear model is
implemented for the first marginal location parameter, the parameter
names for the first margin are loc1
, loc1
x1,
..., loc1
xn, scale
and shape
, where
x1, ..., xn are the column names of nsloc1
,
so that loc1
is the intercept of the linear model, and
loc1
x1, ..., loc1
xn are the
ncol(nsloc1)
coefficients.
When nsloc2
is not NULL
, the parameter names for the
second margin are constructed similarly.
It is recommended that the covariates within the linear models for
the location parameters are (at least approximately) centered and
scaled (i.e. that the columns of nsloc1
and nsloc2
are centered and scaled), particularly if automatic starting values
are used, since the starting values for the associated parameters are
then zero.
If dsm
is TRUE
, three values are returned which
summarize the dependence structure, based on the fitted
dependence function A (see abvpar
).
Two are measures of the strength of dependence.
The first (Dependence One) is given by 2(1-A(1/2)).
The second (Dependence Two) is the integral of 4(1 - A(x)),
taken over 0 <= x <= 1.
Both measures are zero at independence and one at complete dependence.
The third value (Asymmetry) is a measure of asymmetry, given by the integral of 4(A(x) - A(1-x))/(3 - 2 sqrt(2)), taken over 0 <= x <= 0.5. This lies in the closed interval [-1,1] (conjecture), with larger absolute values representing stronger asymmetry. For the logistic, Husler-Reiss and negative logistic models A(x) = A(1-x) for all 0 <= x <= 0.5, so the value will be zero.
For numerical reasons the parameters of each model are subject the artificial constraints given in Table 1 of the User's Guide.
Returns an object of class c("bvevd","evd")
.
The generic accessor functions fitted
(or
fitted.values
), std.errors
,
deviance
, logLik
and
AIC
extract various features of the
returned object.
The functions profile
and profile2d
can be
used to obtain deviance profiles.
The function anova
compares nested models, and the
function AIC
compares non-nested models.
The function plot
produces diagnostic plots.
An object of class c("bvevd","evd")
is a list containing
the following components
estimate |
A vector containing the maximum likelihood estimates. |
std.err |
A vector containing the standard errors. |
fixed |
A vector containing the parameters that have been set to fixed values within the optimization. |
param |
A vector containing all parameters (optimized and fixed). |
deviance |
The deviance at the maximum likelihood estimates. |
dep.summary |
A vector of three values, summarizing the dependence structure of the fitted model (see Details). |
corr |
The correlation matrix. |
convergence, counts, message |
Components taken from the
list returned by optim . |
call |
The call of the current function. |
data |
The data passed to the argument x . |
tdata |
The data, transformed to stationarity (for non-stationary models). |
nsloc1, nsloc2 |
The arguments nsloc1 and nsloc2 . |
n |
The number of rows in x . |
model |
The argument model . |
The standard errors and the correlation matrix in the returned object are taken from the observed information, calculated by a numerical approximation. They must be interpreted with caution when either of the marginal shape parameters are less than -0.5, because the usual asymptotic properties of maximum likelihood estimators do not then hold (Smith, 1985).
Smith, R. L. (1985) Maximum likelihood estimation in a class of non-regular cases. Biometrika, 72, 6790.
anova.evd
, optim
,
plot.bvevd
, profile.evd
,
profile2d.evd
, rbvevd
bvdata <- rbvevd(100, dep = 0.6, model = "log", mar1 = c(1.2,1.4,0.4)) M1 <- fbvevd(bvdata, model = "log") M2 <- fbvevd(bvdata, model = "log", dep = 0.75) anova(M1, M2) plot(M1) plot(M1, mar = 1) plot(M1, mar = 2) plot(M2) M1P <- profile(M1, which = "dep") plot(M1P) trend <- (-49:50)/100 rnd <- runif(100, min = -.5, max = .5) fbvevd(bvdata, model = "log", nsloc1 = trend) fbvevd(bvdata, model = "log", nsloc1 = trend, nsloc2 = data.frame(trend = trend, random = rnd)) fbvevd(bvdata, model = "log", nsloc1 = trend, nsloc2 = data.frame(trend = trend, random = rnd), loc2random = 0)