EstimationMaxLinear {tailDepFun} | R Documentation |
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 |
indices |
A |
k |
An integer between 1 and |
method |
Choose between |
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 |
biascorr |
For |
k1 |
For |
tau |
For |
startingValue |
Initial value of the parameters in the minimization routine. |
Omega |
A |
iterate |
A Boolean variable. For |
covMat |
A Boolean variable. For |
GoFtest |
A Boolean variable. For |
dist |
A positive scalar. If |
EURO |
A Boolean variable. If |
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
Examples
## 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))