even better life hack -- make sure you cite marginaleffects so @vincentab.bsky.social has to review your paper 😂
November 4, 2025 at 3:02 PM
even better life hack -- make sure you cite marginaleffects so @vincentab.bsky.social has to review your paper 😂
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 🥰
The authors demonstrate the implementation of this approach using the marginaleffects package, which supports a wide range of model types.
November 2, 2025 at 5:22 PM
The authors demonstrate the implementation of this approach using the marginaleffects package, which supports a wide range of model types.
Not sure. I looked at those a long time ago. Let me know if you give it a shot and have questions. One thing to note is that `marginaleffects::comparisons()` builds very simple contrasts, where one or a few variables change uniformly. Time series "shocks" or matrix predictors can be more complicated
October 31, 2025 at 3:52 PM
Not sure. I looked at those a long time ago. Let me know if you give it a shot and have questions. One thing to note is that `marginaleffects::comparisons()` builds very simple contrasts, where one or a few variables change uniformly. Time series "shocks" or matrix predictors can be more complicated
It's stated that vglm models are problematic _because_ they support categorical/multinomial responses. Does this mean that marginaleffects can't support models from svyVGAM? Is there something I could do to help make it happen? (Not that I have experience in package development, but I'd like to!)
October 31, 2025 at 2:37 PM
It's stated that vglm models are problematic _because_ they support categorical/multinomial responses. Does this mean that marginaleffects can't support models from svyVGAM? Is there something I could do to help make it happen? (Not that I have experience in package development, but I'd like to!)
That would rock because svy_vglm() can handle multinomial responses, and that response distribution happens to describe a lot of survey data well. However, the marginaleffects github repo issue for supporting new models has a cryptic line about vgam/vglm models.
github.com/vincentarelb...
github.com/vincentarelb...
Support new models · Issue #49 · vincentarelbundock/marginaleffects
IF THE MODEL YOU WOULD LIKE TO SUPPORT IS NOT LISTED BELOW, PLEASE OPEN A NEW ISSUE. It is often very easy to add support for new models. If you would like to help us do it (thanks!!!), please read...
github.com
October 31, 2025 at 2:37 PM
That would rock because svy_vglm() can handle multinomial responses, and that response distribution happens to describe a lot of survey data well. However, the marginaleffects github repo issue for supporting new models has a cryptic line about vgam/vglm models.
github.com/vincentarelb...
github.com/vincentarelb...
I'm learning a lot by reading @vincentab.bsky.social's marginaleffects book, and I'm super happy that the package supports svyglm and svyolr from @tslumley.bsky.social's survey package. I dare to ask: would it be possible to have support for models from the svyVGAM package? #rstats
October 31, 2025 at 2:37 PM
I'm learning a lot by reading @vincentab.bsky.social's marginaleffects book, and I'm super happy that the package supports svyglm and svyolr from @tslumley.bsky.social's survey package. I dare to ask: would it be possible to have support for models from the svyVGAM package? #rstats
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.
Luckily, it's not that type of flowchart 😆 but rather a flowchart of steps if one wants to use the marginaleffects package.
October 23, 2025 at 1:26 PM
Luckily, it's not that type of flowchart 😆 but rather a flowchart of steps if one wants to use the marginaleffects package.
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
GAMs also work nicely with {marginaleffects} by the way :)
Most Customer Lifetime Value (CLV) models assume customer behavior is linear.
But what if it isn't?
I built an #rstats GAM for SaaS revenue prediction that captures:
→ Nonlinear adoption curves
→ Tier-specific behaviors
→ Feature value with uncertainty
ecogambler.netlify.app/blog/clv-pre...
But what if it isn't?
I built an #rstats GAM for SaaS revenue prediction that captures:
→ Nonlinear adoption curves
→ Tier-specific behaviors
→ Feature value with uncertainty
ecogambler.netlify.app/blog/clv-pre...
GAMs for Customer Lifetime Value (CLV) prediction | GAMbler
Customer Lifetime Value models are critical for SaaS businesses, but standard regression approaches often predict impossible values like negative revenue or infinite growth. There are established meth...
ecogambler.netlify.app
October 15, 2025 at 6:08 AM
GAMs also work nicely with {marginaleffects} by the way :)
Interesting. I'd be curious to know exactly what that looks like, especially since I'm heading to a conference on meta-analysis next week, and i have a personal interest in marginaleffects 😂
October 9, 2025 at 11:51 PM
Interesting. I'd be curious to know exactly what that looks like, especially since I'm heading to a conference on meta-analysis next week, and i have a personal interest in marginaleffects 😂
I've been tinkering with a -finally finished- metadataset on hiring discrimination, representing roughly 1.4 million fictitious applications, and the power of contemporary meta-regression methods combined with tools such as {marginaleffects} really struck me.
October 9, 2025 at 8:27 PM
I've been tinkering with a -finally finished- metadataset on hiring discrimination, representing roughly 1.4 million fictitious applications, and the power of contemporary meta-regression methods combined with tools such as {marginaleffects} really struck me.
Without gtsummary and marginaleffects I’d probably have a nervous breakdown.
October 9, 2025 at 1:01 PM
Without gtsummary and marginaleffects I’d probably have a nervous breakdown.
The downside is that the package is not under active development and you only get corrected posteriors for the parameters, so no automatic compatibility with postprocessing functions from e.g. brms or marginaleffects.
September 28, 2025 at 5:41 PM
The downside is that the package is not under active development and you only get corrected posteriors for the parameters, so no automatic compatibility with postprocessing functions from e.g. brms or marginaleffects.
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.
Using #marginaleffects, we compared model predictions for each outcome variable across three levels of food insecurity: "low", "medium", and "high". Each level represents an "average" participant who either responded "never", "sometimes", or "often" to each food insecurity question.
September 24, 2025 at 12:05 PM
Using #marginaleffects, we compared model predictions for each outcome variable across three levels of food insecurity: "low", "medium", and "high". Each level represents an "average" participant who either responded "never", "sometimes", or "often" to each food insecurity question.
In class / papers, I typically call whatever I'm doing with marginaleffects / emmeans "follow-up analysis", but that would seem to imply that the model fitting is the analytical goal, so I might need to revise that terminology. Maybe: (post-fitting) estimate generating tools?
September 23, 2025 at 8:22 AM
In class / papers, I typically call whatever I'm doing with marginaleffects / emmeans "follow-up analysis", but that would seem to imply that the model fitting is the analytical goal, so I might need to revise that terminology. Maybe: (post-fitting) estimate generating tools?
(and by post-estimation toolbox/framework I mean all the stuff you can do with #rstats packages like marginaleffects, modelbased or emmeans)
September 23, 2025 at 7:29 AM
(and by post-estimation toolbox/framework I mean all the stuff you can do with #rstats packages like marginaleffects, modelbased or emmeans)
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 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
Reverse suggests dependencies from {marginaleffects} and {bayestestR} from easystats must drive a lot of downloads...
September 21, 2025 at 8:30 AM
Reverse suggests dependencies from {marginaleffects} and {bayestestR} from easystats must drive a lot of downloads...
Without marginaleffects my career would be over. Probably THE most important resource out there for quantitative social scientiests
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 17, 2025 at 8:35 PM
Without marginaleffects my career would be over. Probably THE most important resource out there for quantitative social scientiests
Me: shows in class how to understand multilevel binomial models w/ #marginaleffects, supplies detailed and commented R code.
Student: hands in final assignment where all model interpretation was based on results from a badly written custom function that gives incorrect results*.
Why do I bother?
Student: hands in final assignment where all model interpretation was based on results from a badly written custom function that gives incorrect results*.
Why do I bother?
September 17, 2025 at 9:06 AM
Me: shows in class how to understand multilevel binomial models w/ #marginaleffects, supplies detailed and commented R code.
Student: hands in final assignment where all model interpretation was based on results from a badly written custom function that gives incorrect results*.
Why do I bother?
Student: hands in final assignment where all model interpretation was based on results from a badly written custom function that gives incorrect results*.
Why do I bother?
The great Vincent Arel-Bundock shows how to use marginaleffects post-estimation summaries with DeclareDesign simulations!
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 14, 2025 at 2:52 PM
The great Vincent Arel-Bundock shows how to use marginaleffects post-estimation summaries with DeclareDesign simulations!