Learn R Programming

vines (version 1.1.5)

vineOrder: Select an Order of the Variables

Description

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.

Usage

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

Arguments

type
Type of vine. Supported values: "CVine" and "DVine".
data
Data matrix of pseudo-observations.
method
Ordering method. Supported values: "random", "greedy".
...
Additional arguments for the order method.

Value

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

Details

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.

References

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

Examples

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

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

Run the code above in your browser using DataLab