toMAG: Convert DAG to MAG.

Description Usage Arguments Examples

View source: R/dagitty.r

Description

Given a DAG, possibly with latent variables, construct a MAG that represents its marginal independence model.

Usage

1
toMAG(x)

Arguments

x

the input graph, a DAG

Examples

1
2
3
toMAG( "dag { ParentalSmoking->Smoking 
  { Profession [latent] } -> {Income->Smoking}
  Genotype -> {Smoking->LungCancer} }")

Example output

mag {
Genotype
Income
LungCancer
ParentalSmoking
Smoking
Genotype -> LungCancer
Genotype -> Smoking
Income -> Smoking
ParentalSmoking -> Smoking
Smoking -> LungCancer
}

dagitty documentation built on Jan. 21, 2021, 5:07 p.m.