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
, plm
, betareg
, gee
, gam
, polr
, survreg
, coxph
, tobit
(AER), ivreg
(AER), zeroinfl
(pscl), hurdle
(pscl), multinom
(nnet) 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"
, "probit.net"
and "logit.net"
.stargazer( ...,
title = "", style = "default", summary = TRUE,
covariate.labels = NULL, dep.var.labels = NULL,
align = FALSE, 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.stat = NULL, omit.yes.no = c("Yes", "No"),
ord.intercepts = FALSE, star.char = NULL, star.cutoffs = NULL, zero.component = FALSE,
nobs = TRUE, mean.sd = TRUE, min.max = TRUE, median = FALSE, iqr = FALSE )
FALSE
, the package will instead output the contents of the data frame.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\usepackage{dcolumn}
in LaTeX preamble.","
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.[*]
, [**]
, a"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 = c("ll","rsq")
will omit the log-likelihood and the R squared statistics. See the "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 nzero
component of zeroinfl
and hurdle
estimation results. If FALSE
, the count
component is displayed.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.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)
## list the content of the data frame 'attitude'
stargazer(attitude, summary=FALSE)
## 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