twoLevelGraph: Create an edge list with a random two level connectivity

Description Usage Arguments Value See Also Examples

View source: R/generate.R

Description

Initially, edges are added from the first vertex to all the other vertices. Thereafter, the first vertex is drawn from a Beta(shape1, 1.0) distribution and the second vertex is drawn from a Beta(shape2, 1.0) distribution. The idea is that the edges will tend to connect a small subset of vertices from the top of the tree to leaf vertices. These vertex connections are similar to the pairs that you might observe in an elimination tournament. The selected vertices are sorted so it doesn't matter whether shape1 > shape2 or shape1 < shape2.

Usage

1
twoLevelGraph(name, N, shape1 = 0.8, shape2 = 0.5)

Arguments

name

vector of vertex names

N

number of comparisons

shape1

beta distribution parameter for first edge

shape2

beta distribution parameter for second edge

Value

An undirected graph represented as a data frame with each row describing an edge.

See Also

Other graph generators: roundRobinGraph()

Examples

1

pcFactorStan documentation built on Sept. 25, 2021, 5:06 p.m.