I have a model like this
model <-lm(outcome ~ var0 + var1 + as.factor(var2))
with var2
taking the values A
, B
, and C
. I create the output with stargazer
. I would like to omit var0
and as.factor(var2)A
from the output. I couldn't achieve this; I tried:
stargazer(model, type = "html", out = "./output.html",
omit = c("var0", "var2")) # omits ALL var2 entries
stargazer(model, type = "html", out = "./output.html",
omit = c("var0", "as.factor(var2)B")) # omits no var2 entry in addition to the base category (A)
Can someone point me to the solution? (N.B.: this is not what this question asks, which wants to omit ALL entries of the variables.)
The second example results in output. But I would like the entry marked in yellow to be omitted.