I would like to "flip" the row/columns in a regression table.
The latest stargazer
manuals says that now the flip
argument also works with regression tables (previously it only worked with summary stats).
However I am unable to make it work. Here is an example with stargazer
5.2.1
library(stargazer)
stargazer(attitude)
linear.1 <- lm(rating ~ complaints + privileges + learning + raises + critical, data=attitude)
linear.2 <- lm(rating ~ complaints + privileges + learning, data=attitude)
## create an indicator dependent variable, and run a probit model
attitude$high.rating <- (attitude$rating > 70)
probit.model <- glm(high.rating ~ learning + critical + advance, data=attitude, family = binomial(link = "probit"))
stargazer(linear.1, linear.2, probit.model, title= "Regression Results", type = 'text', flip = TRUE)
gives :
> stargazer(linear.1, linear.2, probit.model, title="Regression Results", type = 'text', flip = FALSE)
the condition has length > 1 and only the first element will be usednumber of rows of result is not a multiple of vector length (arg 2)number of rows of result is not a multiple of vector length (arg 2)
Regression Results
=============================================================================
Dependent variable:
---------------------------------------------------------
rating high.rating
OLS probit
(1) (2) (3)
-----------------------------------------------------------------------------
complaints 0.692*** 0.682***
(0.149) (0.129)
privileges -0.104 -0.103
(0.135) (0.129)
learning 0.249 0.238* 0.164***
(0.160) (0.139) (0.053)
raises -0.033
The table is just the regular one with variables as columns. Instead, I am looking for something like
Regression Results
=====================================
complaints privileges
-------------------------------------
model1 0.692*** etc
(0.149)
model2 0.14**
(0.049)
model3 0.692
(0.149)
Am I missing something? Thanks!