I have an external table that is is produced by a statistics package Stata like this:
sysuse auto
estimates clear
eststo, title("OLS"): reg price mpg
esttab using "~/Desktop/table.tex", replace title(My OLS Model)
The file table.tex
looks like this:
\begin{table}[htbp]\centering
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{My OLS Model}
\begin{tabular}{l*{1}{c}}
\hline\hline
&\multicolumn{1}{c}{(1)}\\
&\multicolumn{1}{c}{price}\\
\hline
mpg & -238.9\sym{***}\\
& (-4.50) \\
[1em]
\_cons & 11253.1\sym{***}\\
& (9.61) \\
\hline
\(N\) & 74 \\
\hline\hline
\multicolumn{2}{l}{\footnotesize \textit{t} statistics in parentheses}\\
\multicolumn{2}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\
\end{tabular}
\end{table}
I input it into a LaTeX main document like this:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\input{table.tex}
\end{document}
I have two questions:
- Is it possible to add a note at the bottom of this table in the main document that could be edited in the main file (rather than modifying
table.tex
file)? - Is it possible to overwrite the caption from the main document?
tabular
? That is, just like the\multicolumn
notes intable.tex
?