## The data is one realisation from the the underlying DAG:
ex1.true.dag <- matrix(data=c(
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
1,1,0,0,0,0,0,0,0,0,
1,0,1,1,0,0,0,0,0,0,
0,1,1,1,0,0,0,0,0,0,
0,0,1,0,1,0,0,0,0,0,
0,0,1,0,0,0,1,0,0,0,
0,0,1,1,0,0,0,0,0,0), ncol=10, byrow=TRUE)
colnames(ex1.true.dag) <- rownames(ex1.true.dag) <-
c("b1","p1","g1","b2","p2","b3","g2","b4","b5","g3")
Run the code above in your browser using DataLab