-
Notifications
You must be signed in to change notification settings - Fork 74
Group labels for sets of variables in etable? #580
Copy link
Copy link
Open
Labels
Description
data(mtcars)
model <- feols(mpg ~ hp + wt + cyl + gear, data = mtcars)
If I group hp and wt as "Engine" and cyl and gear as "Transmission" is there a way to get output like this?
\documentclass{article}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{caption}
\begin{document}
\begin{table}[htbp]
\centering
\begin{tabular}{l c}
\toprule
& Model \\
\midrule
(Intercept) & 36.69*** \\
& (5.970) \\
\addlinespace
\textbf{Engine} & \\
\hspace{1em}hp & -0.0178 \\
& (0.0154) \\
\hspace{1em}wt & -3.916*** \\
& (1.072) \\
\addlinespace
\textbf{Transmission} & \\
\hspace{1em}cyl & -0.5605 \\
& (0.9751) \\
\hspace{1em}gear & 0.7494 \\
& (1.557) \\
\bottomrule
\end{tabular}
\caption{Regression results with grouped covariates}
\end{table}
\end{document}
Thanks!
Reactions are currently unavailable