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

Stargazer - using lapply to do mutliple linear regression models and store them in a list in R

df is data with values from 1-10 for 14 different variables formatted as a dataframe with n observations with lots of NA values for each variable which is why I couldn't do a regular lm with multiple predictors. Then I used an lapply in order to do…
jmi
  • 43
  • 4
0
votes
1 answer

stargazer: Omitting multiple variables with multiple models

I'm trying to omit variables that appear in some models but not in others. However, I'm not getting the output I expect. I'm using stargazer 5.2. Here's a MWE: y <- rbinom(100, 1, 0.5) x <- rnorm(100) z <- rnorm(100) fit1.lm <- lm(y~x) fit2.lm <-…
pbaylis
  • 1,529
  • 11
  • 19
0
votes
1 answer

Stargazer printing zeros instead of my data

I made a dataset and I'm trying to get Stargazer to print it as is, but for the last column it won't print anything but zeros. my_object<-structure(list(labels_for_t_test = structure(c(4L, 3L, 2L, 1L), .Label = c("% who report…
user5457414
  • 137
  • 3
  • 7
0
votes
1 answer

Output lower tri using stargazer

I want to output the lower tri in a matrix and format it to latex for a pretty output. I have tried: stargazer(overlap_stats1$overlap_prop$iso95[upper.tri(overlap_stats1$overlap_prop$iso95)]) but the result is only one line of output.
user3655531
  • 145
  • 1
  • 10
0
votes
0 answers

Error to print dist object in R to latex code (knitr, stargazer)

I am trying to print a dist object in latex code using stargazer. example require(ape) require(stargazer) data(woodmouse) dd<-dist.dna(woodmouse) stargazer(dd) Error in objects[[i]]$zelig.call : $ operator is invalid for atomic vectors Also…
Tomate
  • 195
  • 1
  • 5
0
votes
2 answers

Stargazer HTML Output, no frame and lines

I work with R-Studio (Version 0.98.1102) and use the stargazer package (5.1). It all works properly, but when I use the type="html" function, my output looks quite ugly, there is no frame, no lines, it's just a white document with numbers and text.…
JonesRu
  • 1
  • 1
  • 2
0
votes
2 answers

Stargazer: omit stars for constant only

Sometimes it's tacky to include statistical significance stars for the constant term when reporting the results of a regression. Is it possible to configure stargazer to keep stars for the regressors, but not for the constant term? fit <- lm(rating…
Alex Coppock
  • 2,122
  • 3
  • 15
  • 31
0
votes
1 answer

Multiply coefficients with standard deviation

In R, the stargazer package offers the possibility to apply functions to the coefficients, standard errors, etc: dat <- read.dta("http://www.ats.ucla.edu/stat/stata/dae/nb_data.dta") dat <- within(dat, { prog <- factor(prog, levels = 1:3, labels…
MERose
  • 4,048
  • 7
  • 53
  • 79
0
votes
1 answer

Summarizing Factors and Times with Stargazer

I am not sure why it seems so difficult to find information regarding summarizing non-quantitative variables with stargazer. I would like a summary of the following time variable (number of observations, min and max value would be…
Michael
  • 1,537
  • 6
  • 20
  • 42
0
votes
1 answer

Output tex file directly from stargazer?

Is there any possibility of having stargazer directly produce tex files from regression output, similar to the way outreg2 does this in Stata?
Nils Gudat
  • 13,222
  • 3
  • 39
  • 60
0
votes
2 answers

Using stargazer for systemfit objects

I wonder how to use stargazer for systemfit objects. My working example is below which gives two different tables rather than one. library("systemfit") data("Kmenta") eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice +…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
0
votes
1 answer

Output for stargazer in R

I follow the instruction of this article > library(stargazer) > stargazer(attitude) % Table created by stargazer v.5.0 by Marek Hlavac, Harvard University. E-mail: hlavac at fas.harvard.edu % Date and time: Fri, Mar 07, 2014 - 4:12:55…
useR
  • 3,062
  • 10
  • 51
  • 66
0
votes
1 answer

Stargazer and incorrect number of observations

It appears that the stargazer package's "Observations" is incorrect if factor interactions are dropped from a model: Here's the issue using R's built-in dataset: data(mtcars) names(mtcars) mtcars$gear.f = as.factor(mtcars$gear) # create two sets of…
Bryan
  • 1,771
  • 4
  • 17
  • 30
0
votes
0 answers

Function for generating LaTeX tables from R summaries (using RPy)

I am trying to obtain a latex table with the summary of a lme4.lmer() run. There are a number of R packages which claim to do this. However, in my experience none of them could. Here is a run-down: xtable - doesn't seem to take my input, neither…
TheChymera
  • 17,004
  • 14
  • 56
  • 86
0
votes
3 answers

Annotated correlation tables with stargazer

I want to report correlation tables in a latex report and I'm using 'stargazer' to transform my R objects into tex-code. The correlational data is currently stored in a data frame. I would like to print rownames and possibly add an annotation under…
stats-hb
  • 958
  • 13
  • 31
1 2 3
39
40