get_DAG: get_DAG

View source: R/get_DAG.R

get_DAGR Documentation

get_DAG

Description

This function is used to construct the induced DAG, induced polyforest and reverse topological orderings thereof from a numeric matrix X0. See Definition 2 in \insertCiteMRCS2023;textualISS.

Usage

get_DAG(X0, sparse = FALSE, twoway = FALSE)

Arguments

X0

a numeric matrix.

sparse

logical. Either the induced DAG (FALSE) or the induced polyforest (TRUE) is constructed.

twoway

logical. If FALSE, only leaves, parents, ancestors and reverse topological ordering are returned. If TRUE, then roots, children and descendants are also provided.

Value

A list with named elements giving the leaves, parents, ancestors and reverse topological ordering and additionally, if twoway == TRUE, the roots, children and descendants, of the constructed graph.

References

\insertRef

MRCS2023ISS

Examples

X <- rbind(
  c(0.2, 0.8), c(0.2, 0.8), c(0.1, 0.7),
  c(0.2, 0.1), c(0.3, 0.5), c(0.3, 0)
)
get_DAG(X0 = X)
get_DAG(X0 = X, sparse = TRUE, twoway = TRUE)


ISS documentation built on July 9, 2023, 5:13 p.m.

Related to get_DAG in ISS...