Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

canonicalize

Canonicalize an Ancestral Graph


Description

Takes an input ancestral graph (a graph with directed, bidirected and undirected edges) and converts it to a DAG by replacing every bidirected edge x <-> y with a substructure x <- L -> y, where L is a latent variable, and every undirected edge x – y with a substructure x -> S <- y, where S is a selection variable. This function does not check whether the input is actually an ancestral graph.

Usage

canonicalize(x)

Arguments

x

the input graph, a DAG or MAG.

Value

A list containing the following components:

  • gThe resulting graph.

  • LNames of newly inserted latent variables.

  • SNames of newly inserted selection variables.

Examples

canonicalize("mag{x<->y--z}") # introduces two new variables

dagitty

Graphical Analysis of Structural Causal Models

v0.3-1
GPL-2
Authors
Johannes Textor, Benito van der Zander, Ankur Ankan
Initial release
2021-01-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.