dagFromFormula <- createAbnDag(dag = ~a+b|a,
data.df = data.frame("a"=1, "b"=1),
data.dists = list(a="binomial", b="gaussian"))
dagFromMatrix <- createAbnDag(dag = matrix(c(0,1,0,0), 2, 2),
data.df = data.frame("a"=1, "b"=1),
data.dists = list(a="binomial", b="gaussian"))
plot(dagFromMatrix)
Run the code above in your browser using DataLab