In my neverending attempt to understand the terminology and concepts behind "predictions", I have drafted a vignette that shows the technical differences between the different "marginalization" options (argument estimate), as well as their meaning. The basic distinction is data-grid based (or condtitional) predictions, and empirical (or marginal) predictions for those options that average over the sample. See in particular: https://easystats.github.io/modelbased/articles/technical_marginalization.html#summary
Now my question is, since we try to distinguish between the different estimate options and do reflect this in the title: should we be even clearer, adding "conditional" and "marginal" as term in the header?
Note: the second option, the emmeans-default estimate = "typical", prints "Estimated Marginal Means", although these are probably not strictly marginal, so we would/should maybe change this.
We could simply have "conditional predictions" as header for the first two options, and "marginal predictions" or "marginal (counterfactual) predictions" for the latter two options? @DominiqueMakowski any thoughts?
library(modelbased)
data(penguins)
set.seed(123)
d <- penguins
d$weights <- abs(rnorm(nrow(d), 1, 0.2))
model <- lm(body_mass ~ species + sex + bill_len, data = d, weights = weights)
data-grid based, conditional predictions
estimate_means(model, "sex", estimate = "specific")
#> Model-based Predictions
#>
#> sex | Mean | SE | 95% CI | t(328)
#> ------------------------------------------------------
#> female | 3611.50 | 59.73 | [3494.00, 3729.01] | 60.46
#> male | 4148.88 | 38.84 | [4072.48, 4225.28] | 106.83
#>
#> Variable predicted: body_mass
#> Predictors modulated: sex
#> Predictors controlled: species (Adelie), bill_len (44)
estimate_means(model, "sex", estimate = "typical")
#> Estimated Marginal Means
#>
#> sex | Mean | SE | 95% CI | t(328)
#> ------------------------------------------------------
#> female | 3873.98 | 25.06 | [3824.69, 3923.27] | 154.61
#> male | 4411.36 | 32.43 | [4347.56, 4475.15] | 136.03
#>
#> Variable predicted: body_mass
#> Predictors modulated: sex
#> Predictors averaged: species, bill_len (44)
empirical, marginal predictions
estimate_means(model, "sex", estimate = "average")
#> Average Predictions
#>
#> sex | Mean | SE | 95% CI | t(328)
#> ------------------------------------------------------
#> female | 3868.92 | 23.72 | [3822.27, 3915.58] | 163.13
#> male | 4545.49 | 23.74 | [4498.79, 4592.19] | 191.49
#>
#> Variable predicted: body_mass
#> Predictors modulated: sex
estimate_means(model, "sex", estimate = "population")
#> Average Counterfactual Predictions
#>
#> sex | Mean | SE | 95% CI | t(328)
#> ------------------------------------------------------
#> female | 3939.15 | 27.46 | [3885.12, 3993.17] | 143.44
#> male | 4476.52 | 27.38 | [4422.66, 4530.38] | 163.50
#>
#> Variable predicted: body_mass
#> Predictors modulated: sex
#> Predictors averaged: species, bill_len (44)
Created on 2026-08-13 with reprex v2.1.1
In my neverending attempt to understand the terminology and concepts behind "predictions", I have drafted a vignette that shows the technical differences between the different "marginalization" options (argument
estimate), as well as their meaning. The basic distinction is data-grid based (or condtitional) predictions, and empirical (or marginal) predictions for those options that average over the sample. See in particular: https://easystats.github.io/modelbased/articles/technical_marginalization.html#summaryNow my question is, since we try to distinguish between the different
estimateoptions and do reflect this in the title: should we be even clearer, adding "conditional" and "marginal" as term in the header?Note: the second option, the emmeans-default
estimate = "typical", prints "Estimated Marginal Means", although these are probably not strictly marginal, so we would/should maybe change this.We could simply have "conditional predictions" as header for the first two options, and "marginal predictions" or "marginal (counterfactual) predictions" for the latter two options? @DominiqueMakowski any thoughts?
data-grid based, conditional predictions
empirical, marginal predictions
Created on 2026-08-13 with reprex v2.1.1