easystats / modelbased

:chart_with_upwards_trend: Estimate effects, contrasts and means based on statistical models
https://easystats.github.io/modelbased/
GNU General Public License v3.0
232 stars 19 forks source link

Harmonize ggeffects and modelbased #248

Open strengejacke opened 4 months ago

strengejacke commented 4 months ago

@DominiqueMakowski This is a draft for ggeffects, WDYT? From the docs:

predict_response() is a wrapper around ggpredict(), ggeffect(), ggemmeans() and ggaverage(). Depending on the value of the marginalize argument, predict_response() calls one of those functions, sometimes with different arguments. The marginalize argument indicates how to marginalize over the non-focal predictors, i.e. those variables that are not specified in terms. Possible values are:

In marginaleffects, that would be something like:

predictions(newdata = "means", by = ...), predictions(by = ...), predictions(newdata = "marginalmeans", by = ...), avg_predictions(variables = ...)

This looks like the four most common "marginalization" methods?