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 betareg
(betareg), coxph
(survival), clm
(ordinal), clogit
(survival), ergm
(ergm), gam
(mgcv), gee
(gee), glm
(stats), glmer
(lme4), gls
(nlme), hurdle
(pscl), ivreg
(AER), lm
(stats), lmer
(lme4), lmrob
(robustbase), multinom
(nnet), nlmer
(lme4), plm
(plm), pmg
(plm), polr
(MASS), rlm
(MASS), svyglm
(survey), survreg
(survival), tobit
(AER), zeroinfl
(pscl), 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,
coef = NULL, se = NULL, t = NULL, p = NULL,
t.auto = TRUE, p.auto = TRUE,
decimal.mark = NULL, digit.separate = NULL, digit.separator = NULL,
digits = NULL, digits.extra = NULL, initial.zero = NULL, intercept.top = NULL,
label = "", 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,
summary.logical = TRUE,
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.NULL
vector indicates that, coef
.coef
and se
, test statistics are matched to covariates by their element names.stargazer
should calculate the test statistics (i.e., the z-scores) automatically if standard errors are supplied by the user (from argument se
). If FALSE
, the package will use stargazer
should calculate the p-values, using the standard normal distribution, standard errors are supplied by the user (from argument se
). If FALSE
, the package will use mode","
will represent decimal commas, while "."
means tables will use decimal points.","
for a comma separator, ""
for a single space separator, and ""
for no separation.NA
indicates that no rounding should be done at all, and that all available decimal places should be reported.digits
decimal places, is equal to zero.\label{}
TeX markers for the tables.[*]
, [**]
, 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.FALSE
) and 1 (TRUE
).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
.## create summary statistics table based for 'attitude' data frame
stargazer(attitude)
## list the content of the data frame 'attitude'
stargazer(attitude, summary=FALSE)
## 2 OLS models
linear.1 <- lm(rating ~ complaints + privileges + learning + raises + critical, data=attitude)
linear.2 <- lm(rating ~ complaints + privileges + learning, data=attitude)
## create an indicator dependent variable, and run a probit model
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")
Run the code above in your browser using DataLab