mexDependence(x, which, dqu, margins="laplace", constrain=TRUE, v = 10, maxit=1000000, start=c(.01, .01), marTransform="mixture", nOptim = 1, PlotLikDo=FALSE, PlotLikRange=list(a=c(-1,1),b=c(-3,1)), PlotLikTitle=NULL)
migpd
.migpd
.mex
.constrain=TRUE
although this will subsequently be changed to FALSE if margins="gumbel"
for which constrained estimation is not implemented. If margins="laplace"
and constrain=TRUE
then the dependence parameter space is constrained to allow only combinations of parameters which give the correct stochastic ordering between (positively and negatively) asymptotically dependent variables and variables which are asymptotically independent.constrain=TRUE
. Takes positive values greater than 1; values between 2 and 10 are recommended.maxit = 1000000
.start
is used as a starting value for numerical estimation of each of the dependence models to be estimated; a matrix with two rows corresponding to dependence parameters a and b respectively and number of columns equal to the number of dependence models to be estimated (the ordering of the columns will be as in the original data matrix); or a previously estimated object of class "mex" whose dependence parameter estimates are used as a starting point for estimation. Note that under constrain=TRUE
, if supplied, start
must lie within the permitted area of the parameter space.marTransform="mixture"
(the default) or marTransform="empirical"
. When marTransform="mixture"
, the rank transform is used below the corresponding GPD fitting threshold used in x
, and the fitted gpd tail model is used above this threshold. When marTransform="empirical"
the rank transform is used for the entire range of each marginal distribution.nOptim > 1
the first call to the optimiser uses the
value start
as a starting point, while subsequent calls
to the optimiser are started at the parameter value to which
the previous call converged.PlotLikDo
is set equal to TRUE.PlotLikDo=TRUE
. Character string. Optional title added to the profile log-likelihood surface plot.mex
which is a list containing the following three objects:
migpd
.mexDependence
.x
. The precise nature of the estimation depends on the value of margins
. If margins="laplace"
(the default) then dependence parameters a and b are estimated after transformation of the data to Laplace marginal distributions. These parameters can describe both positive and negative dependence. If margins="gumbel"
then the parameters a, b, c and d in the dependence structure described by Heffernan and Tawn (2004) are estimated in the following two steps: first, a and b are estimated; then, if a=0 and b is negative, parameters c and d are estimated (this is the case of negative dependence). Otherwise c and d will be fixed at zero (this is the case of positive dependence).
If margins="laplace"
then the option of constrained parameter estimation is available by setting argument constrain=TRUE
. The default is to constrain the values of the parameters (constrain=TRUE
). This constrained estimation ensures validity of the estimated model, and enforces the consistency of the fitted dependence model with the strength of extremal dependence exhibited by the data. More details are given in Keef et al. (2013). The effect of this constraint is to limit the shape of the dependence parameter space so that its boundary is curved rather than following the original box constraints suggested by Heffernan and Tawn (2004). The constraint brings with it some performance issues for the optimiser used to estimate the dependence parameters, in particular sensitivity to choice of starting value which we describe now. The dependence parameter estimates returned by this function can be particularly sensitive to the choice of starting value used for the optimisation. This is especially true when margins="laplace"
and constrain=TRUE
, in which case the maximum of the objective function can lie on the edge of the (possibly curved) constrained parameter space. It is therefore up to the user to check that the reported parameter estimates really do correspond to the maximum of the profile lilkelihood surface. This is easily carried out by using the visual diagnostics invoked by setting PlotLikDo=TRUE
and adjusting the plotting area by using the argument PlotLikRange
to focus on the region containing the surface maximum. See an example below which illustrates the use of this diagnostic.
migpd
, bootmex
, predict.mex
, plot.mex
data(winter)
mygpd <- migpd(winter , mqu=.7, penalty="none")
mexDependence(mygpd , which = "NO", dqu=.7)
# focus on 2-d example with parameter estimates on boundary of constrained parameter space:
NO.NO2 <- migpd(winter[,2:3] , mqu=.7, penalty="none")
# starting value gives estimate far from true max:
mexDependence(NO.NO2, which = "NO",dqu=0.7,start=c(0.01,0.01),
PlotLikDo=TRUE,PlotLikTitle=c("NO2 | NO"))
# zoom in on plotting region containing maximum:
mexDependence(NO.NO2, which = "NO",dqu=0.7,start=c(0.01,0.01),
PlotLikDo=TRUE,PlotLikTitle=c("NO2 | NO"),
PlotLikRange = list(a=c(0,0.8),b=c(-0.2,0.6)))
# try different starting value:
mexDependence(NO.NO2, which = "NO",dqu=0.7,start=c(0.1,0.1),
PlotLikDo=TRUE,PlotLikTitle=c("NO2 | NO"),
PlotLikRange = list(a=c(0,0.8),b=c(-0.2,0.6)))
Run the code above in your browser using DataLab