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

Display p-values under 0.1 in r stargazer

I have regression coefficients at p-value 0.06. The output table of stargazer does not display the dot (.) signalling p-values under 0.1. How do I make stargazer to signal p-values below 0.1 in the output table? *It would be hard to find or create a…
NBK
  • 887
  • 9
  • 20
8
votes
1 answer

Omit output of a factor variable in stargazer?

If I'm running a fixed effects model in r using lm and the factor command, how can I suppress the factor variable coefficients in a stargazer model? i.e. my model is: m1<-lm(GDP~pop_growth + factor(city)) and I want to report findings with only an…
Mackenzie
  • 91
  • 1
  • 3
8
votes
2 answers

Stargazer output is code, not a table

I am trying to use the package stargazer in RStudio to generate a summary table of my data. For some reason, I am not able to view the table in the output when I use either the html or latex code, but I can see it when I output as text. An…
Dorton
  • 185
  • 1
  • 2
  • 11
8
votes
2 answers

How can I omit the regression intercept from my results table in stargazer

I run a regression of the type model <- lm(y~x1+x2+x3, weights = wei, data=data1) and then create my table ,t <- stargazer(model, omit="x2", omit.labels="x1") but I haven't found a way to omit the intercept results from the table. I need it in the…
Felipe Alvarenga
  • 2,572
  • 1
  • 17
  • 36
8
votes
2 answers

Stargazer change rownames

I wanted to change the rownames, but the function covariate.labels does not work here like it does using the normal lm function with stargazer. When I try covariate.labels in the below function it changes the column names of the coefficients…
Chevaldamour
  • 89
  • 1
  • 3
8
votes
1 answer

Using stargazer with a list of lm objects created by lapply-ing over a split data.frame

I'm trying to create a stargazer table for a set of regressions, where I ran each regression on a subset of my data. The natural way to do this, I would think, is to use split to create a list of data.frames from my data, create a list of lm…
Jake Fisher
  • 3,220
  • 3
  • 26
  • 39
8
votes
1 answer

Dependent variable labels in stargazer tables

When passing a character vector to the dep.var.labels argument to stargazer, I expected the dependent variable labels to consist of this vector. But this only seems to happen when the models are of different types. data(mtcars) m0 <- lm(mpg ~ hp,…
ajerneck
  • 751
  • 1
  • 7
  • 19
7
votes
3 answers

Is there anyway to export feols model using stargazer in R?

I ran a bunch of models using feols model (fixest package), but I have trouble exporting my model into a table using stargazer. Any suggestions on how I can do that? It does seem like I can use etable function, but I want to use stargazer because I…
Dr. Yutam
  • 89
  • 1
  • 2
7
votes
1 answer

Using stargazer to output Latex code from linearmodels model fit

I need linearmodels for 2 way clustering, that's not properly implemented in statsmodels. I was wondering if it was possible to use the stargazer python library with the linearmodels package, rather than with statsmodels. But when I plug the model…
LORDER
  • 71
  • 2
7
votes
1 answer

Show Akaike Criteria in Stargazer

I have two linear models created with lm that I would like to compare with a table in the stargazer package. For the most part, I like the results I'm getting. But the Akaike Information Criterion is not showing. The docs say I can pass "aic" in the…
Andy Carlson
  • 3,633
  • 24
  • 43
7
votes
2 answers

How to change column names in stargazer when printing data frames?

I'm trying to output a data frame in latex using the stargazer package. I want the column names to include latex code, but stargazer does not allow latex code inside data frame names. I've also tried to use the column.labels argument, but this…
Lucas De Abreu Maia
  • 598
  • 2
  • 6
  • 19
7
votes
2 answers

Rmarkdown of Stargazer: LaTeX Error if align is set to TRUE

I am working with stargazer and I want to produce a LaTeX output for a simple lm object. The problem is that I cannot set align = TRUE without getting an error. LaTeX Error: \caption outside float. I checked it and what the message says is wrong.…
Alex
  • 4,925
  • 2
  • 32
  • 48
7
votes
1 answer

Custom model names in Stargazer package for R

I'm wondering how to get custom model names in the stargazer package for R. There is an option for model.names which can be set to TRUEor FALSE, but it does not support a vector or names such as model.names = c('OLS','2SLS','GLS'). Is there any way…
Nicolas
  • 2,297
  • 3
  • 28
  • 40
7
votes
1 answer

Using stargazer for lfe and getting error

I am trying to use stargazer package after estimating model with felm (from lfe package) and getting error, maybe somebody could provide help on this. Below I provide a simple example. library(lfe) library(stargazer) oldopts <-…
Vitalijs
  • 938
  • 7
  • 18
7
votes
1 answer

Does stargazer interpreting data.frame data as latex code constitute a bug or is this intended?

I am experiencing a problem where the Stargazer function is interpreting data in my data.frame as a latex command. I would like to find a way to suppress this feature of stargazer. See below. z <- c("Bank of America Corp", "Citigroup Inc", …
k13
  • 713
  • 8
  • 17
1 2
3
39 40