vineOrder: Select an Order of the Variables

Description Usage Arguments Details Value References Examples

View source: R/vineOrder.R


Select an order of the variables. The order of the variables determines the bivariate dependencies that will be explicit modeled in the first tree of the vine.


vineOrder(type, data, method = "greedy", ...)



Type of vine. Supported values: "CVine" and "DVine".


Data matrix of pseudo-observations.


Ordering method. Supported values: "random", "greedy".


Additional arguments for the order method.


In D-vines, the order of the variables determines the structure of all the trees of the vine. This is not the case for C-vines where the root node of each tree can be selected.

The "random" method returns a random permutation of the variables.

The "greedy" method returns an order of the variables that intends to capture as much dependence as possible in the first tree of the vine. The method finds the order of the variables that defines a tree that maximizes a given dependence measure used as edge weights. For C-vines, it is determined iteratively checking each variable as root node. For D-vines, it is equivalent to solve the traveling salesman problem (TSP), see (Brechmann, 2010) for details. The TSP is solved using the cheapest insertion algorithm implemented by the solve_TSP function of the TSP package. The following are additional parameters for this method.


Dependence measure. The default value is "kendall" and supported values are:


Absolute value of Kendall's tau.


Absolute value of Spearman's rho.


Absolute value of Pearson's product moment correlation coefficient.


Smaller degrees of freedom of a bivariate t copula.


A vector with the ordered indexes of the variables. This vector should be used to reorder the variables of the data matrix.


Brechmann, E. C. (2010) Truncated and simplified regular vines and their applications. Diploma thesis. Technische Universitaet Muenchen.


data <- matrix(runif(5 * 100), ncol = 5, nrow = 500)

vineOrder("CVine", data, method = "random")
vineOrder("DVine", data, method = "greedy",
          according = "spearman")

Example output

Loading required package: copula
[1] 3 2 5 1 4
[1] 2 1 3 5 4

vines documentation built on May 29, 2017, 6:53 p.m.