pag <- cgraph(A %o-o% B, B %o-o% C, class = "PAG")
length(enumerate_mags(pag))
#> [1] 8
length(enumerate_mags(pag, selection_bias = FALSE))
#> [1] 5

Enumerate MAGs in a PAG equivalence class
Source: R/identification.R, R/jlbind-wrappers.R
Description
Enumerates all Markov equivalent MAGs in the equivalence class represented by a PAG (Partial Ancestral Graph). Each circle endpoint of the PAG is independently resolved to a tail or an arrowhead, keeping only assignments that validate as a MAG and map back to the same PAG under mag_to_pag(). For a single representative instead of the whole class, use mag_from_pag().
Usage
enumerate_mags(cg, selection_bias = TRUE)Arguments
cg
|
A PAG (partially ancestral graph) created with cgraph().
|
selection_bias
|
If FALSE, return only the MAGs without undirected edges (i.e. without selection bias), pruning the others from the search.
|
Value
A list of cgraphs (MAGs) in the equivalence class.