I would like to make a simple summary statistic table describing 3 merges. I just renamed the _merge variable that automatically gets generated _merge1 _merge2 _merge3. Essentially, what I would like to reproduce is a clean version of the merge statistics that are auto-generated by Stata, telling you how the matching went.
I learned about tabout and have been reading many of the manuals. However, the results I am getting are incredibly ugly/nonsensical and I can't figure out why.
For example, when I try
Code:
tabout _merge_1 _merge_2 _merge3 using "filepath/table.tex", replace /// style(tex) font(bold) oneway c(freq row) f(0c 1) /// clab(Count Col_%) npos(col) nlab(Sample) ///
Code:
&Count&Col \%&Sample \\ \hline \textbf{Merge 1}&&& \\ Matched (3)&1000&100.0&1000 \\ \textbf{Total}&1000&100.0&1000 \\ \hline \textbf{Merge 2}&&& \\ Master only (1)&3000&100.0&\3000 Using only (2)&500&100.0&500 \\ Matched (3)&20000&100.0&20000 \\ \textbf{Total}&23500&100.0&23500 \\ \textbf{Merge 3}&&& \\ Master only (1)&40&100.0&40 \\ Matched (3)&800&100.0&800\\ \textbf{Total}&840&100.0&840 \\
Code:
sysuse auto, clear tabout foreign rep78 using table12.tex, replace /// style(tex) font(bold) sum npos(tufte) /// c(mean mpg mean weight mean length median price /// median headroom) f(1c 1c 1c 2cm 1c) h2(Mean Median) /// h2c(3 2) clab(MPG Weight_(lbs) Length_(in) Price /// Headroom_(in)) title(Table 12: Oneway summary table /// \\ with multiple summary measures) fn(Source: auto.dta)
Code:
Mean Median &MPG&Weight (lbs)&Length (in)&Price&Headroom (in) \\ \hline \textbf{Car origin}&&&&& \\ Domestic (70\%)&19.8&3,317.1&196.1&\$4,782.50&3.5 \\ Foreign (29\%)&24.8&2,315.9&168.5&\$5,759.00&2.5 \\ \textbf{Total} (100\%)&21.3&3,019.5&187.9&\$5,006.50&3.0 \\ \hline \textbf{Repair record 1978}&&&&& \\ 1 (2\%)&21.0&3,100.0&189.0&\$4,564.50&1.8 \\ 2 (11\%)&19.1&3,353.8&199.4&\$4,638.00&3.8 \\ 3 (43\%)&19.4&3,299.0&194.0&\$4,741.00&3.5 \\ 4 (26\%)&21.7&2,870.0&184.8&\$5,751.50&3.0 \\ 5 (15\%)&27.4&2,322.7&170.2&\$5,397.00&2.5 \\ \textbf{Total} (100\%)&21.3&3,032.0&188.3&\$5,079.00&3.0 \\
Does anyone have any advice? I am not sure what I am doing wrong. I tried ssc install tabout and I have the newest version. I also ran everything from here: http://tabout.net.au/downloads/main_version/tabout.txt
0 Response to Help with Tabout One-way table
Post a Comment