Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Reinhard Schiel <rjschiel@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: Esttab Latex |
Date | Tue, 24 Sep 2013 09:39:55 -0400 |
Dear Statalist I have encountered strange results from using esttab to create latex = tables from stata output. After estimating multiple regressions and using the suffix eststo, = title(...): before each regression command, and then applying the = following command to export the results to tex: esttab using Output.tex, tab append /// b(2) star(* 0.10 ** 0.05 *** 0.01) se(3) nopar abs label = nonumbers nodepvars nogaps /// stats(N ftests p_yr p_state p_statet, fmt(0 0 3 3 3) /// labels("Observations" "p-values of F-tests:" "Year = dummies" "State dummies" "State trends")) /// varlabels(_cons "First" old_d1 "Second" old_d2 " " = old_d3 "Third" /// old_d4 " " old_d5 " " old_d6 "Fourth" old_d7 " " old_d8 = " " old_d9 " ") /// extracols(2 3 4 5 5 6 7 8) mlabels(,title) keep(_cons = old_d? `leveleffect' `keepvars') /// labcol2("-" "B" "G" "BB" "BG" "GG" "BBB" "BBG" "BGG" = "GGG", title("Previous")) /// mgroups("All years" "1972-84" "1985-94" "1995-2005" "All = years" "1972-84" "1985-94" "1995-2005", /// pattern(1 1 1 1 1 1 1 1) lhs("order")) /// title("`title'") postfoot("") order(_cons old_d? = `leveleffect' `keepvars') The tex output, which is stored in a tex file, is not able to compile = into a table in latex as it does not contain the required latex = operators to inform latex that its dealing with a table. This has never = happened to me before. An extract is provided below: =09 First - -0.06*** -0.15*** -0.09*** -0.04*** = -0.06*** -0.15*** -0.09*** -0.04*** 0.010 0.055 0.009 0.009 0.010 0.055 0.009 0.009 Second B 0.01 0.10** 0.04 -0.02 0.019 0.046 0.028 0.017 =20 I now have over a hundred tex files of this structure over estimates = which took days to run. Is there a way to correct the stata code I used to avoid this from = reoccurring and a simple way of getting the current output stored in = tex files into sensible tables? Thanks in advance Reinhard * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/