#marginaleffects
Lifehack! Annoyed by reviewers who ask you to change details of your model specification? Use marginaleffects so that when revising your code, you just need to switch out the model. Target quantities can be calculated the same way as before 🥰
November 4, 2025 at 2:59 PM
This sounds suspiciously like you want to interpret the coefficients from this model… Fit the best model for the data (probably logistic) and use marginaleffects to compute the quantity of interest.
October 24, 2025 at 1:04 PM
Look what arrived in the mail today! It's my copy of the pink book of marginaleffects by @vincentab.bsky.social

#rstats
October 21, 2025 at 12:41 PM
1) If your sampling is simple, (e.g. simple random sampling within strata), then by including the stratification variables in the model and poststratifying (e.g. with marginaleffects and avg_predictions(wts = weights)), you get correct standard errors.
September 28, 2025 at 5:41 PM
The Pink Book of #MarginalEffects (aka Model to Meaning) ships next week and I've got a backlog of Zoolander memes.

Hope you're hungry for some spam in your timeline.

#RStats #PyData
September 22, 2025 at 4:52 PM
I just preordered the marginaleffects book. It's such a useful package that in the short time I've used it, I've started incorporating it into almost all analyses that I run.

#rstats
Whoa—my book is up for pre-order!

𝐌𝐨𝐝𝐞𝐥 𝐭𝐨 𝐌𝐞𝐚𝐧𝐢𝐧𝐠: 𝐇𝐨𝐰 𝐭𝐨 𝐈𝐧𝐭𝐞𝐫𝐩𝐫𝐞𝐭 𝐒𝐭𝐚𝐭 & 𝐌𝐋 𝐌𝐨𝐝𝐞𝐥𝐬 𝐢𝐧 #Rstats 𝐚𝐧𝐝 #PyData

The book presents an ultra-simple and powerful workflow to make sense of ± any model you fit

The web version will stay free forever and my proceeds go to charity.

tinyurl.com/4fk56fc8
September 22, 2025 at 7:35 PM
The new {marginaleffects} release for #RStats (0.30.0) comes with two new vignettes:

1. Speed up computation with automatic differentiation (often 10x gains) marginaleffects.com/bonus/perfor...

2. Power analyses with {marginaleffects} and {DeclareDesign}. marginaleffects.com/bonus/power....
37  Performance – Model to Meaning
marginaleffects.com
September 13, 2025 at 6:37 PM
I haven't used {DeclareDesign} before, but I have been using {marginaleffects} in my simulation-based power analyses for the past year or so, and I recommend you do too.
The new {marginaleffects} release for #RStats (0.30.0) comes with two new vignettes:

1. Speed up computation with automatic differentiation (often 10x gains) marginaleffects.com/bonus/perfor...

2. Power analyses with {marginaleffects} and {DeclareDesign}. marginaleffects.com/bonus/power....
37  Performance – Model to Meaning
marginaleffects.com
September 13, 2025 at 6:41 PM
marginaleffects is one of my favourite R packages and this is such a great paper!! extremely recommended, alongside all other papers from the two authors and also the amazing and free Model to Meaning book marginaleffects.com
Ever stared at a table of regression coefficients & wondered what you're doing with your life?

Very excited to share this gentle introduction to another way of making sense of statistical models (w @vincentab.bsky.social)
Preprint: doi.org/10.31234/osf...
Website: j-rohrer.github.io/marginal-psy...
September 11, 2025 at 11:49 AM
CRAN updates: marginaleffects serp #rstats
November 25, 2024 at 6:02 PM
marginaleffects can do this I think
August 19, 2024 at 10:00 PM
Stata's *margins* command has been central to much of my recent research. It was the most useful, reliable, and flexible way to do good visualization of linear and nonlinear models, and had great documentation. *marginaleffects* will displace it.
October 21, 2024 at 1:48 AM
*marginaleffects* for Python can compute predictions, slopes, and comparisons (diff, ratio, etc.) for many statsmodels. It can run hyp & equiv tests as well.

This is a dangerous *alpha* release. Send feedback & bugs:

https://github.com/vincentarelbundock/pymarginaleffects
GitHub - vincentarelbundock/pymarginaleffects
Contribute to vincentarelbundock/pymarginaleffects development by creating an account on GitHub.
github.com
July 2, 2023 at 10:00 PM
When using {marginaleffects} with {brms} models that have been estimated over multiply imputed datasets using brm_multiple, does the package automatically pool slopes/predictions/comparisons across the imputed data (to account for all the uncertainty)? @vincentab.bsky.social
February 4, 2025 at 3:21 PM
I'm not saying that @vincentab.bsky.social's marginaleffects package caused me to finally switch to R as my default stats software. But it definitely Granger-caused me to switch to R as my default.
Objectively correct R-v-Stata takes incoming:

- I like Stata because I am old enough to remember when Stata was better than Gauss, SPSS, and LIMDEP.
- I like R because it's free.
- Base R plots look more science-y.
- Stata help files are so good that you can read them to figure out R stuff
December 14, 2024 at 7:44 PM
Ah yeah, and even in the case of those plots, those aren't parameters—they're posterior epreds from marginaleffects, so not even regular coefficients
April 24, 2025 at 4:23 AM
Yes, see argument `estimate`. Using this argument, you should be able to easily reproduce results from emmeans and marginaleffects::avg_predictions. It's more a matter of naming things/wording, where the modelbased approach differs from emmeans or marginaleffects.
May 31, 2025 at 11:46 AM
Note to self (and in case anyone else has got tripped up not realising), #marginaleffects, #emmeans etc. functions tend to keep the dataset in the object attributes when you assign them to an object. That's caught me recently for big targets simulations with large population datasets...
June 16, 2025 at 7:01 PM
marginaleffects is certainly more applicable to my day to day, but i like to try to keep my ear to the ground on some of the preferred "general tooling", if that makes sense.

emmeans has a truckload of vignettes I should see least skim
May 6, 2025 at 4:42 AM
As far as I know you can simply bootstrap now! And honestly I don't think anything keeps you from combining full luxury Bayesian space communism with marginaleffects (3rd example in our primer is all brms)
July 28, 2025 at 5:47 AM
CRAN updates: marginaleffects #rstats
June 14, 2024 at 9:02 AM
Updates on CRAN: collapse (2.0.13), fqar (0.5.3), LPM (3.1), marginaleffects (0.19.0), MLmetrics (1.1.3), rBayesianOptimization (1.2.1)
April 14, 2024 at 2:56 AM
Also the code below actually worked for me so maybe at least clm will work?
March 25, 2025 at 11:03 AM
@vincentab.bsky.social’s {marginaleffects} taking over the stats world
May 27, 2025 at 2:12 PM
I don’t have much experience with these models but my first impulse would be to use marginaleffects to try to crank out predictions 😂
August 25, 2025 at 1:57 PM