SEMdag function

Estimate a DAG from an input (or empty) graph