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
12
votes
1 answer

R: Robust SE's and model diagnostics in stargazer table

I try to put some 2SLS regression outputs generated via ivreg() from the AER package into a Latex document using the stargazer package. I have a couple of problems however that I can't seem to solve myself. I can't figure out on how to insert…
avocado1
  • 253
  • 2
  • 8
12
votes
3 answers

How to display coefficients in scientific notation with stargazer

I want to compare the results of different models (lm, glm, plm, pglm) in a table in R using stargazer or a similar tool. However I can't find a way to display the coefficients in scientific notation. This is kind of a problem because the intercept…
Lukas Stäcker
  • 319
  • 3
  • 10
11
votes
2 answers

Robust Standard Errors in lm() using stargazer()

I have read a lot about the pain of replicate the easy robust option from STATA to R to use robust standard errors. I replicated following approaches: StackExchange and Economic Theory Blog. They work but the problem I face is, if I want to print my…
HAL_71
  • 111
  • 1
  • 1
  • 3
11
votes
2 answers

Stargazer notes line wrap?

Is there a way to get notes in stargazer to wrap lines instead of running off the page? stargazer(fit.1, notes="A very very long note that I would like to put below the table, but currently runs off the side of the page when I compile my document.…
Bryan
  • 1,771
  • 4
  • 17
  • 30
10
votes
2 answers

Potential bug in stargazer omit.labels

There appears to be a bug in version 5.2 of the stargazer package, where the omit.label functionality does not work consistently depending on the order of the included models: library(stargazer) library(ggplot2) as.data.frame(data("midwest")) fit.1…
Bryan
  • 1,771
  • 4
  • 17
  • 30
10
votes
2 answers

Spaces between columns in stargazer type = "html" table output

I`m searching for a method (or alternative) to get spaces between the columns of an stargazer html-table output. As stargazer::stargazer(mtcars, type = "html") results in which is not very good to read... Thank´s in advance! Samuel
sammerk
  • 1,143
  • 1
  • 9
  • 23
10
votes
2 answers

R stargazer, lme4 and lmerTest incompatibility

R novice here. I'm having issues working with lmerTest and stargazer. I was following the tutorial here to get stargazer to work with lme4 in…
Nick Ruiz
  • 1,405
  • 4
  • 18
  • 28
10
votes
1 answer

Making nicely formatted tables in Markdown: knitr not compiling stargazer>html table

I'm trying to embed an output table, nicely formatted by the stargazer function, in a markdown document. I tried embedding the stargazer() in an R code block in the Rmd document: ```{r} library(stargazer) stargazer(cor(attitude),…
LucasMation
  • 2,408
  • 2
  • 22
  • 45
10
votes
2 answers

Displaying p-values instead of SEs in parenthesis

When using the stargazer package, I want to change the value that appears in parentheses under the coefficients. By default, the package will output the standard errors. How can I include the actual p-values in parentheses?
user3799604
  • 101
  • 1
  • 1
  • 3
10
votes
3 answers

Unprecise p-values in Stargazer

I want the same stars for significancies in regression output in stargazer as in the "normal output". I produce data library("stargazer"); library("lmtest"); library("sandwich") set.seed(1234) df <- data.frame(y=1001:1100) df$x <- c(1:70,-100:-71) +…
user3070843
  • 145
  • 2
  • 9
10
votes
2 answers

How do I call stargazer on a list of models?

I just ran a series of models in a nice, flexible way that enforced data-code separation. I had a nice list of formulas and models in my configuration section which I lapply'd over to get a list of model objects. Now I want to display them in…
Ari B. Friedman
  • 71,271
  • 35
  • 175
  • 235
9
votes
2 answers

R stargazer package: eliminate "t =" label from reported test statistics

I am currently preparing a table of regression results with stargazer. In this, I also want to show the t-statistics. For that, I use the following simplified specification, as also shown in…
deca
  • 730
  • 1
  • 8
  • 24
9
votes
2 answers

Appending statistics to coeftest output to include in stargazer tables

I have a glm model for which I use coeftest from the lmtest package to estimate robust standard errors. When I use stargazer to produce regression tables I get the correct results but without the number of observations and other relevant statistics…
cimentadaj
  • 1,414
  • 10
  • 23
9
votes
3 answers

Format model display in texreg or stargazer R as scientific

I just ran a statisitical model and i want it to display the results of the model as a table using stargazer. However, the large numbers are displayed in full. fit2<-lm(A~B,data=C) stargazer(fit2,type="text") With this table as…
Joke O.
  • 515
  • 6
  • 29
8
votes
1 answer

How Can We Display F-Statistic / Degrees of Freedom in two lines

I am using Stargazer to output a regression table with multiple lm models together. The problem is that Stargazer outputs the F-Statistic and degrees of freedom in a single line by default. If you have 3 or 4 models, that means the output in latex…
HoneyBuddha
  • 748
  • 8
  • 15
1
2
3
39 40