Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exporting from STATA to Latex, problem with "_"

    Hi guys, I have a problem when exporting the results of several regressions from STATA to tex format, in particular I'm using the following code using the command esttab:

    Code:
    esttab main1 main2 main3 main4 main5 main6 main7, ///
        nostar p b(%9.3f) stats(N r2, label("Observations" "R\$^2\$") fmt(0 2)) compress ///
        mtitles("$\pi^{\text{e,point}}_{t+12}$" ///
                "$\pi^{\text{e,point}}_{t+24|t+36}$" ///
                "$\pi^{\text{e,density}}_{t+12}$" ///
                "$\pi^{\text{e,density}}_{t+24|t+36}$" ///
                "$\pi^{\text{e,IQR}}_{t+12}$" ///
                "$\pi^{\text{e,IQR}}_{t+24,t+36}$" ///
                "$\pi^{\text{e,point}}_{t+12}2015$"), ///
    using "${location}\Tables\\TableA1 Controls.tex", replace

    the problem is that the output directly escapes the titles that I've chosen for my estimates from _ to \_, e.g. $\pi^{\text{e,IQR}}_{t+24,t+36}$ becomes $\pi^{\text{e,IQR}}\_{t+24,t+36}$.
    How can I sort this problem out? I tried to add "fragment" but nothing happens.
    Thanks a lot


  • #2
    If you search the forum, this have been discussed previously: https://www.statalist.org/forums/for...n-extra-to-tex. Note that estout is from SSC, as you are asked to explain (FAQ Advice #12).

    Comment

    Working...
    X