Advertisement · 728 × 90

Posts by Carlos E Lourenco (Caê)

Models as Prediction Machines: How to Convert Confusing Coefficients Into Clear Quantities


Psychological researchers usually make sense of regression models by interpreting coefficient estimates directly. This works well enough for simple linear models but is challenging for more complex models with, for example, categorical variables, interactions, nonlinearities, or hierarchical structures. Here, we introduce an alternative approach to making sense of statistical models. The central idea is to abstract away from the mechanics of estimation and to treat models as “counterfactual prediction machines,” which are subsequently queried to estimate quantities and conduct tests that matter substantively. This workflow is model-agnostic; it can be applied in consistent fashion to draw inferences from a wide range of models. We illustrate how to implement this workflow with the marginaleffects package, which supports more than 100 different classes of models in R and Python, and present two worked examples. These examples show how the workflow can be applied across designs (e.g., observational studies, randomized experiments) to answer different research questions (e.g., about associations, causal effects, effect heterogeneity) while facing various challenges (e.g., controlling for confounders in a flexible manner, modeling ordinal outcomes, and interpreting nonlinear models).

Models as Prediction Machines: How to Convert Confusing Coefficients Into Clear Quantities Psychological researchers usually make sense of regression models by interpreting coefficient estimates directly. This works well enough for simple linear models but is challenging for more complex models with, for example, categorical variables, interactions, nonlinearities, or hierarchical structures. Here, we introduce an alternative approach to making sense of statistical models. The central idea is to abstract away from the mechanics of estimation and to treat models as “counterfactual prediction machines,” which are subsequently queried to estimate quantities and conduct tests that matter substantively. This workflow is model-agnostic; it can be applied in consistent fashion to draw inferences from a wide range of models. We illustrate how to implement this workflow with the marginaleffects package, which supports more than 100 different classes of models in R and Python, and present two worked examples. These examples show how the workflow can be applied across designs (e.g., observational studies, randomized experiments) to answer different research questions (e.g., about associations, causal effects, effect heterogeneity) while facing various challenges (e.g., controlling for confounders in a flexible manner, modeling ordinal outcomes, and interpreting nonlinear models).

Flowchart of a modeling workflow: first, select and fit a model suited to the research question; next, compute estimands (predictions, comparisons, slopes) with choices about unit-level vs. average estimates and scale; finally, perform statistical testing (uncertainty, null and equivalence tests). A side note contrasts this with a standard workflow that focuses directly on model coefficients.

Flowchart of a modeling workflow: first, select and fit a model suited to the research question; next, compute estimands (predictions, comparisons, slopes) with choices about unit-level vs. average estimates and scale; finally, perform statistical testing (uncertainty, null and equivalence tests). A side note contrasts this with a standard workflow that focuses directly on model coefficients.

I really enjoyed writing this one because marginaleffects just makes so much sense! It's a bit like with causal graphs -- a great tool to make sense of stuff, so why not teach it early on to make life a bit easier?

1 day ago 18 2 0 0
Preview
Models as Prediction Machines: How to Convert Confusing Coefficients Into Clear Quantities - Julia M. Rohrer, Vincent Arel-Bundock, 2026 Psychological researchers usually make sense of regression models by interpreting coefficient estimates directly. This works well enough for simple linear model...

Good news everyone 🥳 Our (w @vincentab.bsky.social) primer on models as prediction machines (with the marginaleffects package) is finally officially published!>

journals.sagepub.com/doi/10.1177/...

1 day ago 291 111 10 7
Post image

#academicsky #neuroskyence #psychscisky

1 day ago 2 1 0 0
Why do we do astrophysics? At time of writing, large language models (LLMs) are beginning to obtain the ability to design, execute, write up, and referee scientific projects on the data-science side of astrophysics. What implic...

doi.org/10.48550/arX...

1 day ago 2 1 1 0
Preview
Scientists turn scrap car aluminum into high-performance metal for new vehicles Scientists at Oak Ridge National Laboratory have created a new aluminum alloy called RidgeAlloy that can turn contaminated car-body scrap into strong structural vehicle parts. Normally, impurities…

Aluminium used to build cars can now be reused to build cars. A new alloy called RidgeAlloy turns contaminated scrap into strong structural vehicle parts. This solves the problem where recycled aluminium from mixed or dirty auto scrap was too weak for structural use buff.ly/tmDSuWf
#ShareGoodNewsToo

1 day ago 167 62 0 6
Preview
Build yourself flowers Living and working in a world of generated code.

Last week, I gave a keynote at appliedml.us/2026/ on machine learning and engineering.

Like a lot of us, I've had questions and anxiety around software development today. The talk covers why good engineering is still important (and 🌷).

vickiboykis.com/2026/04/20/b...

1 day ago 42 7 2 2

From post-publication review to post-publication enrichment 🔥🚀

#ATScience #Metascience

1 day ago 15 2 0 0
Preview
Ten Years of Relational Power: The Long-Run Effects of Teaching Negotiation Skills to Adolescent Girls (Forthcoming Article) - We evaluate the effects of teaching negotiation skills to adolescent girls in economically vulnerable communities in Lusaka, Zambia ten years later. Treated participants complete 0.23 more years of education. Consistent with greater relational empowerment, they also begin sexual activity later, have smaller age gaps with their husbands, and express less traditional gender attitudes. Using a surrogate approach, social benefits and costs from increased education alone suggest the intervention generated 7.6 dollars for every dollar spent and had a very high marginal value of public funds of 10.5.

Forthcoming in AER: Insights: "Ten Years of Relational Power: The Long-Run Effects of Teaching Negotiation Skills to Adolescent Girls" by Nava Ashraf, Natalie Bau, Corinne Low, and Xiaoyue Shan.

1 day ago 4 2 0 0

Latest Claude Cowork love - three of my recent papers and full conference program uploaded and voila! Personalized conference schedule in seconds.

Secondarily, when did conference programs get so long and overcomplicated and why do these apps just make them worse?

1 day ago 17 2 4 0
Advertisement
Using AI to improve (not automate away) academic research Blog about fatherhood, langauge, developmental psychology, and cognitive science.

Just wrote a new blogpost trying to summarize my thoughts on the question of how and whether to use AI for research in psychology and cognitive science: babieslearninglanguage.blogspot.com/2026/04/usin...

2 days ago 52 24 5 3
Preview
PhD Student in Meta-Science and Clinical Psychology - Universität Bern Universität Bern is looking for PhD Student in Meta-Science and Clinical Psychology

I’m hiring a PhD student!

The candidate will work alongside @zefreeman.bsky.social, who is joining our research group as postdoc.

jobs.unibe.ch/job-vacancie...

4 days ago 68 55 3 8

University of Pennsylvania is hiring:
Postdoctoral Researcher in Causal Inference

#postdoc

3 days ago 1 1 1 0

- Alexandre Andorra's new Claude Code skill for causal inference with PyMC, CausalPy, and DoWhy: DAGs and quasi-experiments included

- New causal jobs - industry and academia

4/

4 days ago 2 1 0 0
Manuscript — an imagined editor for research writing A walk through an imagined product for academic writing, mocked up by Claude Design.

None of this exists. But it could! The tools for each component have already been deployed, they just don't live in the same ecosystem.

I've sketched out the idea, now someone just needs to get to work building it 😉

rafaelmbatista.com/manuscript/i...

#AI #AcademicSky

3 days ago 2 1 0 0
Post image

The Materials section would store survey instruments, interview protocols, consent forms, and pre-analysis plans.

Everything would be timestamped and versioned.

🔗 rafaelmbatista.com/manuscript/s...

3 days ago 1 1 1 0
Post image

I started with a prompt where I imagined some essential features: a library for papers + other sources, a place to keep materials related to my studies, data files (separated raw vs clean) + the ability to turn that data into figures, etc

Here are the wireframes:
rafaelmbatista.com/manuscript/w...

3 days ago 1 1 1 0
Welcome to Manuscript.
An imagined product. Inspired by Claude Design, mocked up for academic research.
If Manuscript existed, I could open it and find every part of a study in one place. The instruments I built — surveys, protocols, consent forms. The papers I read in the run-up. The data those instruments collected. The figures I drew from it. And at the center of it all, the paper itself.

What follows is a walk through what that might look like. None of it works.

Welcome to Manuscript. An imagined product. Inspired by Claude Design, mocked up for academic research. If Manuscript existed, I could open it and find every part of a study in one place. The instruments I built — surveys, protocols, consent forms. The papers I read in the run-up. The data those instruments collected. The figures I drew from it. And at the center of it all, the paper itself. What follows is a walk through what that might look like. None of it works.

The release of #ClaudeDesign left me wondering what a tool like this could look like for academics (rather than designers)

I then used Claude Design to mock it up for me

Let me show you what came of it... 🧪🤖🧵
rafaelmbatista.com/manuscript/i...

3 days ago 13 3 1 0
STAT 447 (2026) Guest Lecture by Vincent Arel-Bundock
STAT 447 (2026) Guest Lecture by Vincent Arel-Bundock YouTube video by Dirk Eddelbuettel

The great @eddelbuettel.com invited me to his STAT447 class at the University of Illinois.

If you'd like to hear me speak about the interpretation of statistical models in #RStats, using the {marginaleffects} 📦, check out the video!

www.youtube.com/watch?v=v3TX...

6 days ago 71 19 0 2
Diagram showing the Python workflow: quarto render sets QUARTO_EXECUTE_INFO, which is parsed by get_brand_info(). That feeds configure_brand_fonts() using pyfonts and matplotlib, theme_brand() using plotnine, and gt_brand() using great_tables, producing light/dark figures and tables.

Diagram showing the Python workflow: quarto render sets QUARTO_EXECUTE_INFO, which is parsed by get_brand_info(). That feeds configure_brand_fonts() using pyfonts and matplotlib, theme_brand() using plotnine, and gt_brand() using great_tables, producing light/dark figures and tables.

Who needs mermaid.js + browser in Quarto when you have Quarto + Typst?

Typst-render to make all your diagrams and more using Typst for all Quarto supported formats.

github.com/mcanouil/qua...

#Quarto #Diagrams #Typst #MermaidJS

1 week ago 9 3 2 0
Advertisement
Video

Need a little whimsy in your quarto slides?
Presenting quarto-revealjs-transitions with 100+ new slide transitions

github.com/EmilHvitfeld...
#quarto

1 week ago 26 4 3 0
Preview
Branded Figures and Tables in R and Python with Quarto – Mickaël CANOUIL Style ggplot2, plotnine, gt, and great_tables outputs using Quarto’s brand feature by reading brand configuration from the QUARTO_EXECUTE_INFO environment variable at render time.

New blog post: Branded Figures and Tables in R and Python with Quarto.

Style your figures and tables to match your brand automatically at render time, with light/dark mode support.

mickael.canouil.fr/posts/2026-0...

#Quarto #Python #RStats #Brand

1 week ago 36 13 2 2

Reminder: If researchers find Cohen's d = 6, no they didn't.

trustworthy.scientific.claims/posts/if-res...

3 days ago 72 18 2 1
Preview
Six Things to Change in Your Claude Code Workflow for Opus 4.7 Boris Cherny’s tips for the new model, cross-checked against the official Claude Code and Claude API docs

Claude Code workflow changes for Claude Opus 4.7 ai.georgeliu.com/p/six-things... 🤓

4 days ago 2 2 1 0
Preview
My Claude Code Plugin Marketplace Is Now Public. Install Session Metrics Skill Plugin centminmod/claude-plugins is live. One marketplace add, one plugin install, and the session-metrics skill auto-triggers the moment you ask Claude Code how much a session cost

My Claude Code plugin marketplace live with session-metrics skill plugin insights into Claude Code models’ tokens and cost usage at both the project level and also at the individual chat session level ai.georgeliu.com/p/my-claude-...

4 days ago 1 1 0 0
Post image

In April 1912, as a third-year undergraduate student at Cambridge, RA Fisher publishes his first mathematical paper ‘On an Absolute Criterion for Fitting Frequency Curves’. This is the earliest iteration of what he would later call the method of maximum likelihood.

4 days ago 14 4 0 1
Preview
When Product Markets Become Collective Traps: The Case of Social Media (December 2025) - Individuals might experience negative utility from not consuming a popular product. With such externalities to nonusers, standard consumer surplus measures, which take aggregate cons...

A possible explanation is the same phenomenon studied in this paper

Another one could be that people find AI useful while also disliking it; for instance, I hate driving, but I understand the value of driving

4 days ago 2 1 1 0
Advertisement
Preview
ERC President explains stricter application measures amid rising demand for funding The text of an open letter sent by ERC President Maria Leptin to ERC panel members, grantees and other stakeholders on 16 April 2026.

The number of grant applications is rising sharply. Our capacity for their evaluation isn’t.

ERC President Maria Leptin explains why stricter resubmission limits are being introduced for 2027 calls and what they mean for applicants.

🔗 link.europa.eu/xF7kjc

6 days ago 40 45 2 35
Preview
Weekend reads: An alternative to the impact factor in China; the clinical trials of six ‘superretractors’; Retraction Watch goes to Capitol Hill If your week flew by — we know ours did — catch up here with what you might have missed. The week at Retraction Watch featured: Scientist who alleged COVID cover-up circulated a faked NIH email, ag…

Weekend reads: An alternative to the impact factor in China; the clinical trials of six ‘superretractors’; Retraction Watch goes to Capitol Hill

4 days ago 9 1 0 0
Preview
Early Career Faculty Program | Freeman Hrabowski Scholars | HHMI The Freeman Hrabowski Scholars Program offers comprehensive support to outstanding early career faculty committed to scientific excellence in their own research, and to fostering labs that expand the ...

This program transformed my career! Please apply.

@hhmi-science.bsky.social's #FreemanHrabowski Scholars Program offers early career faculty up to $10M over 10 yrs, plus salary & benefits. Postdoc? This year's competition has a program for you too. Applications open 11/3! bit.ly/4vhC0LA

6 days ago 80 45 0 2
A two-panel data visualization. The left panel is a scatter plot showing government health spending versus out-of-pocket payments as a percentage of current health expenditure for 195 countries in 2023. Countries with lower government spending cluster in the upper-left with high out-of-pocket burden, highlighted in burgundy. Countries with high government spending cluster in the lower-right with low out-of-pocket burden, highlighted in steel blue. A dashed diagonal reference line and a dotted 40% hardship threshold line provide analytical anchors. The right panel shows global median trends from 2000 to 2023: government spending (blue) rising steadily, out-of-pocket payments (burgundy) declining. A shaded band marks COVID-19 years. Together, the panels show where governments spend less, households spend more — and that this pattern has slowly improved globally over two decades.

A two-panel data visualization. The left panel is a scatter plot showing government health spending versus out-of-pocket payments as a percentage of current health expenditure for 195 countries in 2023. Countries with lower government spending cluster in the upper-left with high out-of-pocket burden, highlighted in burgundy. Countries with high government spending cluster in the lower-right with low out-of-pocket burden, highlighted in steel blue. A dashed diagonal reference line and a dotted 40% hardship threshold line provide analytical anchors. The right panel shows global median trends from 2000 to 2023: government spending (blue) rising steadily, out-of-pocket payments (burgundy) declining. A shaded band marks COVID-19 years. Together, the panels show where governments spend less, households spend more — and that this pattern has slowly improved globally over two decades.

📊 #TidyTuesday – 2026 W16 | Global Health Spending
.
🔗: stevenponce.netlify.app/data_visuali...
.
#rstats | #r4ds | #dataviz | #ggplot2

4 days ago 9 1 0 0