An RVineMatrix() is permuted to achieve a natural ordering (i.e. diag(RVM$Matrix) == d:1)

RVineMatrixNormalize(RVM)

Arguments

RVM

RVineMatrix() defining the R-vine structure

Value

RVM

An RVineMatrix() in natural ordering with entries in RVM$names keeping track of the reordering.

Examples


Matrix <- matrix(c(5, 2, 3, 1, 4,
                   0, 2, 3, 4, 1,
                   0, 0, 3, 4, 1,
                   0, 0, 0, 4, 1,
                   0, 0, 0, 0, 1), 5, 5)
family <- matrix(1,5,5)

par <- matrix(c(0, 0.2, 0.9, 0.5, 0.8,
                0,   0, 0.1, 0.6, 0.9,
                0,   0,   0, 0.7, 0.5,
                0,   0,   0,   0, 0.8,
                0,   0,   0,   0,   0), 5, 5)

# define RVineMatrix object
RVM <- RVineMatrix(Matrix, family, par)

# normalise the RVine
RVineMatrixNormalize(RVM)
#> R-vine copula with the following pair-copulas:
#> Tree 1:
#> 2,5  Gaussian (par = 0.8, tau = 0.59) 
#> 1,4  Gaussian (par = 0.9, tau = 0.71) 
#> 1,3  Gaussian (par = 0.5, tau = 0.33) 
#> 1,2  Gaussian (par = 0.8, tau = 0.59) 
#> 
#> Tree 2:
#> 1,5;2  Gaussian (par = 0.5, tau = 0.33) 
#> 2,4;1  Gaussian (par = 0.6, tau = 0.41) 
#> 2,3;1  Gaussian (par = 0.7, tau = 0.49) 
#> 
#> Tree 3:
#> 3,5;1,2  Gaussian (par = 0.9, tau = 0.71) 
#> 3,4;2,1  Gaussian (par = 0.1, tau = 0.06) 
#> 
#> Tree 4:
#> 4,5;3,1,2  Gaussian (par = 0.2, tau = 0.13) 
#> 
#> ---
#> 1 <-> V1,   2 <-> V4,   3 <-> V3,   4 <-> V2,   5 <-> V5