I am trying to print a three-panel table of 3 regression models, in which instead of one of the results (the middle regression for the middle panel) it should be "NA" or "--".
For example, I can run:
library(modelsummary)
y <- rnorm(5)
models <- list()
for (i in 1:3) {
models[[length(models) + 1]] <- lm(y ~ rnorm(5))
models[[length(models) + 1]] <- lm(y ~ rnorm(5))
models[[length(models) + 1]] <- lm(y ~ rnorm(5))
}
models <- list(models[1:3], models[4:6], models[7:9])
modelsummary(models, shape = 'rbind', gof_map = c(""),
coef_omit = "Intercept", estimate = "{estimate}", statistic = NULL)
to produce the following table:
I don't need the second regression from Panel B. I need the respective coefficient to be NA, or a dash. Is there a way to pass something to modelsummary to tell it to skip printing that particular model?