Learn R Programming

BiDAG (version 2.0.0)

plotDBN: Plotting a DBN

Description

This function can be used for plotting initial and transition structures of a dynamic Bayesian network.

Usage

plotDBN(DBN, struct = c("init", "trans"), n.dynamic, n.static)

Arguments

DBN

binary matrix (or a graph object) representing a 2-step DBN (compact or unrolled)

struct

option used to determine if the initial or the transition structure should be plotted; accaptable values are init or trans

n.dynamic

number of dynamic variables in one time slice of a DBN

n.static

number of static variables in one time slice of a DBN; note that for function to work correctly all static variables have to be in the first n.static columns of the matrix

Examples

Run this code
# NOT RUN {
plotDBN(DBNmat, "init", n.dynamic=12,n.static=3)
plotDBN(DBNmat, "trans", n.dynamic=12,n.static=3)

# }

Run the code above in your browser using DataLab