Stargazer: model names instead of numbers?

Is it possible to change the default value stargazerso that it displays a custom model label instead of a model number?

I found a parameter model.number, but it is an on / off parameter.

Ideally, I could pass something like model.names=c("hhc", "dca", "bpc")in stargazer, and that would replace automatic numbering.

+3
source share
2 answers

At the moment, you can get your desires, provided that these were the names of model objects, but if they had other names by doing this:

stargazer( hhc,dca,bpc, object.names=TRUE, model.numbers=FALSE)

This was checked with the first example on the help page:

stargazer(linear.1, linear.2, probit.model, title="Regression Results", type="text", object.names=TRUE,model.numbers=FALSE)

, , , , , :

stargazer2 <- function( #omit argument list which should remain untouched

  if( length(object.names) > 1 ){ 
            dots <- list(...)
            names(dots) <- object.names; 
            object.names=TRUE }
    save.warn.option <- getOption("warn")
    options(warn = -1)
    return(.stargazer.wrap(dots, type = type, title = title, style = style, 
        summary = summary, out = out, out.header = out.header, 
        # omitted the rest of the argument list....

stargazer2, .stargazer.wrap

environment(stargazer2) <- environment(stargazer)
stargazer2(linear.1, linear.2, probit.model, title="Regression Results", 
            type="text", model.names=c("test1","test2","test3"))
+6

column.labels .

:

stargazer( hhc,dca,bpc, column.labels=c("hhc", "dca", "bpc"), model.numbers=FALSE)

+1

All Articles