isADMG | R Documentation |
Check if it is an adjacency matrix of an ADMG
isADMG(amat)
amat |
An adjacency matrix. |
Checks if the following conditions must hold: (i) no undirected edge meets an arrowhead; (ii) no directed cycles;
A logical value, TRUE
if it is an ancestral graph and FALSE
otherwise.
Giovanni M. Marchetti, Mathias Drton
Richardson, T. S. and Spirtes, P. (2002). Ancestral Graph Markov Models. Annals of Statistics, 30(4), 962–1030.
makeMG
, isADMG
## Examples from Richardson and Spirtes (2002)
a1 <- makeMG(dg=DAG(a~b, b~d, d~c), bg=UG(~a*c))
isADMG(a1) # Not an AG. (a2) p.969
a2 <- makeMG(dg=DAG(b ~ a, d~c), bg=UG(~a*c+c*b+b*d)) # Fig. 3 (b1) p.969
isADMG(a2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.