Questions tagged [stargazer]

Stargazer is an R package that produces LaTeX code for well-formatted tables that hold regression analysis results from several models side-by-side, as well as summary statistics.

Stargazer is an package that produces code for well-formatted tables that hold regression analysis results from several models side-by-side, as well as summary statistics.

Repositories

Vignettes

588 questions
5
votes
3 answers

Order variables with interaction in stargazer regression output

I have the following regressions: fit1 <- lm(y ~ x1, data = data) fit2 <- lm(y ~ x1 + x2, data = data) fit3 <- lm(y ~ x3 * x1, data = data) I want in the output the explanatory variables to be order (x1, x2, x3 and finally the interaction). I try…
user2246905
  • 1,029
  • 1
  • 12
  • 31
5
votes
1 answer

Resize stargarzer table when type=HTML for ioslides in RStudio

I am new to using R Markdown to create slides presentations within RStudio. I haven't been able to find anything online that addresses my specific question. This was close, but I'm having the opposite problem, i.e. I am tyring to shrink HTML…
Scott Murff
  • 128
  • 8
5
votes
2 answers

remove \begin{tabular} from Stargazer .tex output

Is there a simple way to automatically remove the \begin{tabular}{@{\extracolsep{5pt}}lc} and \end{tabular} lines at the beginning and end of a Stargazer LaTeX output? Indeed, I just need the inside LaTeX code and removing those lines manually…
ℕʘʘḆḽḘ
  • 18,566
  • 34
  • 128
  • 235
5
votes
0 answers

Stargazer organize summary statistics by group (r)

When stargazer is passed a data.table object, it produces beautiful summary statistic tables, organized with each variable as one row, and each statistic as a column. Statistic N Mean SD Var1 10 25 2 Var2 15 35 4 Is there a…
gannawag
  • 225
  • 2
  • 12
5
votes
2 answers

Stargazer R Package: Position of Title in Latex Table

I am using the stargazer Package in r to produce summary statistics for latex documents. However, the function produces latex code with the title (caption) on top of the table. Is is there an easy way to put the title below the…
Andreas Dibiasi
  • 261
  • 3
  • 10
5
votes
1 answer

Short captions for LaTeX tables with stargazer

In LaTeX, a short captions (that will appear in the List of Figures) can be made with the following code: \caption[Short caption.]{Long caption.} With stargazer in R I tried this: stargazer(mtcars, summary = FALSE, title="[Short caption]Long…
luciano
  • 13,158
  • 36
  • 90
  • 130
5
votes
1 answer

Understanding an error returned by stargazer in R

I am trying to reproduce a simplified version of the R output described in this posting. More generally, this is related to my attempt to use the stargazer() function to generate a LaTex table from an lmer object. Following the author's posting,…
Steve'sConnect
  • 145
  • 2
  • 8
5
votes
2 answers

Stargazer: model names instead of numbers?

Is it possible to change the default of stargazer so that it displays some custom model shortcut instead of the model number? I found the model.number parameter but this is a on-/off parameter. Ideally, I could pass something like…
Karsten W.
  • 17,826
  • 11
  • 69
  • 103
5
votes
1 answer

Extending Stargazer

I've long used apsrtable to quickly create model comparison tables, but I find it somewhat unattractive and clunky, so my dissertation tables were hand-coded tables with \Sexpr expressions. I was excited to find stargazer, but disappointed that some…
gregmacfarlane
  • 2,121
  • 3
  • 24
  • 53
5
votes
1 answer

Rename variable names in stargazer latex table

I have made this model selection table: lm_mtcars <- lm(mpg ~ drat + hp + wt, mtcars) library(MuMIn) mod_sel_lm_mtcars <- (mod.sel(lm_mtcars)) mod_sel_lm_mtcars Model selection table (Intrc) drat hp wt df logLik AICc delta…
luciano
  • 13,158
  • 36
  • 90
  • 130
5
votes
1 answer

Stop table disappearing off end of page with stargazer

I have a .Rnw file that looks like this: \documentclass[a4paper,11pt]{article} \begin{document} \title{} \author{me} \date{\today} \maketitle \section{Header} <>= stargazer(rbind(mtcars, mtcars, mtcars), summary =…
luciano
  • 13,158
  • 36
  • 90
  • 130
5
votes
1 answer

Omit floating and document environments from stargazer regression table output

I just started using the stargazer package to make regression tables in R, but can't figure out how to write table output to a .tex file without either floating or document environments (and preamble in the case of the document environment). That…
Richard Herron
  • 9,760
  • 12
  • 69
  • 116
4
votes
1 answer

In the Stargazer package in R, how can one add a line separator for the resulting output table?

I have two regressions to report in stargazer in R, with add.lines() adding a predicted table at the end. My table currently looks like: but I want to add a line right below "Predicted Values on x Values", so that it is its own row like we have in…
user321627
  • 2,350
  • 4
  • 20
  • 43
4
votes
1 answer

stargazer: line break in F Statistic / df

when creating a table with stargazer, I would like to add a new line befor the degrees of freedom (s. below: before the opening bracket). Could someone help me with the correct call, I couldn't find it in the package documentation. (Apologies for…
user456789
  • 331
  • 1
  • 3
  • 9
4
votes
1 answer

Format data to create neat table in R markdown using kable

I want to create a neat table in R markdown using the kable package, but my data need to be transformed. My data look like this: category <- c('population', 'population', 'sample', 'sample', 'population', 'population', 'sample', 'sample') gender <-…
johnny
  • 423
  • 3
  • 10