First of all, it would be extremely helpful if you could simply paste the output you are seeing from stargazer here - otherwise we may simply not understand the issue you are facing (e.g., y1
, y2
, y3
are not the same and, hence, stargazer would obviously not recognize them as being the same)
Initial answer based on my understanding of your problem:
For models that have the same dependent variable and are next to each other stargazer will automatically group the heading and won't report it twice:
Models with same DV that are next to each other
stargazer(model1, model1, model2, type = "text")
================================================================================
Dependent variable:
--------------------------------------------------
daily_invcount2 daily_invcount3
negative negative
binomial binomial
(1) (2) (3)
--------------------------------------------------------------------------------
Models with same DV that are not next to each other
stargazer(model1, model2, model1, type = "text")
================================================================================
Dependent variable:
--------------------------------------------------
daily_invcount2 daily_invcount3 daily_invcount2
negative negative negative
binomial binomial binomial
(1) (2) (3)
--------------------------------------------------------------------------------
If this does not work for any particular reason stargazer offers three additional options:
If the DV is the same across all models you can turn off the dep var labels with dep.var.labels.include = FALSE
and modify the overarching caption to something like dep.var.caption = "Dependent variable: DV 1"
If the DVs are different but are closely connected you could also edit the overarching dep var caption as above and overwrite the dep var labels with dep.var.labels = c("option a", "option b")
Finally, you can turn off the dep var labels, and split your models into custom groups and add manually defined column labels with (values are exemplary) column.separate = c(2, 1), column.labels = c("option a", "option b")
I will update this answer as soon as I fully understand your issue.