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

how to align stargazer table to the left when type="latex"?

I use stargazer package in my automated rmarkdown pdf documents to make nice looking tables. Stargazer places its tables in the center of the page, by default. How can I let stargazer generate latex code that aligns the table to the left? here is an…
rdatasculptor
  • 8,112
  • 14
  • 56
  • 81
4
votes
1 answer

suppress stars and notes from stargazer

How can I remove the stars and notes from a regression table output using stargazer? I tried including: star.cutoffs = NA It removed the stars, however, at the end of the table it appears "Note: NA" which I would like also to remove.
user2246905
  • 1,029
  • 1
  • 12
  • 31
4
votes
3 answers

export regression table with stargazer: $ operator is invalid for atomic vectors

I am trying to export a regression table using stargazer. The regression output comes from glm and looks like: Call: glm(formula = formula, family = binomial(logit), data = data) Deviance Residuals: Min 1Q Median 3Q Max …
ℕʘʘḆḽḘ
  • 18,566
  • 34
  • 128
  • 235
4
votes
3 answers

Stargazer options: resizebox and label

Is it possible to incorporate resizebox into stargazer in R? I'm trying to create a table that is too wide to fit, even on landscape perspective. I manually added resizebox{\textwidth}{!} { \begin{tabular} \end{tabular} } to the .tex file, and I…
Shffl
  • 396
  • 3
  • 18
4
votes
1 answer

Stargazer: omit and omit.yes.no won't work

I tried to use the omit and the omit.yes.no options in stargazer() to omit a dummy variable. It seems that there is a bug involving this option. These are what I expect get from the output from stargazer. logit_1 …
DJJ
  • 2,481
  • 2
  • 28
  • 53
4
votes
2 answers

Stargazer and gam - how to include the whole summary output?

When fitting a generalized additive model with smoothed splines stargazer only returns the main effects and not the smooth terms which you can see in summary(pros.gam). Can stargazer return these as well? Or is there another function or package that…
Jonas Tundo
  • 6,137
  • 2
  • 35
  • 45
3
votes
1 answer

How to show t stat and p value with coefficient with stargazer

I would like to display the t value and p value from my regression output using the stargazer package. So far, I've found ways to show one or the other. I did find something online that displays both; however, it omits the coefficient names. Is…
bandcar
  • 649
  • 4
  • 11
3
votes
2 answers

how to report exp(coefs) of a coxph regression with stargazer

Say I have my.model My.model <- coxph(Surv(stop, event) ~ (rx + size + number) * strata(enum), cluster = id, bladder1) I would like to create a model report table which contains exp(coefs) instead of coefs stargazer(my.model) is there a…
Macosso
  • 1,352
  • 5
  • 22
3
votes
2 answers

This code gives me an error: Error in if (is.na(s)) { : the condition has length > 1

Please help resolve this error that I get when I execute the following: stargazer(as.data.frame(st_sect.hh.earnings[st_sect.hh.earnings$sector.f=="Rural",c(1,3,4)]), type="html", title="Mean and Standard Deviation of Monthly Household…
Varun Nair
  • 33
  • 1
  • 3
3
votes
1 answer

Correct way to include two variables in omit parameter of Stargazer?

I am trying to build a regression table with R package Stargazer that contains 4 different lm models. My data contains x,y and two categorical variables. Depending on the model I either include none, one or both categorical variables. However, I…
intedgar
  • 631
  • 1
  • 11
3
votes
1 answer

Knitting stargazer summary statistics table in R Markdown to Word

Context: I am using R markdown to produce a short report in Word format. In the R markdown file, I use stargazer to produce summary statistics tables to be included in the final Word document. I'm new to R Markdown. Apologies if this is an…
Tee
  • 149
  • 8
3
votes
1 answer

Multi-panel regression tables in R

I am trying to create a regression table that has two panels with overlapping but not identical dependent variables. For each panel, I want a title indicating the name of each panel as well as the dependent variables for each regression. # rm(list =…
Thomas J. Brailey
  • 151
  • 1
  • 2
  • 12
3
votes
2 answers

Is there an automatic way of displaying the p value of a regression F statistic in a `stargazer` table?

This seems to be a basic question, but there doesn't seem to be an automatic way of displaying the p value of the F statistic in a stargazer linear regression table. I know it must be possible to manually calculate it (or grab it from…
3
votes
2 answers

Generate table with side-by-side node models of `partykit:mob()` object

Let's say I fit a model using partykit:mob(). Afterward, I would like to generate a side-by-side table with all the nodes (including the model fitted using the whole sample). Here I attempted to do it using stargazer(), but other ways are more than…
3
votes
1 answer

Stargazer does not recognise tobit even though it is supported

I want to let stargazer print an AER::tobit regression (data at the bottom). require(AER) require(stargazer) s1.tobit <- AER::tobit(taxrate ~ votewon + industry + size + urbanisation + vote, left=12, right=33,…
Tom
  • 2,173
  • 1
  • 17
  • 44