| Build a model from a spec + data | m = pathmc.model(spec, data=df) |
| Explore the DAG without data | m = pathmc.model(spec) (data-free mode) |
| Inspect causal DAG | m.graph() |
| Inspect structural equations + priors | m.equations() |
| Inspect priors only | m.priors() |
| Refine priors | m.set_priors({"beta_Y": Prior(...)}) |
| Prior predictive check | m.sample_prior_predictive() |
| Run MCMC | m.fit(draws=1000, chains=2) |
| Summarize posteriors | m.summary() or m.effects_summary() |
| Standardized (stdyx) coefficients | m.standardized() |
Path-specific effect (e.g. X -> M -> Y) | m.effect("X -> M -> Y") |
| Posterior predictions | m.predict(...) |
| Average treatment effect | m.ate(outcome, treatment, values=(0, 1)) |
| Conditional ATE (effect modification) | m.cate(outcome, treatment, condition={"Z": z0}) |
| ATE on the treated / untreated | m.att(...) / m.atu(...) |
| Backdoor-adjusted outcome regression | adj = m.adjustment_model("X -> Y") then adj.fit() |
| Inspect adjustment set / formula before fit | adj.adjustment_set, adj.formula (before adj.fit()) |
| Interventional / associational predictions | m.predictions(outcome, set={...}) |
| Interventional contrasts (structural model) | m.comparisons(outcome, variable, contrast=(0, 1)) |
| Marginal slopes under intervention | m.slopes(outcome, variable) |
| Same interpret API on adjustment model | adj.comparisons(...), adj.slopes(...), etc. |
| Probability under intervention | m.prob("Y > 0", set={"X": 1}) |
| Manual intervention | m.do(set={"X": 1}) |
| Counterfactual / time-forward (panel) | m.do(set={...}, kind="time-forward") |
| Adjustment sets for identification | m.adjustment_sets(treatment, outcome) |
| Yes/no identification check | m.is_identifiable(treatment, outcome) |
| Front-door identification | m.frontdoor_identifiable(treatment, outcome) |
| Warn about colliders in an adjustment set | m.collider_warnings(adjust, treatment, outcome) |
| Enumerate implied conditional independences | m.implied_independences() |
| Test DAG implications against data | m.test_implications() |
| Falsify the whole DAG (permutation test) | m.falsify() |
| Sensitivity analysis (unmeasured confounding) | m.sensitivity(outcome, treatment) |
| Placebo refutation of an estimated effect | m.refute_placebo(outcome, treatment) |
| Simulate from a fully-specified model | pathmc.simulate(spec, data, params=...) |