brute.search: Evaluate all possible adjustment sets of a DAG.

View source: R/brute.search.R

brute.searchR Documentation

Evaluate all possible adjustment sets of a DAG.

Description

Evaluates all adjustment sets of a DAG, optionally including adjustment sets including "unknown" nodes. If the DAG has a non-empty adjustment set, only adjustment sets including these adjustment variables are evaluated.

Usage

brute.search(dag, allow.unknown = FALSE, trace = TRUE, stop = 0)

Arguments

dag

The DAG to be evaluated.

allow.unknown

Boolean indicating "unknown" nodes should be featured in the adjustment sets to be evaluated (TRUE) or not (FALSE=default).

trace

Boolean indicating if some output should be produced (TRUE=default).

stop

If =0, all eligible adjustment sets are evaluated. If =1, evaluations are stopped after the first sufficient adjustment set has been evaluated. Defaults to 0.

Value

A dataframe with the first columns (X1..Xn) indicating the variables in the respective adjustment set evaluated. The column totalPaths indicates the number of paths found when adjusting for the respective set, and openPaths indicates the number of biasing paths.

Note

The output produced by brute.search allows to manually identify sufficient and minimal sufficient adjustment sets, which in the future should preferably be done by a helper summary function. The evaluation of a complicated DAG like demo.dag2 can take quite some time, and future functions should either employ more intelligent algorithms to search specifically for sufficient sets, or they should allow e.g. the evaluation of adjustment sets of specific sizes.

Author(s)

Lutz P Breitling <l.breitling@posteo.de>


dagR documentation built on Oct. 9, 2022, 5:06 p.m.