I'm having issues passing my variable names to tables in a way that LaTex can read (without me manually making edits to the .tex output). I am having this issue both with regression tables (that I export using outreg2) and with summary stats tables that I create using frmttable (both user-written packages). Specifically, I thought outreg2 should automatically insert a "" before underscores in variable names when exporting to a .tex file, but I'm not finding that to be the case when I run my code. I'm an example below. For me, this code produces a .tex file that includes variable names such as "pct_black" without inserting a "" to before the underscore character. If anyone has an idea of what the issue is or how to fix it, please let me know!
Thanks.
Thanks.
Code:
reg std_gr4m lnppcurexp pctlowinc pctlep pctsped pct_black pct_hispanic totstu pctlep_flag outreg2 using tab2_part2, tex(frag) se dec(2) label replace title("Table 2: Regressions of 4th Grade Test Scores on Other Variables")
Comment