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

How to create a summary statistics table by multiple categories (groups) using stargazer?

I was wondering if there's a way to create a decent summary statistics table by multiple categories (groups) using stargazer(). I started with the following code but I am not sure how to advance from here. library(mtcars) mtcars2 <- within(mtcars,…
jck21
  • 751
  • 4
  • 16
2
votes
1 answer

Stargazer: how to remove R-squared using Python

I am using Stargazer to combine the regression result tables and want to remove R-squared and adjusted R-squared rows. While there is omit.stat=c("f", "rsq") in R, I am wondering if there is any similar method in Python codes? I have looked into…
2
votes
2 answers

In R, make a "pretty" result table in LaTeX, PDF, or HTML from "IRR" package output

Background I'm using the irr package in R to generate some inter-rater reliability statistics for a project I'm doing. Here's an example of Fleiss's Kappa using the package's built-in data: install.packages("irr") library(irr) data("diagnoses",…
logjammin
  • 1,121
  • 6
  • 21
2
votes
2 answers

How to keep just one variable in stargazer regression output? (oposite of "omit")

Does anyone know what could be the opposite of stargazer's argument "omit" when making a regression table output? I'm trying to show just one (or a few) covariates from a regression. I know one could use "omit" and then list all the variable's names…
2
votes
1 answer

Can I add standard errors *and* confidence intervals in a single column using Stargazer?

I like Stargazer quite a bit but am running into some issues trying to report standard errors and confidence intervals all in a single table. Consider this simple regression as a reproducible example: set.seed(04152020) x <- rnorm(100) y <- 2*x +…
Julian
  • 451
  • 5
  • 14
2
votes
1 answer

Tidy output table and stargazer

I am running a series of regressions on subgroups (all combinations of year and group) using this fantastic method I found here. year <- rep(2014:2015, length.out = 10000) group <- sample(c(0,1,2,3,4,5,6), replace=TRUE, size=10000) value <-…
Stata_user
  • 562
  • 3
  • 14
2
votes
1 answer

Input html table from file into R Markdown, knit to Word?

I am working with an R Markdown file that we need to be able to knit both to pdf and Word (for a co-author). We also have regression tables generated in stargazer that, due to the size of the data, are computed separately and two files are created:…
Omar Wasow
  • 1,870
  • 24
  • 24
2
votes
2 answers

make R report adjusted R squared and F-test in output with robust standard errors

I have estimated a linear regression model using lm(x~y1 + y1 + ... + yn) and to counter the present heteroscedasticity I had R estimate the robust standard errors with coeftest(model, vcov = vcovHC(model, type = "HC0")) I know that (robust) R…
2
votes
2 answers

Create APA Table from margins()

I use the margins library in R to calculate AME's from a linear model. Normally I would use the stargazer library to create table which I can use in an academic paper. This is sadly, only possible for regression objects. Is there a efficant way to…
Christoph
  • 45
  • 7
2
votes
1 answer

copy stargazer regression output to excel: values in () become -

I choose type ="html" and then copy and paste the output to excel. All work perfectly except the () in surround a value transfers the value into a negative one. For example, (2.451) that presents the standard errors becomes -2.451 Is there a way to…
Lynn
  • 61
  • 2
2
votes
1 answer

How to add additional GOFs such as ivreg diagnostics to regression tables?

For my stargazer table I would like to include the diagnostics of weak instrument and Wu Hausman test. I read the following answer: R: Robust SE's and model diagnostics in stargazer table. Though, I don't really understand this. How can you apply it…
es_dutch
  • 111
  • 1
  • 8
2
votes
1 answer

R: why does stargazer return incorrect values for min and max with this dataframe?

I was using stargazer today to make some basic summary tables, and noticed some strange behavior: library(stargazer) my_df <- data.frame(speed = c(3.00,3.20,3.00,3.20,3.10,2.90), age = c(22,24,24,28,19,25)) stargazer(my_df,…
John Davis
  • 21
  • 1
2
votes
2 answers

Split coefficients in different table columns with stargazer

My model output features 32 coefficients. I want them displayed all in one table and came up with the idea to show 16 coeffients in one column respectively with their inherent estimates and p-values. Is there any way to slice the model output or…
mugdi
  • 365
  • 5
  • 17
2
votes
1 answer

could not find function "multinom" nnet error + stargazer problem

I am trying to run the following multinomial regression specified as follows and get the table as an html through stargazer: ml1 <- multinom(as.factor(stabgroupsTH) ~ factor(pre_stab_group2) + factor(educ2) + agesup + black + male + mhd +…
skol
  • 21
  • 2
2
votes
1 answer

How can I make a collapse with glue package using RMarkdown?

I've been trying to automate the results of some df table in latex using the glue and stargazer packages, but I haven't had any results (what I want is for the meaning "^{*}" to appear next to each value as it is in the table) to use then…
cdcarrion
  • 574
  • 6
  • 22