Markov equivalence of maximal ancestral graphs
MarkEqMag
determines whether two MAGs are Markov equivalent.
MarkEqMag(amat, bmat)
amat |
An adjacency matrix of a MAG, or a graph that can be a |
bmat |
The same as |
The function checks whether the two graphs have the same skeleton and colliders with order.
"Markov Equivalent" or "NOT Markov Equivalent".
Kayvan Sadeghi
Ali, R.A., Richardson, T.S. and Spirtes, P. (2009) Markov equivalence for ancestral graphs. Annals of Statistics, 37(5B),2808-2837.
H1<-matrix( c(0,100, 0, 0, 100, 0,100, 0, 0,100, 0,100, 0, 1,100, 0), 4, 4) H2<-matrix(c(0,0,0,0,1,0,100,0,0,100,0,100,0,1,100,0),4,4) H3<-matrix(c(0,0,0,0,1,0,0,0,0,1,0,100,0,1,100,0),4,4) MarkEqMag(H1,H2) MarkEqMag(H1,H3) MarkEqMag(H2,H3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.