I have exactly the same situation as this one: http://www.stata.com/statalist/archi.../msg00023.html
The problem is that when trying to export the table in .tex, esttab only creates 3 columns in \tabular{}, instead of the 5 that are needed.
I re-type the code suggested as a solution, and the corresponding .tex file.
The .tex file generated is:
How can I tell esttab that I actually need more than one column per model in the .tex file?
Thanks!
The problem is that when trying to export the table in .tex, esttab only creates 3 columns in \tabular{}, instead of the 5 that are needed.
I re-type the code suggested as a solution, and the corresponding .tex file.
Code:
mat A = (1,2,3,4) mat coln A = male:1979 male:2007 female:1979 female:2007 mat rown A = mystat mat tmp = A[1...,"male:"]' ereturn post estadd matrix A = tmp eststo male mat tmp = A[1...,"female:"]' ereturn post estadd matrix A = tmp eststo female estout male female using test.tex, cell((A["1979"] A["2007"]))
Code:
{ \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi} \begin{tabular}{l*{2}{c}} \hline\hline &\multicolumn{2}{c}{(1)} &\multicolumn{2}{c}{(2)} \\ &\multicolumn{2}{c}{} &\multicolumn{2}{c}{} \\ & 1979& 2007& 1979& 2007\\ \hline mystat & 1& 2& 3& 4\\ \hline \(N\) & & & & \\ \hline\hline \end{tabular} }
Thanks!
Comment