如何从 stargazer 输出中删除模型类型?

How do I remove the model type from stargazer output?

示例数据:

library(sure) # for residual function and sample data sets
library(MASS) # for polr function
library(stargazer)
#rm(df1)
data("df1", package="sure")
data("df2", package="sure")
df1 <- df1
df1$x2 <- df2$y
df1$x3 <- df2$x
df1$y <- df3$x/10

lm1 <- lm(y~x, data=df1)
lm2 <- lm(y~x, data=df1)
polr1<- polr(x2~x3, method="probit", Hess=TRUE, data=df1)
depvarlab <- c("-", "-", "-")
stargazer(lm1, lm2, polr1, type="text", dep.var.labels = depvarlab, keep.stat=c("n", "rsq"))

我尝试了所有排除模型类型(OLS 等)的方法,但都没有成功。如何让 stargazer 不显示模型类型?

可以将 model.names 设置为 FALSE

stargazer(lm1, lm2, polr1, type="text", 
                                        dep.var.labels = depvarlab, 
               keep.stat=c("n", "rsq"), model.names = FALSE)
    
    ==========================================
                      Dependent variable:     
                 -----------------------------
                          -              -    
                    (1)        (2)      (3)   
    ------------------------------------------
    x             0.100***  0.100***          
                  (0.000)    (0.000)          
                                              
    x3                                0.088***
                                      (0.018) 
                                              
    Constant     -0.000***  -0.000***         
                  (0.000)    (0.000)          
                                              
    ------------------------------------------
    Observations   2,000      2,000    2,000  
    R2             1.000      1.000           
    ==========================================
    Note:          *p<0.1; **p<0.05; ***p<0.01