Skip to content

Conversation

@jrstromme
Copy link

@jrstromme jrstromme commented May 15, 2021

The following code produces a bug with the omit labels:

x <- rnorm(100)
z <- rnorm(100)
a <- rnorm(100)

fit1.lm <- lm(y~a+x)
fit2.lm <- lm(y~a+x+z)
# doesnt work, z should be 'yes' column 2
stargazer(fit1.lm, fit2.lm,
              omit=c("x", "z"), 
              omit.labels=c("x", "z")) 

This bug is due to a 'cbind' command dropping items if you try to cbind(matrix,vector) when length(vector) is larger than nrow(matrix).

I am not 100% sure, but I think that this 'dropping' issue is not by design in the code and will fix this bug without causing other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant