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

Export glm train fit summary from caret with stargazer?

I want to use the package "stargazer" in order to export the fit summary of a train with caret. e.g. LogReg <- train( Target ~ ., data = DecileFramesTrain[[i]], method="glm", family="binomial", trControl = trainControl(method = "cv", number = 3,…
Tobster18
  • 47
  • 7
2
votes
2 answers

How to exclude standard errors from stargazer table?

Amazing R gurus, I am just wondering if there is any way to exclude standard errors from stargazer table. Here is a quick reproducible example: --- title: "Test regression" output: html_document date: "`r format(Sys.time(), '%d %B, %Y')`" --- ```{r…
M.Qasim
  • 1,827
  • 4
  • 33
  • 58
2
votes
1 answer

Store only regression coefficients and statistics and then export them with Stargazer

I am running regressions with large samples and many covariates, resulting in lm objects of around 10Gb each (and I need to run dozens of regressions). I want to save the regression outputs and later import them and create tables using Stargazer. I…
2
votes
1 answer

label variable for stargazer extraction

I am using stargazer to extract some regression tables in latex. I would to know if it exists a way to label variables once for all without having to re-define it through "covariate.labels = ..." every time. I tried the library expss (and Hmisc),…
TeYaP
  • 303
  • 6
  • 21
2
votes
1 answer

Exporting output of custom multiple regressions from R to Latex

I am trying to export the results of multiple regressions in a single table. Ideally, it should be formatted similar to stargazer() output. The problem is that I have not found reliably working R functions for the kind of regressions I need…
Moysey Abramowitz
  • 352
  • 1
  • 7
  • 19
2
votes
1 answer

Stargazer splits character field into columns when summary=F and string contains "&"

How can I print a stargazer table when summary=F and a character column has elements containing &? summary=F prints the data table verbatim which is what I want. Here's a case where it prints as expected: > stargazer::stargazer( + …
Brooks Ambrose
  • 381
  • 3
  • 10
2
votes
1 answer

r stargazer - add lines to regression output and costumise their order

My question falls somewhere between this one and this one. I want to add a line in the regression output for the reference category of a factor variable. Stargazer doesn't seem to have an easy way of doing this. My current approach is to add a line…
NBK
  • 887
  • 9
  • 20
2
votes
2 answers

Printable table of category columns and observation names in rows

Let's say I have a dataframe of people's names and some categorical variable describing them: df <- data.frame(name = c("Tom", "Jane", "Will", "Joe", "Sarah", "Mary"), status = c("friend", "acquaintance", "acquaintance", "stranger", …
lost
  • 1,483
  • 1
  • 11
  • 19
2
votes
1 answer

Assign dependent variable names to stargazer table with list from lapply

I am running several regressions with lm and lapply so that I get a list of models. From there I want to create a stargazer table. The problem I am having is with stargazer. I can create a table without issue, but I can't figure out how to…
dj20b22
  • 73
  • 6
2
votes
0 answers

reducing the size of lm object

I'm having a data frame of about 50000 lines, and i'm running a lm command over it with about 5000 estimators. My PC is OK with it, But the LM objecct itself turn to be too big. and than in the second regression I'm getting the error of:…
letmetype
  • 105
  • 7
2
votes
0 answers

Presenting Arima results - Use of Stargazer (or other equivalent package)?

I currently have several ARIMA models in R which I'm looking to present formally within a paper. I'm just wondering if a tool exists that will allow me to illustrate these results, without having to manually extract this data? Unless I'm mistaken, I…
Foxtrot82
  • 93
  • 1
  • 7
2
votes
1 answer

How to make a dependent variable label for each column Stargazer

I want to format my stargazer table like what is below. This is my code stargazer(reg_1a, reg_2a, reg_3a, reg_4a, reg_5a, reg_6a, type="text", dep.var.labels = c("Ed76", "Ed76", "Wages", "Wages", "Wages", "Wages"), model.names…
Collective Action
  • 7,607
  • 15
  • 45
  • 60
2
votes
1 answer

Analysing a data frame that contains a time series using stargazer

I have a panel data set of 10 obs. and 3 variables. (# of obs. 30 = 10 rows (= countries) * 2 columns (= migration parameters) * 1col for the respective year. My data frame consists of 3 annual data frames, so to say. How can I apply stargazer on…
aluuusch
  • 83
  • 2
  • 10
2
votes
1 answer

Produce HTML table in R: Column.labels or dep.var.caption on table of data frame in stargazer

I have a data frame that is effectively stored regression results, with relevant values as columns and variables as rows (each stored in names). It looks something like this: a <- c(3, 0.5, 0.010, 4, 0.3, 0.271) b <- c(10, 0.9, 0.021, 8, 0.5,…
cparmstrong
  • 799
  • 6
  • 23
2
votes
1 answer

Stargazer Confidence Interval Incorrect?

So I am really fond of the stargazer package for displaying the statistics for regression models. I've been using R and Stata together to complete some problems in a textbook. One issue that I have found is that the confidence interval printed by…
im2wddrf
  • 551
  • 2
  • 5
  • 19