I'm using the texreg
package to print LaTeX tables for my R linear models. The default settings of the package include printing many things which are irrelevant for my analysis. Luckily the package provides switches to turn many things off.
I have found through trial and error that things set as single.row=TRUE
in R can be set as single_row=True
in RPy.
As you can see in my notebook example here that works for single_row
, and in the subsequent latex print confidence intervals are printed on the same row as my values.
The options include_loglik
and include_deviance
should control whether the Log Likelihood and the Deviance are printed. As I am not comparing models I do not need these. I have tried to set them as false via a number of different approaches but it just won't work.
Obviously everything works perfectly in pure R:
> texreg(lm, include.deviance=FALSE, include.loglik=FALSE)
Computing profile confidence intervals ...
Computing confidence intervals at a confidence level of 0.95. Use argument "method = 'boot'" for bootstrapped CIs.
\begin{table}
\begin{center}
\begin{tabular}{l c }
\hline
& Model 1 \\
\hline
(Intercept) & $1.85^{*}$ \\
& $[1.60;\ 2.10]$ \\
COIem-hard & $0.54^{*}$ \\
& $[0.38;\ 0.69]$ \\
COIsc-10 & $0.19^{*}$ \\
& $[0.03;\ 0.34]$ \\
COIsc-14 & $-0.04$ \\
& $[-0.20;\ 0.11]$ \\
COIsc-18 & $-0.04$ \\
& $[-0.20;\ 0.12]$ \\
COIsc-22 & $-0.01$ \\
& $[-0.16;\ 0.15]$ \\
COIsc-26 & $-0.13$ \\
& $[-0.29;\ 0.02]$ \\
COIsc-6 & $0.64^{*}$ \\
& $[0.48;\ 0.79]$ \\
\hline
AIC & 2342.49 \\
BIC & 2392.70 \\
Num. obs. & 1120 \\
Num. groups: ID & 7 \\
Variance: ID.(Intercept) & 0.08 \\
Variance: Residual & 0.45 \\
\hline
\multicolumn{2}{l}{\scriptsize{$^*$ 0 outside the confidence interval}}
\end{tabular}
\caption{Statistical models}
\label{table:coefficients}
\end{center}
\end{table}
Could you help me turn those switches off via RPy
?