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
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 🥰
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
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.
Look what arrived in the mail today! It's my copy of the pink book of marginaleffects by @vincentab.bsky.social
#rstats
#rstats
October 21, 2025 at 12:41 PM
Look what arrived in the mail today! It's my copy of the pink book of marginaleffects by @vincentab.bsky.social
#rstats
#rstats
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
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.
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
Hope you're hungry for some spam in your timeline.
#RStats #PyData
September 22, 2025 at 4:52 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
Hope you're hungry for some spam in your timeline.
#RStats #PyData
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
#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
𝐌𝐨𝐝𝐞𝐥 𝐭𝐨 𝐌𝐞𝐚𝐧𝐢𝐧𝐠: 𝐇𝐨𝐰 𝐭𝐨 𝐈𝐧𝐭𝐞𝐫𝐩𝐫𝐞𝐭 𝐒𝐭𝐚𝐭 & 𝐌𝐋 𝐌𝐨𝐝𝐞𝐥𝐬 𝐢𝐧 #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
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
#rstats
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....
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
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....
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....
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....
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
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.
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...
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
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
marginaleffects can do this I think
August 19, 2024 at 10:00 PM
marginaleffects can do this I think
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
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.
*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
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
*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
This is a dangerous *alpha* release. Send feedback & bugs:
https://github.com/vincentarelbundock/pymarginaleffects
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
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
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
- 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
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.
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
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
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
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.
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
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...
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
emmeans has a truckload of vignettes I should see least skim
May 6, 2025 at 4:42 AM
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
emmeans has a truckload of vignettes I should see least skim
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
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)
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
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)
Also the code below actually worked for me so maybe at least clm will work?
March 25, 2025 at 11:03 AM
Also the code below actually worked for me so maybe at least clm will work?
@vincentab.bsky.social’s {marginaleffects} taking over the stats world
May 27, 2025 at 2:12 PM
@vincentab.bsky.social’s {marginaleffects} taking over the stats world
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
I don’t have much experience with these models but my first impulse would be to use marginaleffects to try to crank out predictions 😂