Learn R Programming

evd (version 1.2-3)

fbv: Maximum-likelihood Fitting of Bivariate Extreme Value Distributions

Description

Fit models for bivariate extreme value distributions; symmetric/asymmetric logistic, symmetric/asymmetric negative logistic, bilogistic, negative bilogistic, Husler-Reiss and Coles-Tawn models, including linear modelling of the marginal location parameters, and allowing any of the parameters to be held fixed if desired.

Usage

fbvlog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
    corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvalog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
    corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvhr(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
    corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvneglog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
    corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvaneglog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE,
    corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvbilog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE, 
    corr = FALSE, method = "BFGS", warn.inf = TRUE) 
fbvnegbilog(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE, 
    corr = FALSE, method = "BFGS", warn.inf = TRUE)
fbvct(x, start, ..., nsloc1 = NULL, nsloc2 = NULL, std.err = TRUE, 
    corr = FALSE, method = "BFGS", warn.inf = TRUE)

Arguments

x
A matrix or data frame with two columns, which may contain missing values.
start
A named list giving the parameters to be optimized with starting values (see Details). If start is omitted the routine attempts to find good starting values using marginal maximum likelihood estimators.
...
Additional parameters, either for the distribution or for optim. If parameters of the distribution are included they will be held fixed (see Details).
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
std.err
Logical; if TRUE (the default), the ``standard errors'' 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.

Value

  • Returns an object of class c("bvevd","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 can be used to obtain deviance profiles. The function anova compares nested models. The function plot produces diagnostic plots.

    An object of class c("bvevd","evd") is a list containing the following components

  • estimateA vector containing the maximum likelihood estimates.
  • std.errA vector containing the ``standard errors''.
  • fixedA vector containing the parameters that have been set to fixed values within the optimization.
  • paramA vector containing all parameters (optimized and fixed).
  • devianceThe deviance at the maximum likelihood estimates.
  • corrThe ``correlation matrix''.
  • convergence,counts,messageComponents taken from the list returned by optim.
  • callThe call of the current function.
  • dataThe data passed to the argument x.
  • tdataThe data, transformed to stationarity (for non-stationary models).
  • nsloc1,nsloc2The arguments nsloc1 and nsloc2.
  • nThe number of rows in x.
  • modelA character string describing the fitted model.

Details

Maximization of the log-likelihood is performed. 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 because the usual asymptotic properties of maximum likelihood estimators may not hold (Smith, 1985).

For stationary fitting, the named components of start can be any of dep, asy (a vector of length two), alpha, beta, mar1 (a vector of length three) and mar2 (a vector of length three). Alternatively, mar1 can be passed as three separate arguments; loc1, scale1 and shape1. mar2 can be similarly passed as three separate arguments; loc2, scale2 and shape2. The asymmetry parameters for the asymmetric logistic and negative asymmetric logistic models can also be passed separately as asy1 and asy2. Associating a separate name with each parameter allows any parameter subset to be fixed at specified values. All parameters to be fixed must be passed individually (e.g. to fix the parameters on the first margin all of loc1, scale1 and shape1 must be specified; using mar1 to specify all three simultaneously results in an error).

For non-stationary fitting, the non-stationary parameters on the first margin can be passed (either in start or as fixed values) using the column names of the data frame nsloc1 with the prefix ``loc1''. The intercept of the linear model can be passed as loc1. 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. Parameters on the second margin can be passed similarly.

For non-stationary fitting it is recommended that the covariates within the linear models for the location parameters 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

anova.evd, optim, plot.bvevd, profile.evd, profile2d.evd

Examples

Run this code
bvdata <- rbvlog(100, dep = 0.6, mar1 = c(1.2,1.4,0.4),
mar2 = c(1.2,1.4,0.4))
M1 <- fbvlog(bvdata)
M2 <- fbvlog(bvdata, 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)
fbvlog(bvdata, nsloc1 = trend)
fbvlog(bvdata, nsloc1 = trend, nsloc2 = data.frame(trend = trend,
random = rnd))
fbvlog(bvdata, nsloc1 = trend, nsloc2 = data.frame(trend = trend,
random = rnd), loc2random = 0)

Run the code above in your browser using DataLab