stargazer command produces LaTeX code for well-formatted tables that hold regression analysis results from several models side-by-side, as well as summary statistics. It supports model objects from lm, glm, svyglm, gee, gam, polr, survreg, coxph, as well as from the implementation of these in zelig. It also supports the following zelig models for social network analysis: "cloglog.net", "gamma.net", and "logit.net".stargazer( ...,
title = "", style = "default",
covariate.labels = NULL, dep.var.labels = NULL,
decimal.mark = NULL, digit.separate = NULL, digit.separator = NULL,
digits = NULL, digits.extra = NULL, initial.zero = NULL, intercept.top = NULL,
model.names = NULL, model.numbers = NULL,
notes = NULL, notes.align = NULL, notes.label = NULL,
omit = NULL, omit.labels = NULL, omit.yes.no = c("Yes", "No"),
ord.intercepts = FALSE, star.char = NULL, star.cutoffs = NULL,
nobs = TRUE, mean.sd = TRUE, min.max = TRUE, median = FALSE, iqr = FALSE )NA for any element means that stargazer will print the corresponding variable name. In the default case of NULL, variable names are NA for any element means that stargazer will print the corresponding variable name. In the default case of NULL, variab"," will represent decimal commas, while "." means tables will use decimal points."," for a comma separator, "" for a single space separator, and "" for no separation.digits decimal places, is equal to zero."l" for left alignment, "r" for right alignment, and "c" for centering. This argument is not case-sensiomit, and that will be used in a sub-table that indicates whether variables have been omitted from a given model. omit and omit.label"omit".1 and at most {3} that indicates the statistical signficance cutoffs for one, two and three 'stars,' respectively. For elements with NA values, the corresponding 'star' will not be used.stargazer uses cat() to output LaTeX code for the table. To allow for further processing of this output, stargazer also returns the same output invisibly as a character string vector. You can include the produced tables in your paper by inserting stargazer output into your publication's TeX source.stargazer. Carl Jacob Liebersohn, and workshop participants have provided useful comments and suggestions. I am also grateful to Stefan Dimitriadis, Cheng Gao, Mallory James, Melissa Kline, Jeniffer Sheehy-Skeffington, Emily Stephen and Beth Truesdale for helping me identify journals on which stargazer's table styles are based.NULL will use the default settings of the requested style.stargazer. These include xtable by David B. Dahl and apsrtable by Michael Malecki.## create summary statistics table based for 'attitude' data frame
stargazer(attitude)
## estimate and report results of 3 OLS models
m1 <- lm(rating ~ complaints + privileges + learning + raises + critical, data=attitude)
m2 <- lm(rating ~ complaints + privileges + learning, data=attitude)
m3 <- lm(rating ~ learning + critical + advance, data=attitude)
stargazer(m1, m2, m3)Run the code above in your browser using DataLab