Learn R Programming

tailDepFun (version 1.0.0)

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

Description

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

Usage

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 $\nu$ 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.

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.

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.

References

Einmahl, J.H.J., Kiriliouk, A., and Segers, J. (2016). A continuous updating weighted least squares estimator of tail dependence in high dimensions. See http://arxiv.org/abs/1601.04826.

See Also

selectGrid

Examples

Run this code
## 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))

Run the code above in your browser using DataLab