<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Statsmodels on Volundarhus</title><link>http://www.volundarhus.com/tags/statsmodels/</link><description>Recent content in Statsmodels on Volundarhus</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 03 May 2026 21:46:31 -0700</lastBuildDate><atom:link href="http://www.volundarhus.com/tags/statsmodels/index.xml" rel="self" type="application/rss+xml"/><item><title>Introducing smmargins: Stata-Style Margins for Python StatsModels</title><link>http://www.volundarhus.com/posts/smmargins_package/</link><pubDate>Sun, 03 May 2026 21:46:31 -0700</pubDate><guid>http://www.volundarhus.com/posts/smmargins_package/</guid><description>A new Python package bringing Stata&amp;rsquo;s margins command to the StatsModels ecosystem.</description></item><item><title>Marginal Effects for StatsModels: A Stata-style `margins` in Python</title><link>http://www.volundarhus.com/posts/smmargins/</link><pubDate>Wed, 22 Apr 2026 00:00:00 +0000</pubDate><guid>http://www.volundarhus.com/posts/smmargins/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;Archived.&lt;/strong&gt; The module described here grew into the &lt;strong&gt;smmargins&lt;/strong&gt;&#10;package, which has since been superseded by &lt;strong&gt;pymargins&lt;/strong&gt;, a&#10;ground-up redesign with JAX-native autodiff, a κ curvature diagnostic,&#10;unified delta/simulation/bootstrap inference, and many more model&#10;backends. The write-up below is kept for the math and design notes,&#10;but new development happens on pymargins. See &lt;a href="http://www.volundarhus.com/posts/pymargins_package/" &gt;pymargins: A Ground-Up&#10;Redesign of Marginal Effects for Python&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;If you&amp;rsquo;ve ever moved from Stata to Python and reached for &lt;code&gt;margins, dydx(*) at(age=(25 45 65))&lt;/code&gt;, you know the feeling. StatsModels has &lt;code&gt;get_margeff&lt;/code&gt;, but it&amp;rsquo;s narrow: average or at-means, continuous variables, a couple of model classes. The moment you want a marginal effect &lt;em&gt;at a specific covariate profile&lt;/em&gt;, or a discrete change for a factor, or a difference-in-differences on the probability scale of a logit, you&amp;rsquo;re on your own.&lt;/p&gt;</description></item></channel></rss>