The R-vine structure is essentially a lower-triangular matrix/triangular
array, with a notation that differs from the one in the VineCopula package.
An example array is
4 4 4 4
3 3 3
2 2
1
which encodes the following pair-copulas:
tree |
edge |
pair-copulas |
0 |
0 |
(1, 4) |
|
1 |
(2, 4) |
|
2 |
(3, 4) |
1 |
0 |
(1, 3; 4) |
|
1 |
(2, 3; 4) |
An R-vine structure can be converted to an R-vine matrix using
as_rvine_matrix()
, which encodes the same model with a square matrix filled
with zeros. For instance, the matrix corresponding to the structure above is:
4 4 4 4
3 3 3 0
2 2 0 0
1 0 0 0
Similarly, an R-vine matrix can be converted to an R-vine structure using
as_rvine_structure()
.
Denoting by M[i, j]
the array entry in row i
and column j
(the
pair-copula index for edge e
in tree t
of a d
dimensional vine is
(M[d + 1 - e, e], M[t, e]; M[t - 1, e], ..., M[1, e])
. Less formally,
Start with the counter-diagonal element of column e
(first conditioned
variable).
Jump up to the element in row t
(second conditioned variable).
Gather all entries further up in column e
(conditioning set).
Internally, the diagonal is stored separately from the off-diagonal elements,
which are stored as a triangular array. For instance, the off-diagonal
elements off the structure above are stored as
4 4 4
3 3
2
for the structure above. The reason is that it allows for parsimonious
representations of truncated models. For instance, the 2-truncated model is
represented by the same diagonal and the following truncated triangular
array:
4 4 4
3 3
A valid R-vine structure or matrix must satisfy several conditions which are
checked when rvine_structure()
, rvine_matrix()
, or some coercion methods
(see as_rvine_structure()
and as_rvine_matrix(
) are called:
It can only contain numbers between 1 and d (and additionally zeros for
R-vine matrices).
The anti-diagonal must contain the numbers 1, ..., d.
The anti-diagonal entry of a column must not be contained in any column
further to the right.
The entries of a column must be contained in all columns to the left.
The proximity condition must hold: For all t = 1, ..., d - 2 and e = 1,
..., d - t there must exist an index j > d, such that
(M[t, e], {M[1, e], ..., M[t - 1, e]})
equals either
(M[d + 1 - j, j], {M[1, j], ..., M[t - 1, j]})
or
(M[t - 1, j], {M[d + 1 - j, j], M[1, j], ..., M[t - 2, j]})
.
Condition 5 already implies conditions 2-4, but is more difficult to check by
hand.