
Posterior distribution of a backdoor-adjusted direct effect
Source:R/causal_posterior.R
causal_effect_posterior.RdUnified v1.6.0 entry point for Pillar 1. Returns an
edaphos_posterior() with posterior draws over the identified
direct effect, ready for uncertainty_calibrate() and
ggplot2::autoplot(). For the LM estimator the draws are a
cluster-block bootstrap; for BART the draws are the native Markov-
chain posterior.
Arguments
- data
A data frame.
- dag
A
dagittyDAG (required whenadjustment = NULL).- exposure, outcome
Character; column names.
- adjustment
Optional character vector of adjustment-set columns; derived from the DAG if
NULL.- estimator
"lm"or"bart".- cluster, B, seed
See
causal_effect_bootstrap(); only used for the LM estimator.- bart_kwargs
Named list of extra arguments forwarded to
dbarts::bart()whenestimator = "bart".- delta
Numeric; counterfactual increment for the BART estimator (defaults to
IQR(exposure) / 2).- units
Optional character; free-text tag passed through to the
edaphos_posterior.