Description Usage Arguments Details Value Author(s) References See Also Examples
This function tests for dseparation of nodes in a DAG.
1 
a 
Label (sic!) of node A 
b 
Label (sic!) of node B 
S 
Labels (sic!) of set of nodes on which it is conditioned, maybe empty 
g 
The Directed Acyclic Graph (object of 
john.pairs 
The shortest path distance matrix for all pairs of
nodes as computed (also by default) in

This function checks separation in the moralized graph as explained in Lauritzen (2004).
TRUE if a and b are dseparated by S in G, otherwise FALSE.
Markus Kalisch ([email protected])
S.L. Lauritzen (2004), Graphical Models, Oxford University Press, Chapter 3.2.2
dsepTest
for a wrapper of this function that can
easily be included into skeleton
, pc
or
fci
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  ## generate random DAG
p < 8
set.seed(45)
myDAG < randomDAG(p, prob = 0.3)
if (require(Rgraphviz)) {
plot(myDAG)
}
## Examples for dseparation
dsep("1","7",NULL,myDAG)
dsep("4","5",NULL,myDAG)
dsep("4","5","2",myDAG)
dsep("4","5",c("2","3"),myDAG)
## Examples for dconnection
dsep("1","3",NULL,myDAG)
dsep("1","6","3",myDAG)
dsep("4","5","8",myDAG)

Loading required package: Rgraphviz
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit, which, which.max, which.min
Loading required package: grid
[1] TRUE
[1] TRUE
Warning message:
In bfs(object, node, TRUE) :
graph is not connected; returning bfs applied to each connected component
[1] TRUE
[1] TRUE
[1] FALSE
[1] FALSE
[1] FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.