5

I would like to add an additional column to my variable names so that I may identify the exact parameters the labels are referring to. I realize that I don't need to add a custom column, but I think it would like nicer if I could. Preferably, the custom column would be have the title "Parameters", to the left of the model numbers. Is this possible? Here is some baseline code:

library(stargazer)
data <- stargazer(attitude)
linear.1 <- lm(rating ~ complaints + privileges + learning
              + raises + critical, data=attitude)
linear.2 <- lm(rating ~ complaints + privileges + learning, data=attitude)
stargazer(linear.1, linear.2, type = "text",
          column.labels = c("model 1", "model 2"),
          covariate.labels = c("Complaints ($\\alpha$)",
                               "Privileges ($\\beta$)",
                               "Learning ($\\gamma$)",
                               "Raises ($\\delta$)",
                               "Critical ($\\epsilon$)",
                               "Intercept"
          ))

ideally, i would like to have something like this:

cach dies
  • 331
  • 1
  • 14
  • Since there’s no answer here yet I’ll point you to an old answer I’ve written: [Stargazer is terrible, don’t use it](http://stackoverflow.com/a/32035526/1968). It produces terrible formatting, offers next to no customisation and has a very poor API. Use Pander or something similar instead. – Konrad Rudolph Aug 12 '16 at 15:38

1 Answers1

-3

Use add.lines (refer documentation)

stargazer(output, output2, type = "html", add.lines = list(c("Fixed effects?", "No", "No"),c("Results believable?", "Maybe", "Try again later")))

You can also check the link here

DisplayName
  • 13,283
  • 2
  • 11
  • 19