Skip to content

API Reference — Overview

StatsPAI exposes 1,031 registered public functions under a single import statspai as sp namespace. Reference pages are grouped by methodological area:

Area Page Flagship functions
Difference-in-differences did callaway_santanna, aggte, sun_abraham, bjs, dcdh, etwfe, cs_report, honest_did, breakdown_m
Instrumental variables iv iv, ivreg, iv_diag, iv_compare, kernel_iv, continuous_iv_late, ivdml, npiv, mte
Matching / balancing matching match, ebalance, cbps, genmatch, sbw, overlap_weights, balance_diagnostics, love_plot
Regression discontinuity rd rdrobust, rd2d, rkd, rdit, rdhonest, rdrandinf, rdpower, rd_forest, rdsummary
Synthetic control synth synth, sdid, ascm, bayesian_synth, bsts_synth, penscm, synth_compare, synth_recommend, synth_report
Decomposition decomposition decompose, oaxaca, gelbach, ffl_decompose, dfl_decompose, machado_mata, shapley_inequality, gap_closing
Stochastic frontier frontier frontier, xtfrontier, zisf, lcsf, malmquist, translog_design, te_summary
Multilevel / mixed-effects multilevel mixed, melogit, mepoisson, meglm, megamma, menbreg, meologit, icc, lrtest
Double / debiased ML dml dml (PLR / IRM / PLIV), cross-fitting, influence-function SEs
Causal ML causal causal_forest, s_learnerdr_learner, tmle, tarnet, dragonnet, notears, policy_tree, bcf
Sensitivity sensitivity oster, sensemakr, e_value, rosenbaum_bounds, manski_bounds, spec_curve, robustness_report
Smart workflow smart recommend, compare_estimators, assumption_audit, verify, verify_benchmark
Spatial econometrics spatial spatial_weights, moran_i, geary_c, sar, sem, sdm, gwr, mgwr, spatial_panel, spatial_did
Time series timeseries arima, var, bvar, garch, cointegration, local_projections, structural_break
Survival survival cox, aft, frailty, kaplan_meier, log_rank_test, competing_risks
Agent-native workflows smart detect_design, preflight, audit, examples, session, brief, bib_for

Mature estimator result objects follow the shared reporting contract:

r = sp.someestimator(...)
r.summary()          # text table
r.plot()             # matplotlib figure
r.to_latex()         # LaTeX snippet
r.to_docx()          # Word paragraph
r.cite()             # BibTeX for the method's primary reference
r.to_markdown()      # Markdown table (most results)

Agent-native discovery:

sp.list_functions(category='rd')         # list RD-family methods
sp.describe_function('rdrobust')         # natural-language docstring snippet
sp.function_schema('dml')                # JSON schema of arguments + returns