dim_ExtDep {ExtremalDep} | R Documentation |
Dimensions calculations for parametric extremal dependence models
Description
This function calculates the dimensions of an extremal dependence model for a given set of parameters, the dimension of the parameter vector for a given dimension and verifies the adequacy between model dimension and length of parameter vector when both are provided.
Usage
dim_ExtDep(model, par=NULL, dim=NULL)
Arguments
model |
A string with the name of the model: |
par |
A vector representing the parameters of the model. |
dim |
An integer representing the dimension of the model. |
Details
One of par
or dim
need to be provided.
If par
is provided, the dimension of the model is calculated.
If dim
is provided, the length of the parameter vector is calculated.
If both par
and dim
are provided, the adequacy between the dimension of the model and the length of the parameter vector is checked.
For model="HR"
, the parameter vector is of length choose(dim,2)
.
For model="PB"
or model="Extremalt"
, the parameter vector is of length choose(dim,2) + 1
.
For model="EST"
, the parameter vector is of length choose(dim,2) + dim + 1
.
For model="TD"
, the parameter vector is of length dim
.
For model="AL"
, the parameter vector is of length 2^(dim-1)*(dim+2) - (2*dim+1)
.
Value
If par
is not provided and dim
is provided: returns an integer indicating the length of the parameter vector.
If par
is provided and dim
is not provided: returns an integer indicating the dimension of the model.
If par
and dim
are provided: returns a TRUE/FALSE
statement indicating whether the length of the parameter and the dimension match.
Author(s)
Simone Padoan, simone.padoan@unibocconi.it, https://faculty.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com https://www.borisberanger.com;
Examples
dim_ExtDep(model="EST", dim=3)
dim_ExtDep(model="AL", dim=3)
dim_ExtDep(model="PB", par=rep(0.5,choose(4,2)+1) )
dim_ExtDep(model="TD", par=rep(1,5) )
dim_ExtDep(model="EST", dim=2, par=c(0.5,1,1,1) )
dim_ExtDep(model="PB", dim=4, par=rep(0.5,choose(4,2)+1) )