Created
January 16, 2024 15:34
-
-
Save mweylandt/167f3342e569d5da7ce274cf8cdf3e52 to your computer and use it in GitHub Desktop.
Omit interactions from modelsummary tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
co <- ":" # omit all interactions | |
co3 <- ":.*:" # omit three way interactions and higher | |
co4 <- ":.*:.*:.*" #omit four-way interactions | |
mod <- lm(mpg ~ hp*am*wt*cyl,data = mtcars) | |
modelsummary(mod, coef_omit = co ) | |
modelsummary(mod, coef_omit = co3 ) | |
modelsummary(mod, coef_omit = co4 ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment