RVineMatrixCheck {VineCopula} | R Documentation |
R-Vine Matrix Check
Description
The given matrix is tested to be a valid R-vine matrix.
Usage
RVineMatrixCheck(M)
Arguments
M |
A |
Value
code |
|
Note
The matrix M do not have to be given in natural order or the diagonal
in order d:1. The test checks if it can be done in order to be a valid
R-vine matrix.
If a function in this package needs the natural order the
RVineMatrix
object is automatically "normalized".
The function
RVineMatrix()
automatically checks if the given R-vine matrix is
valid.
Author(s)
Harry Joe
References
Joe H, Cooke RM and Kurowicka D (2011). Regular vines: generation algorithm and number of equivalence classes. In Dependence Modeling: Vine Copula Handbook, pp 219–231. World Scientific, Singapore.
See Also
Examples
A1 <- matrix(c(6, 0, 0, 0, 0, 0,
5, 5, 0, 0, 0, 0,
3, 4, 4, 0, 0, 0,
4, 3, 3, 3, 0, 0,
1, 1, 2, 2, 2, 0,
2, 2, 1, 1, 1, 1), 6, 6, byrow = TRUE)
b1 <- RVineMatrixCheck(A1)
print(b1)
# improper vine matrix, code=-1
A2 <- matrix(c(6, 0, 0, 0, 0, 0,
5, 5, 0, 0, 0, 0,
4, 4, 4, 0, 0, 0,
1, 3, 3, 3, 0, 0,
3, 1, 2, 2, 2, 0,
2, 2, 1, 1, 1,1 ), 6, 6, byrow = TRUE)
b2 <- RVineMatrixCheck(A2)
print(b2)
# improper vine matrix, code=-2
A3 <- matrix(c(6, 0, 0, 0, 0, 0,
3, 5, 0, 0, 0, 0,
3, 4, 4, 0, 0, 0,
4, 3, 3, 3, 0, 0,
1, 1, 2, 2, 2, 0,
2, 2, 1, 1, 1, 1), 6, 6, byrow = TRUE)
b3 <- RVineMatrixCheck(A3)
print(b3)