EstimationMaxLinear: Estimation of the parameters of the max-linear model

Description Usage Arguments Details Value References See Also Examples

View source: R/EstimationML.R

Description

Estimation the parameters of the max-linear model, using either the pairwise M-estimator or weighted least squares (WLS).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
EstimationMaxLinear(
  x,
  indices,
  k,
  method,
  Bmatrix = NULL,
  Ldot = NULL,
  biascorr = FALSE,
  k1 = (nrow(x) - 10),
  tau = 5,
  startingValue,
  Omega = diag(nrow(indices)),
  iterate = FALSE,
  covMat = TRUE,
  GoFtest = FALSE,
  dist = 0.01,
  EURO = FALSE
)

Arguments

x

An n x d data matrix.

indices

A q x d matrix containing at least 2 non-zero elements per row, representing the values in which we will evaluate the stable tail dependence function.

k

An integer between 1 and n - 1; the threshold parameter in the definition of the empirical stable tail dependence function.

method

Choose between Mestimator and WLS.

Bmatrix

A function that converts the parameter vector theta to a parameter matrix B. If nothing is provided, then a simple 2-factor model is assumed.

Ldot

For method = "WLS" only. A q x p matrix, where p is the number of parameters of the model. Represents the total derivative of the function L defined in Einmahl et al. (2016). If nothing is provided, then a simple 2-factor model is assumed.

biascorr

For method = "WLS" only. If TRUE, then the bias-corrected estimator of the stable tail dependence function is used. Defaults to FALSE.

k1

For biascorr = TRUE only. The value of k_1 in the definition of the bias-corrected estimator of the stable tail dependence function.

tau

For biascorr = TRUE only. The parameter of the power kernel.

startingValue

Initial value of the parameters in the minimization routine.

Omega

A q x q matrix specifying the metric with which the distance between the parametric and nonparametric estimates will be computed. The default is the identity matrix, i.e., the Euclidean metric.

iterate

A Boolean variable. For method = "WLS" only. If TRUE, then continuous updating is used. Defaults to FALSE.

covMat

A Boolean variable. For method = "WLS" only. If TRUE (the default), the covariance matrix is calculated.

GoFtest

A Boolean variable. For method = "WLS" only. If TRUE, then the goodness-of-fit test of Corollary 2.6 from Einmahl et al. (2016) is performed. Defaults to FALSE.

dist

A positive scalar. If GoFtest = TRUE, only eigenvalues ν larger than dist are used; see Corollary 2.6 (Einmahl et al., 2016). Defaults to 0.01.

EURO

A Boolean variable. If TRUE, then the model from Einmahl et al. (2016, Section 4) is assumed, and the corresponding Bmatrix and Ldot are used.

Details

The matrix indices can be either user defined or returned by selectGrid. For method = "Mestimator", only a grid with exactly two ones per row is accepted, representing the pairs to be used. The functions Bmatrix and Ldot can be defined such that they represent a max-linear model on a directed acyclic graph: see the vignette for this package for an example.

Value

For Mestimator, the estimator theta is returned. For WLS, a list with the following components:

theta The estimator with estimated optimal weight matrix.
theta_pilot The estimator without the optimal weight matrix.
covMatrix The estimated covariance matrix for the estimator.
value The value of the minimized function at theta.
GoFresult A list of length two, returning the value of the test statistic and s.

References

Einmahl, J.H.J., Kiriliouk, A., and Segers, J. (2018). A continuous updating weighted least squares estimator of tail dependence in high dimensions. Extremes 21(2), 205-233.

See Also

selectGrid

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Generate data
set.seed(1)
n <- 1000
fr <- matrix(-1/log(runif(2*n)), nrow = n, ncol = 2)
data <- cbind(pmax(0.3*fr[,1],0.7*fr[,2]),pmax(0.5*fr[,1],0.5*fr[,2]),pmax(0.9*fr[,1],0.1*fr[,2]))
## Transform data to unit Pareto margins
x <- apply(data, 2, function(i) n/(n + 0.5 - rank(i)))
## Define indices in which we evaluate the estimator
indices <- selectGrid(cst = c(0,0.5,1), d = 3)
EstimationMaxLinear(x, indices, k = 100, method = "WLS", startingValue = c(0.3,0.5,0.9))
indices <- selectGrid(cst = c(0,1), d = 3)
EstimationMaxLinear(x, indices, k = 100, method = "Mestimator", startingValue = c(0.3,0.5,0.9))

tailDepFun documentation built on June 3, 2021, 5:10 p.m.