Panel Data With R
Panel Data With R
Philip Leifeld
University of Konstanz
Abstract
A recurrent task in applied statistics is the (mostly manual) preparation of model
output for inclusion in LATEX, Microsoft Word, or HTML documents usually with more
than one model presented in a single table along with several goodness-of-fit statistics.
However, statistical models in R have diverse object structures and summary methods,
which makes this process cumbersome. This article first develops a set of guidelines for
converting statistical model output to LATEX and HTML tables, then assesses to what
extent existing packages meet these requirements, and finally presents the texreg package
as a solution that meets all of the criteria set out in the beginning. After providing various
usage examples, a blueprint for writing custom model extensions is proposed.
Keywords: reporting, table, coefficients, regression, R, LATEX, Microsoft Word, HTML, Mark-
down.
information (e.g., nobs() and formula()). Details are provided in Chapter 11 of Venables,
Smith, and R Core Team (2013). Nonetheless, many popular packages have only partially
implemented methods for these generics, and in some cases they do not even provide accessor
functions at all for their coefficients or GOF statistics. Even worse, the model summary
methods are usually structured in idiosyncratic ways and do not lend themselves to easy
parsing of coefficients and GOF statistics.
Modern scientific journals, on the other hand, often require nicely formatted and standardized
model output, usually in the form of coefficient tables for one or more models. In the majority
of applications, these tables show more than one model aligned next to each other with
partially overlapping coefficient names, standard errors in parentheses, and superscripted stars
indicating the significance of model terms. At the bottom of the table, summary statistics
like the number of observations are reported, and GOF measures like AIC or R2 are shown.
Due to the idiosyncratic way model output is currently represented in various classes in R,
designing these kinds of tables for a paper submission requires a substantial amount of time
and patience, especially if more than one model is involved and if there are many model terms.
Copying and pasting coefficients and standard errors one at a time often becomes the default
way of handling this task.
An important tool for typesetting academic papers in many academic fields is LATEX (Lamport
1986). In fact, R and LATEX are closely linked by the Sweave() command in the utils package
(R Core Team 2013), which allows the integration of R commands in LATEX documents and
their execution and evaluation at runtime (Leisch 2002). In spite of this, common approaches
for linking R model output and tables in LATEX include (1) copying and pasting individual
values after every change of the model, (2) custom user-written functions which convert a
specific model into a matrix, (3) the use of sophisticated table-management packages (see
next section), and (4) the inclusion of single models in the form of the model summary
instead of nicely aligned coefficient tables as a second best solution.
Popular alternatives for document preparation include Microsoft Word and the dynamic report
generation R package knitr (Xie 2013a,b,c). Both knitr and Microsoft Word accept HTML
input, and knitr additionally supports Markdown, a simplified HTML-like markup language.
These platforms face similar complications as LATEX and Sweave() regarding the preparation
of regression tables for multiple statistical models.
The ideal way to prepare R model output for LATEX and HTML tables would be a generic func-
tion which would directly output LATEX or HTML tables and for which custom methods for
any model type could be written as extensions. While several attempts already exist (see Sec-
tion 3), all of them have limitations. This article introduces the texreg package (Leifeld 2013),
which closes this gap and provides a unified framework for typesetting LATEX and HTML ta-
bles for various statistical models in R. Package texreg is available from the Comprehensive
R Archive Network (CRAN) at http://CRAN.R-project.org/package=texreg.
The remainder of this article is structured as follows: Section 2 sets out a number of require-
ments which must be met. In the light of these requirements, Section 3 compares texreg to
other R packages and functions which were designed for similar purposes. Section 4 describes
the way how texreg works and how its functions and classes are related. After providing
several examples and illustrating the options of the texreg(), htmlreg(), and screenreg()
functions (Section 5), Section 6 describes how new extensions can be implemented.
Journal of Statistical Software 3
2. Requirements
The design of the texreg package tries to accomplish six goals: it should be capable of dealing
with several models in a single table; it should be easily extensible by package writers and
users; it should provide options for using the available space in an optimal way; it should
take advantage of advanced layout capabilities in LATEX and HTML; it should take care of
journal- or model-specific habits or best practices; and it should find an optimal balance of
customizability and usability. These requirements are elaborated in the following paragraphs.
be possible to print standard errors right beside the coefficients instead of aligning them
vertically. In texreg, this is achieved with the single.row argument.
If tables grow too large, other measures might prove useful: removing table margins, setting
the table in script size, or setting custom float positions (for LATEX tables). Very wide tables
should be rotated by 90 degrees using the sidewaystable environment in the LATEX package
rotating (Rahtz and Fairbairns 2008) in order to use the available space in an optimal way.
The user should also be able to set the table caption and label, decide whether the table
should be in a float environment (for LATEX tables), align the table horizontally on the page,
and set the position of the caption. The texreg package provides arguments to control all of
these aspects.
screenreg
htmlreg
texreg
Argument Short description
l Model or list of models
file Divert output to a file
single.row Print coefs and standard errors in the same row?
stars Threshold levels for significance stars
custom.model.names Set the names of the models
custom.coef.names Replace the names of the model terms
custom.gof.names Replace the names of the GOF statistics
custom.note Replace the default significance legend
digits Number of decimal places
leading.zero Print leading zeroes?
symbol Dot symbol denoting a fourth significance level
override.coef Replace coefficients by custom vectors
override.se Replace standard errors by custom vectors
override.pval Replace p values by custom vectors
omit.coef Remove rows using a regular expression
reorder.coef Provide a custom order for the model terms
reorder.gof Provide a custom order for the GOF statistics
return.string Return the table as a character vector?
ci.force Convert standard errors to confidence intervals
ci.level Confidence level for CI conversion
ci.star Print star when 0 is not contained in the CI
bold p value below which coefficients are bolded
center Horizontal alignment on the page
caption Set the caption of the table
caption.above Should the caption be placed above the table?
label Set the label of the table
booktabs Use the booktabs package (Fear 2005)?
dcolumn Use the dcolumn package (Carlisle 2001)?
sideways Use sidewaystable (Rahtz and Fairbairns 2008)?
use.packages Print the \usepackage{} declarations?
table Wrap tabular in a table environment?
no.margin Remove margins between columns to save space
scriptsize Use smaller font size to save space
float.pos Specify floating position of the table
star.symbol Change the significance symbol
inline.css Use CSS in the text rather than the header
doctype Include the DOCTYPE declaration?
html.tag Include the <html> tag?
head.tag Include the <head> tag?
body.tag Include the <body> tag?
Continued on next page
6 texreg: Conversion of R Model Output to LATEX and HTML
screenreg
htmlreg
texreg
Argument Short description
column.spacing Number of spaces between columns
outer.rule Line type for the outer rule
inner.rule Line type for the inner rule
... Additional arguments for the extract functions
On the other hand, users should not be required to learn the meaning of all arguments before
they can typeset their first table. The default arguments should serve the needs of occasional
users. Moreover, adjusting tables based on a complex set of arguments should be facilitated
by printing tables to the R console before actually generating the LATEX or HTML output. If
this screen representation of the table is nicely formatted and aligned using spaces and rules,
it can also serve as an occasional replacement for the generic summary() method for easy
model comparison as part of the statistical modeling workflow.
The texreg package tries to balance these needs for customizability and usability by providing
many arguments for layout customization (see Table 1 for a list of arguments), using sensible
default values for occasional users, and providing a function for on-screen display of tables
for easy model comparison and layout adjustment.
The apsrtable package (version 0.8-8) has custom functions for coxph, gee, glm, lm,
lrm, negbxin, svyglm and tobit objects, but it does not feature any multilevel models
or network models. The memisc package (version 0.95-38) features aftreg, betareg, clm,
dynlm, glm, hurdle, ivreg, lm, lmer, mer, multinom, phreg, polr, tobit,
simex, survreg, weibreg, and zeroinfl models but cannot handle any network models
and recent versions of lme4 multilevel models (Bates et al. 2013).
The stargazer package (version 3.0.1) has built-in functions for betareg, clm, clogit,
coxph, ergm, gam, gee, glm, glmerMod, gls, hurdle, ivreg, lm, lmerMod, lmrob,
multinom, nlmerMod, plm, pmg, polr, rlm, survreg, svyglm, tobit, and zeroinfl
objects as well as several Zelig adaptations (Owen et al. 2013), but it does not support custom
user extensions.
texreg (version 1.30), in contrast, can deal with all of the above model types (that is, the union
of all three packages, except for some Zelig models), is extensible, and offers additional built-
in functions for the following model classes: brglm, btergm,coxph.penal, gmm, lme,
lme4, lnam, maBina, nlme, rem.dyad, rq, sclm, stergm, systemfit, texreg and
zelig (logit and relogit) objects. Table 2 gives an overview of currently implemented
model types.
texreg supports Microsoft Word, HTML, Markdown, and knitr whereas the other packages
(except for xtable) are restricted to LATEX output. apsrtable has an option for Sweave in-
tegration, which does not require any argument in texreg. In the memisc package and in
texreg, the booktabs and dcolumn LATEX packages for table layout (see Section 2.4) can be
used, which is not available in apsrtable (and only dcolumn is supported in stargazer).
While apsrtable and texreg allow for custom GOF measures, memisc and stargazer only
feature a set of hardcoded statistics. Apart from this, all packages presented here are signifi-
cantly less flexible than texreg regarding the utilization of space (Section 2.3), layout options
(Section 2.4), outlet- or model-specific requirements (Section 2.5), and customizability (Sec-
tion 2.6).
There are various internal helper functions, which are called from each of these main functions
for purposes of pre- and postprocessing. Moreover, there is a class definition for texreg ob-
jects, and a generic extract() function along with its methods for various statistical models.
Figure 1 illustrates the procedure following a call of one of the main functions. Details about
each step are provided below.
values (numeric), their names (character), and dummy variables indicating whether it makes
sense for the GOF value to have several decimal places (logical); for example, one would
not want the number of observations to have any decimal places.
As some types of statistical models report confidence intervals rather than standard errors
and p values, the texreg class definition can alternatively store lower and upper bounds
of confidence intervals instead of standard errors and p values. Which slots of the class are
used depends on the extract() method for the specific model. The texreg package checks
whether standard errors are present in the texreg object and use either standard errors or
confidence intervals depending on availability.
The class contains validation rules which make sure that the four coefficient vectors all have
the same length and that the three GOF vectors also all have the same length. There are
several exceptions to this rule: the p values, the confidence intervals, and the decimal-place
vector are optional and may also have a length of zero.
The texreg class definition was written to facilitate the handling of the relevant pieces of in-
formation. Handing over lists of texreg objects between functions is more user-friendly than
handing over lists of nested lists of vectors. texreg objects are created by the extract()
methods and handed over to the texreg function (see Section 4.1).
Renaming the coefficients or GOF names may lead to duplicate entries. These duplicate rows
must be conflated. For example, there may be one row with the name duration (with the
duration variable only existing in the first model) and another row with the name time
(with the time variable only existing in the second model). After renaming both rows to
either of the two names, the two rows must be conflated such that there is only one row left
with the duration coefficient in the first cell and the time coefficient in the second cell.
Rearranging the matrix also entails checking for rows with duplicate names which are in fact
not complementary and rearranging them only by presenting the fullest rows first. Further-
more, there may be more than two duplicate rows with the same name and other complex
configurations which are handled by texreg. Finally, rearranged rows are reordered to ensure
that models appear as compact as possible in the table.
5. Examples
This section gives some practical examples. All data and model formulae were taken from
the help files of the respective models and their packages for the sake of replicability.
R> ctl <- c(4.17, 5.58, 5.18, 6.11, 4.50, 4.61, 5.17, 4.53, 5.33, 5.14)
R> trt <- c(4.81, 4.17, 4.41, 3.59, 5.87, 3.83, 6.03, 4.89, 4.32, 4.69)
R> group <- gl(2, 10, 20, labels = c("Ctl", "Trt"))
R> weight <- c(ctl, trt)
R> m1 <- lm(weight ~ group)
R> m2 <- lm(weight ~ group - 1)
12 texreg: Conversion of R Model Output to LATEX and HTML
The coefficients, standard errors, p values etc. of model 2 can be displayed as follows:
R> summary(m2)
Call:
lm(formula = weight ~ group - 1)
Residuals:
Min 1Q Median 3Q Max
-1.0710 -0.4938 0.0685 0.2462 1.3690
Coefficients:
Estimate Std. Error t value Pr(>|t|)
groupCtl 5.0320 0.2202 22.85 9.55e-15 ***
groupTrt 4.6610 0.2202 21.16 3.62e-14 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Next, load the texreg package. The output of the two models can be converted into a plain
text table using the following command. The text output is shown below the R code.
R> library("texreg")
R> screenreg(list(m1, m2))
=================================
Model 1 Model 2
---------------------------------
(Intercept) 5.03 ***
(0.22)
groupTrt -0.37 4.66 ***
(0.31) (0.22)
groupCtl 5.03 ***
(0.22)
---------------------------------
R^2 0.07 0.98
Adj. R^2 0.02 0.98
Num. obs. 20 20
=================================
*** p < 0.001, ** p < 0.01, * p < 0.05
Model 1 Model 2
(Intercept) 5.03
(0.22)
groupTrt 0.37 4.66
(0.31) (0.22)
groupCtl 5.03
(0.22)
R2 0.07 0.98
Adj. R2 0.02 0.98
Num. obs. 20 20
*** p < 0.001, ** p < 0.01, * p < 0.05
Model 1 Model 2
groupTrt .371 4.661
(.311) (.220)
groupCtl 5.032
(.220)
R2 .073 .982
Adj. R2 .022 .980
Num. obs. 20 20
Coefficients with p < 0.05 in bold.
\end{center}
\end{table}
The caption, label, and float position of the table are set explicitly. The dcolumn package is
used to align coefficients at their decimal separators, and the booktabs package is employed
to create professional horizontal rules. These arguments can be omitted if the two packages
are not available (in this case, top, mid and bottom rules are replaced by conventional hor-
izontal rules, and numeric values are horizontally aligned at the center of the column). The
\usepackage{} declarations for the two packages are suppressed because the code has to be
processed by Sweave().
In order to omit the \begin{table} and \end{table} as well as the \begin{center} and
\end{center} code, the table and center arguments can be used. If table = FALSE and
center = FALSE are set, only the tabular environment is printed, not the table and center
environments. In effect, the resulting table would be printed in-line in the text. Another
reason for skipping the table environment could be to finetune the environment manually.
Alternatively, the argument sideways = TRUE can be used to rotate the table by 90 degrees
using the sidewaystable environment in the rotating package (Rahtz and Fairbairns 2008)
instead of the default table environment.
The table can be printed to the R console later using the cat() function.
The example presented above introduced several additional arguments: bold = 0.05 formats
all coefficients with p values < 0.05 in bold; stars = 0 means that only coefficients with
p values < 0 are decorated with a star, which effectively suppresses all significance stars
in the table because negative p values are not possible. Note that bold formatting cannot
Journal of Statistical Software 15
be used in combination with the dcolumn argument, so decimal mark alignment is switched
off in Table 4. The booktabs argument was also left out to show the difference between
conventional horizontal lines in Table 4 and booktabs rules in Table 3. The custom.note =
"Coefficients with $p < 0.05$ in bold." argument changes the significance note below
the table. The digits = 3 argument sets three decimal places, leading.zero = FALSE
suppresses leading zeroes before the decimal separator, and omit.coef = "Inter" causes
all rows containing the regular expression Inter to be skipped from the output (here: the
(Intercept) term). Note that more complex regular expressions are possible; for example,
omit.coef = "(Trt)|(Ctl)" would remove all rows matching either Trt or Ctl.
R> library("nlme")
R> m3 <- gls(follicles ~ sin(2 * pi * Time) + cos(2 * pi * Time), Ovary,
+ correlation = corAR1(form = ~ 1 | Mare))
R> table <- texreg(list(m1, m3), custom.coef.names = c(
+ "Intercept",
+ "Control",
+ "$\\sin(2 \\cdot \\pi \\cdot \\mbox{time})$",
+ "$\\cos(2 \\cdot \\pi \\cdot \\mbox{time})$"),
+ custom.model.names = c("OLS model", "GLS model"),
+ reorder.coef = c(1, 3, 4, 2),
+ caption = "Multiple model types, custom names, and single row.",
+ label = "tab:5", stars = c(0.01, 0.001), dcolumn = TRUE,
+ booktabs = TRUE, use.packages = FALSE, single.row = TRUE,
+ include.adjrs = FALSE, include.bic = FALSE)
Several interesting things can be noted. First, the custom.coef.names argument was used to
relabel the coefficient rows. If there were repetitions of coefficient names in the
16 texreg: Conversion of R Model Output to LATEX and HTML
custom.coef.names vector, texreg would try to conflate rows with identical names. In the
case shown here, the two models are only matched on the intercept and the number of obser-
vations because all other rows have unique names.
Second, the custom names include LATEX code. Within the code, in-line math code is allowed.
LATEX commands have to be marked by an additional backslash as an escape character, e.g.,
\\pi instead of \pi. Text within math blocks can be included in \mbox{} commands.
Third, custom names were also provided for the models. Using the custom.model.names
argument, the default Model 1, Model 2 etc. are replaced by OLS model and GLS
model in this case.
Fourth, the order of the coefficients was changed using the reorder.coef argument. The
Control term was moved to the last position in the table.
Fifth, two significance levels (and, accordingly, a maximum of two stars) are used in the table.
The stars argument takes at most four values, and when four values are specified, the lowest
significance level (usually 0.05 p < 0.1) is denoted by the character specified in the symbol
argument (by default a centered dot).
Sixth, the single.row argument causes the table to consume less vertical and more horizontal
space because the standard errors are inserted right after the coefficients.
And seventh, the include.adjrs and include.bic arguments suppress the inclusion of the
adjusted R2 and BIC GOF statistics. These are model-specific arguments, which are defined in
the extract() methods for lm and gls. More information about model-specific arguments
can be found on the help page of the generic extract() function.
R> library("sandwich")
R> library("lmtest")
R> hc <- vcovHC(m2)
R> ct <- coeftest(m2, vcov = hc)
R> se <- ct[, 2]
R> pval <- ct[, 4]
R> texreg(m2, override.se = se, override.pvalues = pval)
The standard errors and p values are first extracted from the hc matrix and then handed over
to the texreg() function using the override.se and override.pvalues arguments.
by adding the file argument. This is especially handy because HTML files can be read by
Microsoft Word if a .doc file extension is added.
If the table is exported to a file, it is advisable to include the full header information of
the HTML file to make sure that Microsoft Word or other programs can parse the file. An
example:
The doctype argument adds the document type declaration to the first line of the HTML
document. The inline.css = FALSE argument causes the function to write cascading style
sheets (the table formatting code) into the <head> tag rather than into the table code. The
head.tag argument actually adds such a <head> tag to the document. Similarly, the body.tag
argument wraps the table in a <body> tag, and the html.tag argument encloses boththe
<head> and the <body> tagin an <html> tag. In other words, these arguments create a
whole HTML document rather than merely the table code. The resulting file can be read by
Microsoft Word because the HTML file has a .doc extension.
The htmlreg() function also works well with the knitr package for dynamic report generation
(Xie 2013c). The default arguments are compatible with knitr and HTML. In addition to
HTML, knitr is also compatible with Markdown, a simplified markup language. texreg can
work with Markdown as well, but an additional argument should be provided to make it work:
The star.symbol = "\\*" argument makes sure that Markdown does not interpret the sig-
nificance stars as special Markdown syntax. The additional (and optional) center = TRUE
argument centers the table horizontally on the page.
is used in conjunction with confidence intervals, bold values greater than 0 cause texreg to
print estimates in bold where the ci.test value is outside the confidence interval, regardless
of the actual value of the bold argument (see Table 6):
Arguments Description
coef.names The names of the independent variables or coefficients.
coef The actual coefficients. These values must be in the same order as the
coef.names.
se (optional ) The standard errors, which will later be put in parentheses.
These values must be in the same order as the coef.names.
pvalues (optional ) The p values. They are used to add significance stars. These
values must be in the same order as the coef.names.
ci.low (optional ) Lower bounds of the confidence intervals. An alternative to the
se slot.
ci.up (optional ) Upper bounds of the confidence intervals. An alternative to the
se slot.
gof.names The names of some GOF statistics to be added to the table. For example,
the extract() method for lm objects extracts R2 , Adj. R2 and Num.
obs.
gof A vector of GOF statistics to be added to the table. These values must
be in the same order as the gof.names.
gof.decimal (optional ) A vector of logical (Boolean) values indicating for every GOF
value whether the value should have decimal places in the output table.
This is useful to avoid decimal places for the number of observations and
similar count variables.
method for ergm objects provides this information for ergm objects, etc.
To get an overview of the model type one is interested in, it is recommended to fit a model and
examine the resulting object using the str(model) command, the summary(model) command,
the summary(model)$coef command, and related approaches.
Any new extract function should retrieve the data shown in Table 7 from a statistical model.
Note that pvalues and gof.decimal are optional and can be omitted. Either the se slot or
the ci.low and ci.up slots must contain values.
Once these data have been located and extracted, a texreg object can be created and
returned to the texreg() function. The following code provides a simple example for lm
objects:
First, the names of the model terms, the coefficient values, the standard errors, and the
p values are extracted from the model or its summary (they can be computed if not available).
Second, various summary statistics and GOF measures are extracted from the model object
(in this case: R2 , Adj. R2 and Num. obs.) and saved in a numeric vector.
Third, the names of these statistics should be defined in a character vector. All vectors so
far should have the same length.
Fourth, a new texreg object should be created, with the information extracted before in-
cluded as arguments.
Fifth, the texreg object must be returned. This is necessary for the texreg() function to
continue processing the model.
20 texreg: Conversion of R Model Output to LATEX and HTML
After writing a custom function, the function has to be registered as a method for the generic
extract() function. In the above example, this can be achieved with the following code:
Assume, for instance, that an extension for clogit objects called extract.clogit() is
written. The clogit() function (and the corresponding class definition) can be found in
the survival package (Therneau and Grambsch 2000; Therneau 2012). Then the code above
should be changed as follows:
After executing the definition of the function and the adjusted setMethod() command, texreg
can be used with clogit models.
In addition to the simple example code shown above, this function has several arguments,
which can be used to include or exclude various GOF or summary statistics. Additional argu-
ments can also be used in other contexts. For example, the user can decide whether random
effect variances should be included in texreg tables of mer objects (from the lme4 package,
see Bates et al. 2013) by setting the include.variance argument. Similarly, the output of
stergm models (Hunter, Handcock, Butts, Goodreau, and Morris 2008; Handcock, Hunter,
Butts, Goodreau, Krivitsky, and Morris 2012) or hurdle or zeroinfl models (Zeileis,
Kleiber, and Jackman 2008) can be typeset in two columns using the beside argument.
New extract functions and methods can be easily used locally. Once they work well, submis-
sion of new extract functions to the online forum of texreg is encouraged.
Existing functions can also be manipulated and overwritten locally in order to change the
GOF statistics block.
Acknowledgments
The author would like to thank Oleg Badunenko, Tom Carsey, S. Q. Chang, Skyler Cranmer,
Sebastian Daza, Christopher Gandrud, Lena Koerber, Johannes Kutsam, Fabrice Le Lec,
Florian Oswald, Markus Riester, Francesco Sarracino, Matthieu Stigler, Sebastian Ugbaje,
Gabor Uhrin, Antoine Vernet, Yanghao Wang, and Yihui Xie for their valuable input and
ideas.
References
Bates D, Maechler M, Bolker B, Walker S (2013). lme4: Linear mixed-effects models using
Eigen and S4. R package version 1.0-4, URL http://CRAN.R-project.org/package=lme4.
22 texreg: Conversion of R Model Output to LATEX and HTML
Carlisle D (2001). The dcolumn Package. LATEX package version 1.06, URL http://www.
CTAN.org/pkg/dcolumn/.
Dahl DB (2012). xtable: Export Tables to LATEX or HTML. R package version 1.7-0, URL
http://CRAN.R-project.org/package=xtable.
Elff M (2012). memisc: Tools for Management of Survey Data, Graphics, Programming,
Statistics, and Simulation. R package version 0.95-38, URL http://CRAN.R-project.
org/package=memisc.
Fear S (2005). booktabs: Publication Quality Tables in LATEX. LATEX package version 1.61803,
URL http://www.CTAN.org/pkg/booktabs/.
Handcock MS, Hunter DR, Butts CT, Goodreau SM, Krivitsky PN, Morris M (2012). ergm:
Fit, Simulate and Diagnose Exponential-Family Models for Networks. R package version
3.0-999, URL http://CRAN.R-project.org/package=ergm.
Hlavac M (2013). stargazer: LATEX Code for Well-Formatted Regression and Summary
Statistics Tables. R package version 3.0.1, URL http://CRAN.R-project.org/package=
stargazer.
Hunter DR, Handcock MS, Butts CT, Goodreau SM, Morris M (2008). ergm: A Package to
Fit, Simulate and Diagnose Exponential-Family Models for Networks. Journal of Statistical
Software, 24(3), 129. URL http://www.jstatsoft.org/v24/i03/.
Lamport L (1986). LATEX Users Guide and Document Reference Manual. Addison-Wesley
Publishing Company, Reading, Massachusetts.
Leifeld P (2013). texreg: Conversion of Statistical Model Output in R to LATEX and HTML
Tables. R package version 1.30, URL http://CRAN.R-project.org/package=texreg.
Leisch F (2002). Sweave: Dynamic Generation of Statistical Reports Using Literate Data
Analysis. In W Hardle, B Ronz (eds.), COMPSTAT 2002 Proceedings in Computational
Statistics, pp. 575580. Physica-Verlag, Heidelberg.
Maechler M, others (2012). sfsmisc: Utilities from Seminar fur Statistik ETH Zurich. R
package version 1.0-21, URL http://CRAN.R-project.org/package=sfsmisc.
Malecki M (2012). apsrtable: Model-Output Formatter for Social Science. R package version
0.8-8, URL http://CRAN.R-project.org/package=apsrtable.
Journal of Statistical Software 23
Owen M, Imai K, King G, Lau O (2013). Zelig: Everyones Statistical Software. R package
version 4.1-3, URL http://CRAN.R-project.org/package=Zelig.
Rahtz S, Fairbairns R (2008). rotating: A Package for Rotated Objects in LATEX. LATEX
package version 2.16b, URL http://www.CTAN.org/pkg/rotating.
R Core Team (2013). R: A Language and Environment for Statistical Computing. R Founda-
tion for Statistical Computing, Vienna, Austria. URL http://www.R-project.org/.
Therneau TM, Grambsch PM (2000). Modeling Survival Data: Extending the Cox Model.
Springer-Verlag, New York.
Venables WN, Smith DM, R Core Team (2013). An Introduction to R. Notes on R: A Pro-
gramming Environment for Data Analysis and Graphics. URL http://CRAN.R-project.
org/doc/manuals/R-intro.html.
Xie Y (2013a). Dynamic Documents with R and knitr. Chapman and Hall/CRC.
Zeileis A (2004). Econometric Computing with HC and HAC Covariance Matrix Estimators.
Journal of Statistical Software, 11(10), 117. URL http://www.jstatsoft.org/v11/i10/.
Zeileis A, Kleiber C, Jackman S (2008). Regression Models for Count Data in R. Journal
of Statistical Software, 27(8), 125. URL http://www.jstatsoft.org/v27/i08/.
24 texreg: Conversion of R Model Output to LATEX and HTML
Affiliation:
Philip Leifeld
University of Konstanz
Box 216
78457 Konstanz, Germany
E-mail: [email protected]
URL: http://www.philipleifeld.de