This function runs a Bayesian sensitivity analysis for causal inference using JAGS or Stan as a backend. For now, only JAGS is supported.
bayesian_causens(
trt_model,
outcome_model,
U_model,
data,
beta_uy = ~dunif(-2, 2),
alpha_uz = ~dunif(-2, 2),
backend = "jags",
output_trace = FALSE,
...
)A list of posterior samples for the causal effect of the exposure variable on the outcome, as well as the confounder-adjusted causal effect.
The treatment model object as a formula.
The outcome model object as a formula.
The unmeasured confounder model object as a formula.
A data frame containing the exposure, outcome, and confounder variables.
Prior distribution for the effect of the missing confounder U on the outcome Y.
Prior distribution for the effect of the missing confounder U on the treatment assignment mechanism Z.
The backend to use for the sensitivity analysis. Currently only "jags" is supported.
Whether to output the full trace of the MCMC sampler.
Additional arguments to be passed to the backend.