graphs: Utilities to manipulate graphs

Description Usage Arguments Value Author(s) References Examples

Description

Manipulate directed acyclic graph of an object of class bayesvl.

Usage

1
2
3
4
5
6
7
8
9
# added a new node to the graph.
bvl_addNode(dag, name, dist = "norm", priors = NULL, fun = NULL, out_type = NULL, 
  lower = NULL, upper=NULL, test = NULL)

# added a new path between nodes to the graph.
bvl_addArc(dag, from, to, type = "slope", priors = NULL, fun = NULL)

# added a new path between nodes to the graph.
bvl_addArc(dag, from, to, type = "slope", priors = NULL, fun = NULL)

Arguments

dag

an object of class bayesvl

name

a character string, the name of a node.

dist

a character string, distribution code of the node (norm, binom).

priors

a vector of string, the priors of the node or path.

fun

a character string, the transform function of the node.

out_type

a character string, the variable data type (int, real, ...).

lower

integer or real, the lower bound of variable data type (int or real).

upper

integer or real, the upper bound of variable data type (int or real).

test

a vector of testing values for variable.

from

a character string, the name of node the path connect from.

to

a character string, the name of node the path connect to.

type

a character string, the path type between nodes (slope, varint, ...).

Value

bvl_addNode(), bvl_addArc() return object class bayesvl.

Author(s)

La Viet-Phuong, Vuong Quan-Hoang

References

For documentation, case studies and worked examples, and other tutorial information visit the References section on our Github:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
dag = bayesvl()

# add nodes to dag
dag = bvl_addNode(dag, "node1")
dag = bvl_addNode(dag, "node2")

# add the path between two nodes
dag = bvl_addArc(dag, "node1", "node2")

summary(dag)

bayesvl documentation built on May 24, 2019, 5:09 p.m.

Related to graphs in bayesvl...