Announcement

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

  • Rename estimated coefficients

    Hi,

    Im trying to make a table with three different models but the estimated coefficient in CSDID is not named the same as in TWFE and in the Stacked model so my tables looks like this:
    TWFE Stacked reg CSDID
    Post 123 123
    ATT 123
    How can I rename "ATT" to "post" for my estimated coefficients? I have tried estout using CSDID, rename(ATT post) and esttab, rename(ATT post) without success.



    I'm currently using est save to save my estimates then est store and est out(seen below) to use them in my table. Here is a sample of the beginning of my tables:


    estout tsno5 ssno5 csno5 tsc5 ssc5 csc5 using "twfe.tex", replace ///
    style(tex) ///
    cells(b(fmt(a3) star) se(fmt(a3) par)) ///
    starl( * 0.10 ** 0.05 *** 0.010) ///
    keep(post_ev ATT) ///
    varlabels(post_ev "Post" ALL "Post") ///
    mlabels("TWFE" "Stacked" "CS" "TWFE(no cov)" "Stacked(no cov)" "CS(no cov)" ) collabels(none) ///
    substitute(_ \_ # \#) ///
    prehead( \footnotesize \centering `"\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}"' ///
    "\begin{threeparttable} \begin{tabular}{l*{@E}{c}} \toprule \toprule" ///
    "\caption{Estimates for all methods & region: all & km:5}" ///
    "& \multicolumn{6}{c}{\textsc{A. Static model}} \") ///
    posthead(\cmidrule(lr){2-7} \\) ///
    prefoot() ///
    postfoot()

    .
    .
    .
    .

    Many thanks!

  • #2
    In esttab, I think the name change option is coef(ATT post)

    Comment


    • #3
      Hi George!

      the command does change the name but only for display, it doesn't save the name. Maybe esttab is not the right function? but I cannot find any rename option for est save or est store?


      Thank you

      Comment


      • #4
        open csdid.ado. look at line 740. Change that to "Post". Run it the ado. Then run the model to see if that does it.

        Comment


        • #5
          Look at how one can rename a coefficient using erepost from SSC in https://www.statalist.org/forums/for...em-to-tex-file. Editing the ado-file will work, but it seems overkill.

          Comment

          Working...
          X