Announcement

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

  • ESTTAB options

    Hi,

    I have a problem outputting STATA coefficients name. In particular I WOULD LIKE to display in my latex table other names of coefficients than the ones given by STATA automatically. To do that I am doing:

    Code:
    esttab using table_completeatc4.tex, coeflabel(L.atcmain "atcmain\$_{t-1}\$" (max) newmolfirm "newmolfirm" (max) newmolmarket "newmolmarket" (max) newmolatc "newmolatc" inflow_ratio "\frac{K_{t-1}}{K_t}" outflow_ratio "\$\frac{K_{t+1}}{K_t}\$" L.inflow_ratio "\$\frac{K_{t-1}}{K_t}_{t-1}\$" L.outflow_ratio "\$\big(\frac{K_{t+1}}{K_t}\big)_{t-1}\$" recalls "Recalls" L.recalls "Recalls\$_{t-1}\$"  L2.recalls "Recalls\$_{t-2}\$" L3.recalls "Recalls\$_{t-3}\$" L.log_tot_sales recalls_atc "Recalls" L.recalls_atc "Recalls\$_{t-1}\$" L2.recalls_atc "Recalls\$_{t-2}\$" percentage_rx "\% of rx" nprod "K\$_{t}\$(\# of prod.)" L.(sum) nprod "K\$_{t-1}\$"  L.log_sales "log\$_\$sales\$_{t-1}\$") ///
           rename(L.inflow_ratio "\$\frac{K_{t-1}}{K_t}_{t-1}\$" L.outflow_ratio "\$\frac{K_{t+1}}{K_t}_{t-1}\$" recalls "Recalls" L.recalls "Recalls\$_{t-1}\$"  L2.recalls "Recalls\$_{t-2}\$" L3.recalls "Recalls\$_{t-3}\$") se unstack title($title $title2 \label{byprod}) label replace noconstant noobs star($star) /*star(* 0.05 ** 0.01 *** 0.001)*/  /*noparentheses*/ /*onecell*/ ///
    However, some of the variables do not change their name when outputted to latex (e.g. the ones that I would like to rename with a fraction: L.outflow_ratio "\$\big(\frac{K_{t+1}}{K_t}\big)_{t-1}\$"...)

    How can I handle this?

    Thanks,

    Federico

  • #2
    Dear Federico,

    I had a similar problem some days ago with the Latex and esttab output. The problem is that Stata and Latex read symbols differently and you need to substitute. So for example, if you use code: substitute(\_ _) in your esttab, it should solve the problem related to _. You need to substitute a dollar sign as well since Latex does not see it as an equation. I hope it helps.

    Best Regards,

    Avto
    Last edited by Avtandil Abashishvili; 21 Jun 2019, 06:34.

    Comment


    • #3
      Thank you!!!

      Comment

      Working...
      X