I am estimating a regression model with some factor/categorial variables and some numerical ones. Is it possible to display the reference category for each factor/categorial variable in the summary of the regression model?
Ideally this would translate also to texreg or stargazer to have latex output, but having them in the summary of the regression would already be a good start.
Does anybody have an Idea, what am I missing?
For LaTeX output or similar it is easily possible to add a line in the modelsummary package. (For example to display you reference category)
library(modelsummary)
library(tibble)
data(mtcars)
models <- list()
models[['OLS']] <- lm(mpg ~ factor(cyl), mtcars)
models[['Logit']] <- glm(am ~ factor(cyl), mtcars, family = binomial)
rows <- tribble(~term, ~OLS, ~Logit,
'factor(cyl)4', '-', '-',
'Info', '???', 'XYZ')
attr(rows, 'position') <- c(3, 9)
modelsummary(models, add_rows = rows)
See here for details:
https://vincentarelbundock.github.io/modelsummary/articles/modelsummary.html#add_rows