{"id":16068,"date":"2026-10-04T21:06:56","date_gmt":"2026-10-04T20:06:56","guid":{"rendered":"https:\/\/emilkirkegaard.dk\/en\/?p=16068"},"modified":"2026-10-04T21:06:56","modified_gmt":"2026-10-04T20:06:56","slug":"interactions-are-still-not-important-not-in-medical-data-either","status":"publish","type":"post","link":"https:\/\/emilkirkegaard.dk\/en\/2026\/10\/interactions-are-still-not-important-not-in-medical-data-either\/","title":{"rendered":"Interactions are still not important: not in medical data either"},"content":{"rendered":"<p><a href=\"https:\/\/www.emilkirkegaard.com\/p\/interactions-are-generally-not-important\">Yesterday I wrote about a study I did of the OKCupid dataset<\/a>. The point was to show that interaction effects are almost always tiny and you should adjust your effect size priors downwards, <em>far far<\/em> downwards. Naturally, some people objected to the dataset being used, which is amusingly a kind of interaction claim (that is, that interaction effects are weaker in dating site data than other data). However, this is all fine because there&#8217;s lots of other large scale datasets one can use for the same research design. So I decided to do it again and for this I chose <a href=\"https:\/\/www.cdc.gov\/nchs\/nhanes\/index.html\">the American NHANES<\/a>. These large studies are done every 2 years and measure a large number of mostly biological and medical properties (e.g. blood work) that aren&#8217;t impacted by self-report issues or being on a dating site. To boost the sample size, I used data from the last 2 waves (from 2017\u20132020 and 2021\u20132023, total n = 14,608 adults). From these I selected 139 variables measured for at least 8,000 people; each model uses the people with data on all three of its variables (median n = 11,024).<\/p>\n<p>The analytic strategy was about the same but expanded a bit:<\/p>\n<ol>\n<li>We pick 3 random variables, set the first as the outcome, and the other 2 as the predictors, thus getting the general model Y ~ X1 + X2. This we test against the interaction model Y ~ X1 * X2. The variables are continuous variables, occasionally quasi-continuous, so we don&#8217;t have to use anything other than OLS<\/li>\n<li>In variants of the above, we swap X2 for sex (binary), since sex interactions are probably those that are most common\/largest.<\/li>\n<li>We use LOOCV to assess how much variance the interactions add. This is probably better than trusting the analytic approximations (adjusted R\u00b2).<\/li>\n<\/ol>\n<p>Alright, so did this dataset change the conclusions? Not really. We find just about the same as before:<\/p>\n<p><a href=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_bands.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16085\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_bands.png\" alt=\"\" width=\"2000\" height=\"1040\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_bands.png 2000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_bands-300x156.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_bands-1024x532.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_bands-768x399.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_bands-1536x799.png 1536w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/a><\/p>\n<p>Or if you prefer a table:<\/p>\n<p><a href=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_table.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16086\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_table.png\" alt=\"\" width=\"1500\" height=\"222\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_table.png 1500w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_table-300x44.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_table-1024x152.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s1_linear_table-768x114.png 768w\" sizes=\"auto, (max-width: 1500px) 100vw, 1500px\" \/><\/a><\/p>\n<p>So in a sizable number, even a majority, of models the variance explained % gain was negative, which is to say that there was so little signal of an interaction that model overfitting caused the gain to be negative.\u00a0Some somewhat sizable interactions were found in about 1% of the models. But if you look more closely at them, you can see the problem is not an interaction but that the main effects are misspecified as linear when they are really nonlinear:<\/p>\n<p><a href=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s2_spurious_bp.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16087\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s2_spurious_bp.png\" alt=\"\" width=\"2000\" height=\"1100\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s2_spurious_bp.png 2000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s2_spurious_bp-300x165.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s2_spurious_bp-1024x563.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s2_spurious_bp-768x422.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s2_spurious_bp-1536x845.png 1536w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/a><\/p>\n<p>In this case, the model misfit is also caused by a data dependency. Someone measured at age 20 cannot have their age of heaviest weight at more than 20. It&#8217;s a kind of duh finding and not what people have in mind when they claim interactions.<\/p>\n<p>I thus redid the models adding splines for the main effects and still testing for linear interactions (Y ~ spline(X1) + spline(X2) + X1:X2). Allowing for nonlinear main effects further reduced the apparent effect sizes of the interactions:<\/p>\n<p><a href=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s3_bands.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16088\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s3_bands.png\" alt=\"\" width=\"2000\" height=\"1040\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s3_bands.png 2000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s3_bands-300x156.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s3_bands-1024x532.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s3_bands-768x399.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s3_bands-1536x799.png 1536w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/a><\/p>\n<p>But this still leaves the possibility that the interaction itself is nonlinear (Y ~ spline(X1) * spline(X2)). Here&#8217;s a clean case of that happening:<\/p>\n<p><a href=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/nhanes_blog_estradiol_age_sex.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16073\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/nhanes_blog_estradiol_age_sex.png\" alt=\"\" width=\"1800\" height=\"1200\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/nhanes_blog_estradiol_age_sex.png 1800w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/nhanes_blog_estradiol_age_sex-300x200.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/nhanes_blog_estradiol_age_sex-1024x683.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/nhanes_blog_estradiol_age_sex-768x512.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/nhanes_blog_estradiol_age_sex-1536x1024.png 1536w\" sizes=\"auto, (max-width: 1800px) 100vw, 1800px\" \/><\/a><\/p>\n<p>Men&#8217;s level of estradiol is basically constant throughout their life (flat line fit), while women&#8217;s follow the fertile window (requiring a spline), and thus the interaction also requires a spline. Thus, redoing the models once again with nonlinear interactions allowed:<\/p>\n<p><a href=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_bands.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16089\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_bands.png\" alt=\"\" width=\"2000\" height=\"1040\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_bands.png 2000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_bands-300x156.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_bands-1024x532.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_bands-768x399.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_bands-1536x799.png 1536w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/a><\/p>\n<p>Given the extreme model flexibility, it is very apt to overfit even on large datasets, and 87% of non-sex models were worse than without the interaction. After all of this, something like 0.6% of random trio models, and 2% of random trio models with sex added at least 1% variance explained. Most of these are still going to be marginal. Like this one:<\/p>\n<p><a href=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_marginal_waist.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16093\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_marginal_waist.png\" alt=\"\" width=\"1800\" height=\"1240\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_marginal_waist.png 1800w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_marginal_waist-300x207.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_marginal_waist-1024x705.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_marginal_waist-768x529.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/s4_marginal_waist-1536x1058.png 1536w\" sizes=\"auto, (max-width: 1800px) 100vw, 1800px\" \/><\/a><\/p>\n<p>Looking closely, you can see the lines diverge slightly at the high end. And this is a relatively\u00a0<em>large<\/em> real interaction effect!<\/p>\n<p>As such, the results from the prior study cannot be explained away as being due to the nature of the dataset used, unless of course you can come up with another ad hoc hypothesis for why it also fails in NHANES, and presumably why interactions would show up in other kinds of data. These 2 studies cannot rule out that you can find some kind of dataset where practically relevant interaction effects show up (say, gene expression levels or other low-level biological systems). For now, however, the burden of proof is on those thinking interactions are commonplace and practically meaningful. Meanwhile, whenever you read a new study claiming some interaction effect with p = 4% based on a sample of 100 students, you are right to be very skeptical indeed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I wrote about a study I did of the OKCupid dataset. The point was to show that interaction effects are almost always tiny and you should adjust your effect size priors downwards, far far downwards. Naturally, some people objected to the dataset being used, which is amusingly a kind of interaction claim (that is, [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":16073,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1766,1727],"tags":[2707,3893],"class_list":["post-16068","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-math-science","category-medicine","tag-interactions","tag-nhanes","entry","has-media"],"_links":{"self":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/16068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/comments?post=16068"}],"version-history":[{"count":7,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/16068\/revisions"}],"predecessor-version":[{"id":16095,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/16068\/revisions\/16095"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/media\/16073"}],"wp:attachment":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/media?parent=16068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/categories?post=16068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/tags?post=16068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}