> library(marginaleffects)
> dat = read.csv("https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv")
> mod = glm(body_mass_g ~ flipper_length_mm * species * bill_length_mm + island, data = dat)
> c = avg_comparisons(mod, hypothesis = "revpairwise")
R code
R output
Python code
Python output