微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用 texreg 打印因变量的均值而不是 R 中的 R 平方

如何解决使用 texreg 打印因变量的均值而不是 R 中的 R 平方

我有一些回归模型想要导出到 LaTeX。我正在使用“texreg”包。最终输出为:

\begin{table}
\begin{center}
\begin{tabular}{l c c}
\hline
 & Model 1 & Model 2 \\
\hline
as.factor(treat)1               & $145227140331.44$    &                      \\
                               & $(2648642987059.38)$ &                      \\
as.factor(msj)1                &                      & $-647801609586.01$   \\
                               &                      & $(3435830264390.74)$ \\
as.factor(msj)2                &                      & $433277589458.84$    \\
                               &                      & $(3288915232361.39)$ \\
as.factor(msj)3                &                      & $-1691975577225.66$  \\
                               &                      & $(3293603457594.94)$ \\
as.factor(msj)4                &                      & $-843647941334.40$   \\
                               &                      & $(3359975197112.69)$ \\
as.factor(msj)5                &                      & $576301517588.01$    \\
                               &                      & $(3349253720672.64)$ \\
as.factor(msj)6                &                      & $3301581741709.62$   \\
                               &                      & $(3403672471154.21)$ \\
as.factor(msj)7                &                      & $17431285033.90$     \\
                               &                      & $(3695545300670.01)$ \\
\hline
Num. obs.                      & $1000$               & $1000$               \\
R$^2$ (full model)             & $0.02$               & $0.03$               \\
R$^2$ (proj model)             & $0.00$               & $0.00$               \\
Adj. R$^2$ (full model)        & $0.01$               & $0.01$               \\
Adj. R$^2$ (proj model)        & $-0.01$              & $-0.01$              \\
Num. groups: as.factor(strata) & $10$                 & $10$                 \\
\hline
\multicolumn{3}{l}{\scriptsize{$^{***}p<0.001$; $^{**}p<0.01$; $^{*}p<0.05$}}
\end{tabular}
\caption{Statistical models}
\label{table:coefficients}
\end{center}
\end{table}

我可以让乳胶输出显示 R 平方和调整后的 R 平方,而不是显示因变量的平均值吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。