|
22 | 22 | >>> sp.outreg2(result, filename="results.xlsx") |
23 | 23 | """ |
24 | 24 |
|
25 | | -__version__ = "0.9.16" |
| 25 | +__version__ = "0.9.17" |
26 | 26 | __author__ = "Biaoyue Wang" |
27 | 27 | __email__ = "brycew6m@stanford.edu" |
28 | 28 |
|
|
81 | 81 | OptimalMatchResult, CardinalityMatchResult, |
82 | 82 | overlap_weights, cbps, |
83 | 83 | genmatch, GenMatchResult, |
| 84 | + sbw, SBWResult, |
84 | 85 | ) |
85 | 86 | from .dml import dml, DoubleML, DoubleMLPLR, DoubleMLIRM, DoubleMLPLIV, DoubleMLIIVM |
86 | 87 | from .deepiv import deepiv, DeepIV |
|
99 | 100 | from .output.regression_table import regtable, RegtableResult, mean_comparison, MeanComparisonResult |
100 | 101 | from .output.paper_tables import paper_tables, PaperTables, TEMPLATES as PAPER_TABLE_TEMPLATES |
101 | 102 | from .postestimation import margins, marginsplot, margins_at, margins_at_plot, contrast, pwcompare, test, lincom |
102 | | -from .diagnostics import oster_bounds, mccrary_test, diagnose, het_test, reset_test, vif, sensemakr, rddensity, hausman_test, anderson_rubin_test, effective_f_test, tF_critical_value, evalue, evalue_from_result, diagnose_result, estat, kitagawa_test, KitagawaResult, rosenbaum_bounds, rosenbaum_gamma, RosenbaumResult |
| 103 | +from .diagnostics import oster_bounds, mccrary_test, diagnose, het_test, reset_test, vif, sensemakr, rddensity, hausman_test, anderson_rubin_test, effective_f_test, tF_critical_value, evalue, evalue_from_result, diagnose_result, estat, kitagawa_test, KitagawaResult, rosenbaum_bounds, rosenbaum_gamma, RosenbaumResult, weakrobust, WeakRobustResult |
103 | 104 | from .inference import ( |
104 | 105 | wild_cluster_bootstrap, aipw, ri_test, ipw, bootstrap, BootstrapResult, |
105 | 106 | twoway_cluster, conley, pate, PATEEstimator, fisher_exact, FisherResult, |
|
206 | 207 | # === Parametric g-formula (iterative conditional expectation) === |
207 | 208 | from . import gformula |
208 | 209 | from .gformula import ice as gformula_ice_fn, ICEResult |
| 210 | +from .gformula import gformula_mc, MCGFormulaResult |
209 | 211 |
|
210 | 212 | # === Target Trial Emulation (JAMA 2022 framework) === |
211 | 213 | from . import target_trial |
| 214 | +from . import target_trial as tte # short alias |
212 | 215 | from .target_trial import ( |
213 | 216 | protocol as target_trial_protocol, |
214 | 217 | emulate as target_trial_emulate, |
| 218 | + to_paper as target_trial_report, |
215 | 219 | clone_censor_weight, |
216 | 220 | immortal_time_check, |
217 | 221 | TargetTrialProtocol, |
|
222 | 226 | from . import censoring |
223 | 227 | from .censoring import ipcw, IPCWResult |
224 | 228 |
|
| 229 | +# === Epidemiology primitives (OR / RR / MH / standardization / BH) === |
| 230 | +from . import epi |
| 231 | +from .epi import ( |
| 232 | + odds_ratio, relative_risk, risk_difference, attributable_risk, |
| 233 | + incidence_rate_ratio, number_needed_to_treat, prevalence_ratio, |
| 234 | + mantel_haenszel, breslow_day_test, |
| 235 | + direct_standardize, indirect_standardize, |
| 236 | + bradford_hill, |
| 237 | +) |
| 238 | + |
| 239 | +# === Longitudinal causal inference (What If Layer 4) === |
| 240 | +from . import longitudinal |
| 241 | +from .longitudinal import ( |
| 242 | + analyze as longitudinal_analyze, |
| 243 | + contrast as longitudinal_contrast, |
| 244 | + regime, always_treat, never_treat, |
| 245 | + LongitudinalResult, Regime, |
| 246 | +) |
| 247 | + |
| 248 | +# === Causal-question DSL (estimand-first workflow) === |
| 249 | +from . import question |
| 250 | +from .question import ( |
| 251 | + causal_question, CausalQuestion, |
| 252 | + IdentificationPlan, EstimationResult, |
| 253 | +) |
| 254 | + |
| 255 | +# === Unified sensitivity dashboard === |
| 256 | +from .robustness import ( |
| 257 | + unified_sensitivity, SensitivityDashboard, |
| 258 | +) |
| 259 | + |
225 | 260 | # === Canonical datasets (consolidated facade) === |
226 | 261 | from . import datasets |
227 | 262 |
|
|
305 | 340 | # Missing Data / Imputation |
306 | 341 | from .imputation import mice, MICEResult, mi_estimate |
307 | 342 | # Mendelian Randomization |
308 | | -from .mendelian import mendelian_randomization, MRResult, mr_egger, mr_ivw, mr_median |
| 343 | +from . import mendelian |
| 344 | +from . import mendelian as mr # short alias |
| 345 | +from .mendelian import ( |
| 346 | + mendelian_randomization, MRResult, |
| 347 | + mr_egger, mr_ivw, mr_median, |
| 348 | + mr_heterogeneity, mr_pleiotropy_egger, mr_leave_one_out, |
| 349 | + mr_steiger, mr_presso, mr_radial, |
| 350 | + HeterogeneityResult, PleiotropyResult, LeaveOneOutResult, |
| 351 | + SteigerResult, MRPressoResult, RadialResult, |
| 352 | +) |
| 353 | +# Expose recommend_estimator at top level too |
| 354 | +from .dag import recommend_estimator as dag_recommend_estimator |
309 | 355 | # Multi-cutoff / Geographic RD |
310 | 356 | from .rd import rdmc, rdms, RDMultiResult |
311 | 357 | # 2D Boundary RD (Cattaneo, Titiunik, Yu 2025) |
|
526 | 572 | # Matching extensions |
527 | 573 | "overlap_weights", |
528 | 574 | "cbps", |
| 575 | + "sbw", |
| 576 | + "SBWResult", |
| 577 | + "genmatch", |
| 578 | + "GenMatchResult", |
529 | 579 | # Inference primitives |
530 | 580 | "subcluster_wild_bootstrap", |
531 | 581 | "wild_cluster_ci_inv", |
|
618 | 668 | "anderson_rubin_test", |
619 | 669 | "effective_f_test", |
620 | 670 | "tF_critical_value", |
| 671 | + "weakrobust", |
| 672 | + "WeakRobustResult", |
621 | 673 | "evalue", |
622 | 674 | "evalue_from_result", |
623 | 675 | "diagnose_result", |
|
974 | 1026 | "swig", "SWIGGraph", "SCM", |
975 | 1027 | "cevae", "CEVAE", "CEVAEResult", |
976 | 1028 | "TargetTrialProtocol", "TargetTrialResult", "CloneCensorWeightResult", |
977 | | - "target_trial_protocol", "target_trial_emulate", |
978 | | - "clone_censor_weight", "immortal_time_check", |
| 1029 | + "target_trial_protocol", "target_trial_emulate", "target_trial_report", |
| 1030 | + "clone_censor_weight", "immortal_time_check", "tte", |
979 | 1031 | "TransportWeightResult", "TransportIdentificationResult", |
980 | 1032 | "transport_generalize", "transport_weights_fn", "identify_transport", |
981 | 1033 | "OPEResult", |
982 | 1034 | "gformula_ice_fn", "ICEResult", |
| 1035 | + "gformula_mc", "MCGFormulaResult", |
| 1036 | + # v0.9.17 additions (epi primitives) |
| 1037 | + "epi", "odds_ratio", "relative_risk", "risk_difference", |
| 1038 | + "attributable_risk", "incidence_rate_ratio", |
| 1039 | + "number_needed_to_treat", "prevalence_ratio", |
| 1040 | + "mantel_haenszel", "breslow_day_test", |
| 1041 | + "direct_standardize", "indirect_standardize", "bradford_hill", |
| 1042 | + # v0.9.17 additions (MR full suite) |
| 1043 | + "mr", "mendelian", |
| 1044 | + "mr_heterogeneity", "mr_pleiotropy_egger", "mr_leave_one_out", |
| 1045 | + "mr_steiger", "mr_presso", "mr_radial", |
| 1046 | + "HeterogeneityResult", "PleiotropyResult", "LeaveOneOutResult", |
| 1047 | + "SteigerResult", "MRPressoResult", "RadialResult", |
| 1048 | + # v0.9.17 additions (longitudinal unified) |
| 1049 | + "longitudinal", "longitudinal_analyze", "longitudinal_contrast", |
| 1050 | + "regime", "always_treat", "never_treat", |
| 1051 | + "LongitudinalResult", "Regime", |
| 1052 | + # v0.9.17 additions (causal-question DSL) |
| 1053 | + "question", "causal_question", "CausalQuestion", |
| 1054 | + "IdentificationPlan", "EstimationResult", |
| 1055 | + # v0.9.17 additions (unified sensitivity) |
| 1056 | + "unified_sensitivity", "SensitivityDashboard", |
| 1057 | + # v0.9.17 additions (DAG UX) |
| 1058 | + "dag_recommend_estimator", |
983 | 1059 | ] |
984 | 1060 |
|
985 | 1061 |
|
|
0 commit comments