Question

When using stargazer there is an argument, omit.stat, however I need to remove the test statistics from below my coefficient values and it isn't an argument listed in the stargazer package documentation (PDF) (pp. 14–15). Does anyone know how I might go about this?

For Example:

install.packages('stargazer'); library(stargazer)
linear.1 <- lm(rating ~ complaints + privileges + learning + raises + critical,
               data=attitude)
linear.2 <- lm(rating ~ complaints + privileges + learning, data=attitude)
attitude$high.rating <- (attitude$rating > 70)
probit.model <- glm(high.rating ~ learning + critical + advance,
                    data=attitude, family = binomial(link = "probit"))

stargazer(linear.1, linear.2, probit.model, title="Regression Results",
          align=TRUE, dep.var.labels=c("Overall Rating","High Rating"),
          covariate.labels=c("Handling of Complaints","No Special Privileges",
          "Opportunity to Learn","Performance-Based Raises","Too Critical",
          "Advancement"), omit.stat=c("LL","ser","f"), no.space=TRUE)

The above gives me a table with test statistics, which I would like to omit entirely. The following replaces them with confidence intervals but that isn't any better.

stargazer(linear.1, linear.2, title="Regression Results",
dep.var.labels=c("Overall Rating","High Rating"),
covariate.labels=c("Handling of Complaints","No Special Privileges",
                   "Opportunity to Learn","Performance-Based Raises",
                   "Too Critical","Advancement"), omit.stat=c("LL","ser","f"),
                   ci=TRUE, ci.level=0.90, single.row=TRUE)

The tables can be seen on the R-statistics blog entry, Tailor Your Tables with stargazer: New Features for LaTeX and Text Output, as the first and second respectively.

Was it helpful?

Solution

The current version of stargazer does not support omitting the standard errors and/or confidence intervals (I assume this is what you mean by 'test statistics'). However, I have been considering making stargazer output a lot more adjustable in future releases - feel free to send me (the package author) ideas about how best to do this.

For now, a hackish way to omit standard errors might involve feeding the se argument a list of NAs:

stargazer(linear.1, linear.2, probit.model, title="Regression Results", 
align=TRUE, dep.var.labels=c("Overall Rating","High Rating"), 
covariate.labels=c("Handling of Complaints","No Special Privileges", 
"Opportunity to Learn","Performance-Based Raises","Too Critical","Advancement"),
omit.stat=c("LL","ser","f"), no.space=TRUE, se=list(NA, NA, NA))

Update:

Since version 5.0, stargazer has included the 'report' argument that allows users to choose which statistics to report. To report only coefficients with significance stars, for instance, users can specify report = "c*".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top