smmargins¶

Stata-style margins for StatsModels: adjusted predictions, marginal effects, elasticities, and difference-in-differences with delta-method standard errors — for any fitted model that exposes params, cov_params(), and predict(params, exog).

User guide

  • Introduction
    • Why another margins module?
    • Multi-outcome models
    • Difference-in-differences
    • Installation
    • Quickstart
    • Why patsy
    • Formula vs. raw exog mode
    • Where to next
  • Mathematical motivation
    • The delta method
    • A single statistic schema
    • Marginal effects of a single variable
    • Elasticities
    • Outer Jacobian: analytic vs. finite differences
    • Why the response scale matters for DiD (Ai & Norton 2003)
    • References
  • Demos
    • Williams-style logit walkthrough
    • Healthcare-style 2x2 difference-in-differences

Reference

  • API reference
    • smmargins.Margins
    • smmargins.MarginsResult
    • smmargins.DiDResult
    • smmargins.utils._central_jacobian

Indices¶

  • Index

  • Module Index

  • Search Page

smmargins

Navigation

User guide

  • Introduction
  • Mathematical motivation
  • Demos

Reference

  • API reference

Related Topics

  • Documentation overview
    • Next: Introduction
©2026. | Powered by Sphinx 9.1.0 & Alabaster 1.0.0 | Page source