Learn R Programming

midoc (version 1.0.0)

exploreDAG: Compares data with proposed DAG

Description

Explore whether relationships between fully observed variables in the specified dataset are consistent with the proposed directed acyclic graph (DAG) using localTests functionality.

Usage

exploreDAG(mdag, data)

Value

A message indicating whether the relationships between fully observed variables in the specified dataset are consistent with the proposed DAG

Arguments

mdag

The DAG, specified as a string using dagitty syntax

data

A data frame containing all the variables stated in the DAG. All ordinal variables must be integer-coded and all categorical variables must be dummy-coded.

Examples

Run this code
exploreDAG(mdag="matage -> bmi7 mated -> matage mated -> bmi7
                 sep_unmeas -> mated sep_unmeas -> r",
           data=bmi)

Run the code above in your browser using DataLab