<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Statistics on Volundarhus</title><link>http://www.volundarhus.com/tags/statistics/</link><description>Recent content in Statistics on Volundarhus</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 22 Nov 2026 07:45:33 -0800</lastBuildDate><atom:link href="http://www.volundarhus.com/tags/statistics/index.xml" rel="self" type="application/rss+xml"/><item><title>When Monster Stats Interact: Modeling 4e and 5e on Their Own Terms</title><link>http://www.volundarhus.com/posts/monster_modeling/</link><pubDate>Sun, 22 Nov 2026 07:45:33 -0800</pubDate><guid>http://www.volundarhus.com/posts/monster_modeling/</guid><description>&lt;h2 id="introduction"&gt;&#10; Introduction&#10; &lt;a class="heading-link" href="#introduction"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;The first three posts in this series walked the monster tools from &lt;a href="http://www.volundarhus.com/posts/monster_matching" &gt;parsing and matching&lt;/a&gt;, through &lt;a href="http://www.volundarhus.com/posts/monster_conversion" &gt;cross-edition conversion&lt;/a&gt;, to &lt;a href="http://www.volundarhus.com/posts/monster_scaling" &gt;scaling within an edition&lt;/a&gt;. If you only skimmed the fitted rules, they look almost boring: a counterpart stat, the level or CR, maybe a role adjustment, and an intercept.&lt;/p&gt;&#10;&lt;p&gt;Most of the real work is hiding in the decisions around those short equations. Which stats earn a place in a rule? When does a role need its own slope instead of a flat bonus? Why does a source stat survive in one conversion direction but vanish in the other? And what should the fit do with a monster that&amp;rsquo;s real, official, and nothing like its peers?&lt;/p&gt;</description></item><item><title>Converting D&amp;D Monsters with Formulas a GM Can Actually Use</title><link>http://www.volundarhus.com/posts/monster_conversion/</link><pubDate>Fri, 20 Nov 2026 22:25:18 -0800</pubDate><guid>http://www.volundarhus.com/posts/monster_conversion/</guid><description>&lt;h2 id="introduction"&gt;&#10; Introduction&#10; &lt;a class="heading-link" href="#introduction"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;In the &lt;a href="http://www.volundarhus.com/posts/monster_matching" &gt;previous post&lt;/a&gt;, I built a dataset of matched monsters from the 4e and 5e Monster Manuals. Now for the obvious question: given a monster from one edition, what should its numbers look like in the other?&lt;/p&gt;&#10;&lt;p&gt;The naive answer is to fit the most flexible model available and let it spit out a stat block. But that misses what I actually want at the table. I don&amp;rsquo;t just need a number; I need a starting point I can understand, question, and adjust.&lt;/p&gt;</description></item><item><title>Diagnostic Reversion in Dementia Care: A Real-World Analysis of Mild Cognitive Impairment Diagnoses After Dementia in a Large Electronic Medical Record System</title><link>http://www.volundarhus.com/posts/dementia_reversion/</link><pubDate>Sun, 01 Nov 2026 09:00:00 -0700</pubDate><guid>http://www.volundarhus.com/posts/dementia_reversion/</guid><description>&lt;a class="app-demo" href="https://doi.org/10.1002/dad2.70523" target="_blank" rel="noopener"&gt;&#10; &#10; &lt;i class="fa-solid fa-file-lines app-demo-icon" aria-hidden="true"&gt;&lt;/i&gt;&#10; &#10; &lt;span class="app-demo-text"&gt;&#10; &lt;strong&gt;Read the full paper&lt;/strong&gt;&#10; &lt;span&gt;Published in Alzheimer&amp;#39;s &amp;amp; Dementia: Diagnosis, Assessment &amp;amp; Disease Monitoring&lt;/span&gt;&#10; &lt;/span&gt;&#10; &lt;i class="fa-solid fa-arrow-up-right-from-square" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;(opens in a new tab)&lt;/span&gt;&#10;&lt;/a&gt;&#10;&#10;&lt;h2 id="why-look-at-diagnostic-reversion"&gt;&#10; Why Look at “Diagnostic Reversion”?&#10; &lt;a class="heading-link" href="#why-look-at-diagnostic-reversion"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Mild cognitive impairment (MCI) is usually framed as a precursor to dementia. So when an electronic health record (EHR) shows dementia first and MCI later, the diagnostic trajectory deserves attention. The original dementia diagnosis may have been premature, the later MCI diagnosis may be incorrect, or the patient&amp;rsquo;s presentation may genuinely fluctuate near the boundary between the two categories.&lt;/p&gt;</description></item><item><title>pymargins: A Ground-Up Redesign of Marginal Effects for Python</title><link>http://www.volundarhus.com/posts/pymargins_package/</link><pubDate>Sun, 31 May 2026 00:00:00 +0000</pubDate><guid>http://www.volundarhus.com/posts/pymargins_package/</guid><description>&lt;p&gt;A while back I wrote about &lt;a href="http://www.volundarhus.com/posts/smmargins/" &gt;marginal effects for StatsModels&lt;/a&gt;&#10;and then &lt;a href="http://www.volundarhus.com/posts/smmargins_package/" &gt;released that work as &lt;strong&gt;smmargins&lt;/strong&gt;&lt;/a&gt;,&#10;a package that brought Stata-style &lt;code&gt;margins&lt;/code&gt; to the StatsModels&#10;ecosystem. This post is about its successor, &lt;strong&gt;pymargins&lt;/strong&gt;, which is&#10;not a new version of smmargins but a complete, ground-up redesign.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pip install pymargins&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="where-this-came-from"&gt;&#10; Where this came from&#10; &lt;a class="heading-link" href="#where-this-came-from"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;smmargins started as research code. I was doing population-study work&#10;at UCSF, and the recurring need was to turn fitted models into&#10;quantities people could actually act on: a risk difference in&#10;percentage points, an adjusted prediction at a representative patient&#10;profile, a subgroup average marginal effect. StatsModels'&#10;&lt;code&gt;get_margeff()&lt;/code&gt; covered a sliver of that, so I kept accreting helpers&#10;until the helpers were the size of a package. smmargins was me carving&#10;the useful parts out of that research code and giving them a public&#10;API.&lt;/p&gt;</description></item><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>