When I generate a table in stargazer
and omit fixed effects, then specify the omit.labels
option, stargazer (version 5.2.2) shows "No" for every column. Here's an example:
library(stargazer)
# generate example data
set.seed(1)
list_of_states <- rep(c(1, 2, 3, 4, 5), 5)
df <- data.frame("state" = list_of_states, "y" = runif(25),
"x1" = runif(25), "x2" = runif(25))
# OLS without fixed effects
ols.1 <- glm(y ~ x1, data = df)
ols.2 <- glm(y ~ x1 + x2, data = df)
# OLS with fixed effects
fe.1 <- glm(y ~ x1 + factor(state), data = df)
fe.2 <- glm(y ~ x1 + x2 + factor(state), data = df)
stargazer(ols.1, ols.2, fe.1, fe.2,
type = "text",
align = TRUE,
omit = c("state"),
omit.labels = c("State FE"))
This outputs
==================================================
Dependent variable:
--------------------------------
y
(1) (2) (3) (4)
--------------------------------------------------
x1 0.088 0.098 0.151 0.157
(0.241) (0.264) (0.263) (0.283)
x2 0.028 0.022
(0.270) (0.287)
Constant 0.485*** 0.467* 0.466** 0.452
(0.142) (0.227) (0.215) (0.280)
--------------------------------------------------
State FE No No No No
--------------------------------------------------
Observations 25 25 25 25
Log Likelihood -5.321 -5.315 -3.528 -3.524
Akaike Inf. Crit. 14.642 16.630 19.056 21.048
==================================================
Note: *p<0.1; **p<0.05; ***p<0.01
The labels in the "State FE" row should say "Yes" in the last two columns. Is this a bug?