Description Usage Arguments Details References Examples

Enumerates sets of covariates that (asymptotically) allow unbiased estimation of causal effects from observational data, assuming that the input causal graph is correct.

1 2 3 4 5 6 7 8 |

`x` |
the input graph, a DAG, MAG, PDAG, or PAG. |

`exposure` |
name(s) of the exposure variable(s). If not given (default), then the exposure variables are supposed to be defined in the graph itself. |

`outcome` |
name(s) of the outcome variable(s), also taken from the graph if not given. |

`type` |
which type of adjustment set(s) to compute. If |

`effect` |
which effect is to be identified. If |

`max.results` |
integer. The listing of adjustment set is stopped once
this many results have been found. Use |

If the input graph is a MAG or PAG, then it must not contain any undirected edges (=hidden selection variables).

J. Pearl (2009), Causality: Models, Reasoning and Inference. Cambridge University Press.

B. van der Zander, M. Liskiewicz and J. Textor (2014),
Constructing separators and adjustment sets in ancestral graphs.
In *Proceedings of UAI 2014.*

E. Perkovic, J. Textor, M. Kalisch and M. H. Maathuis (2015), A
Complete Generalized Adjustment Criterion. In *Proceedings of UAI
2015.*

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
# The M-bias graph showing that adjustment for
# pre-treatment covariates is not always valid
g <- dagitty( "dag{ x -> y ; x <-> m <-> y }" )
adjustmentSets( g, "x", "y" ) # empty set
# Generate data where true effect (=path coefficient) is .5
set.seed( 123 ); d <- simulateSEM( g, .5, .5 )
confint( lm( y ~ x, d ) )["x",] # includes .5
confint( lm( y ~ x + m, d ) )["x",] # does not include .5
# Adjustment sets can also sometimes be computed for graphs in which not all
# edge directions are known
g <- dagitty("pdag { x[e] y[o] a -- {i z b}; {a z i} -> x -> y <- {z b} }")
adjustmentSets( g )
``` |

```
{}
2.5 % 97.5 %
0.3395788 0.4878467
2.5 % 97.5 %
0.05729992 0.19069899
{ b, z }
{ a, z }
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.