Learn R Programming

dagitty (version 0.3-4)

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)

Value

A list containing the following components:

g

The resulting graph.

L

Names of newly inserted latent variables.

S

Names of newly inserted selection variables.

Arguments

x

the input graph, a DAG or MAG.

Examples

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

Run the code above in your browser using DataLab