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
4
votes
2 answers

stargazer error "length of NULL cannot be changed" when running rchunk in rmarkdown only

I teach econometrics using Rmarkdown on my university's rstudio pro server, running R 3.6.3. Whenever I run an rchunk using stargazer to display regression results, I get a preamble of errors before the table. Here is a copy and paste of the code…
B Haney
  • 41
  • 1
  • 3
4
votes
1 answer

How to add row to Stargazer table to indicate use of fixed effects

I just run my regression including fixed effects, in this case id_school. Next I omitted all the dummy variables from my stargazer tab, so I can save some space. The thing is I want to include a row in my tab in order to report that I used Fixed…
RfSg
  • 41
  • 1
  • 2
4
votes
1 answer

Output several regression tables into multiple pages of a Word document in R

My goal is to create a multi-page Microsoft Word document with many formatted regression table outputs on consecutive pages. Ideally this would be done using R Markdown. I have had some luck making nicely formatted regression tables in word using…
Daniel Yudkin
  • 494
  • 4
  • 11
4
votes
1 answer

R Stat Stargazer - How to drop percentiles in summary table?

I am generating a Latex summary table of the variables in my dataset using the stargazer package. I don't want percentile statistics (25th and 75th) in my table, but disabling the option via iqr = FALSE does not work. Am I doing something wrong or…
DainisZ
  • 465
  • 1
  • 7
  • 8
4
votes
1 answer

how to flip a regression table in stargazer?

I would like to "flip" the row/columns in a regression table. The latest stargazer manuals says that now the flip argument also works with regression tables (previously it only worked with summary stats). However I am unable to make it work. Here…
ℕʘʘḆḽḘ
  • 18,566
  • 34
  • 128
  • 235
4
votes
1 answer

Markov Switching Regression: Standard errors of the msmFit and receiving Latex Output

These are my first two questions to ask on Stackoverflow - hopefully, I ask my questions the right way: First Question: Standard Error I am not entirely sure how the standard errors are specified using the "MSwM" package in R. As my data suffers…
jey-ronimo
  • 71
  • 7
4
votes
1 answer

FELM + Stargazer - Align instrumental variables estimates with OLS

I have an felm object in R that I'm trying to make a table comparing the coefficient estimates from OLS estimation and IV estimation. The code below produces a table with two coefficient estimates, x and `x(fit)` in separate…
Ben
  • 43
  • 4
4
votes
1 answer

R - stargazer 4 star cutoffs

I would like to use 4 star.cutoffs -- c(0.1, 0.05, 0.01, 0.001) -- using stargazer. library(stargazer) m1 = lm(disp ~ mpg, data = mtcars) stargazer(m1, type = 'text', star.cutoffs = c(0.1, 0.05, 0.01, 0.001), digits = 2) It seems that it is…
giac
  • 4,261
  • 5
  • 30
  • 59
4
votes
1 answer

R Stargazer - Manually Specify R^2 And Write to .tex

I am using Stargazer to report the results from some models where I use robust standard errors. The process of calculating these and then feeding the models to Stargazer strips out data such as R^2 and so I need to add it in manually. Doing so,…
Michael Ohlrogge
  • 10,559
  • 5
  • 48
  • 76
4
votes
2 answers

Stargazer producing various latex errors

I am using stargazer to output regression results from r to latex. When I run the output in latex I see the results, but get many Package array errors. Here is my code. In R I use stargazer as follows: stargazer(fe1, fe2, fe3, …
splinter
  • 3,727
  • 8
  • 37
  • 82
4
votes
4 answers

Use lapply for multiple regression with formula changing, not the dataset

I have seen an example of list apply (lapply) that works nicely to take a list of data objects, and return a list of regression output, which we can pass to Stargazer for nicely formatted output. Using stargazer with a list of lm objects created by…
Mark Neal
  • 996
  • 16
  • 52
4
votes
2 answers

Formatting notes in R's stargazer tables

I am using stargazer package to produce (regression output) tables. Everything working miracles until I start editing the notes. First: line breaks are hard, but Bryan suggests a manual solution that is not elegant, but works. Second I need to make…
s_baldur
  • 29,441
  • 4
  • 36
  • 69
4
votes
1 answer

Changing the decimal mark makes stargazer to put an extra space between numbers

I'm using the library stargazer to generate tables in latex (Rstudio/knitr/Sweave). I need to change the decimal separator to comma (",") and the function stargazer() works most of the times. Only when the option summary = false is passed the…
Marcos Vinicius
  • 151
  • 1
  • 10
4
votes
1 answer

stargazer summary.stat relabel column headings

Is it possible to relabel column headings for summary.stats in stargazer? The default labels seem to ignore my preferred labels. Thanks in advance! library(stargazer) stargazer(attitude, column.labels = c("Obs", "P25", "P50", "P75"), …
4
votes
2 answers

Dummy variables in several regressions using Stargazer in R

I am trying to create a table of regressions using the Stargazer package in R. I have several regressions that differ only in the dummy variables. I want it to report the coefficient of the independent variable, the constant, etc., and to say "yes"…
ejn
  • 415
  • 6
  • 16