Announcement

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

  • csdid result compilation

    Hello

    I am using CSDID command and I am having some issue with saving the results

    my current results appear like this:

    Code:
    estat simple
    
    Average Treatment Effect on Treated
    ------------------------------------------------------------------------------
                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             ATT |  -2.679485   1.622186    -1.65   0.099    -5.858911    .4999407
    ------------------------------------------------------------------------------
    I have multiple results like this one and I want them to combined in a single table for my usage.

    I tried using these commands
    Code:
    esttab: estat simple
    and then

    Code:
    esttab using text.rtf
    However, I get the entire year-to-year regression result which I don't need. I only need the multiple "estat simple" results (as shown above) in one table.

    Is it possible to do that? Or is there any other command I should use to get the outcome I want?

    Thank you!

  • #2
    Hi Sharma
    what you need to do is the following:

    Code:
    estat simple, estore(simple_att)
    esttab simple_att using text.rtf
    So whenever you use estat, if you want to save the results you need to add the "estore()" option
    HTH

    Comment


    • #3
      Hi FernandoRios

      thank you for your response.

      I tried what you said but I'm still not getting the output I need. I get only the ATT coefficient in the table and that too just for the current regression. I want it for multiple.

      Let me give you an example:

      I have the following different estimations:

      ESTIMATION 1:

      Code:
      estat simple
      Average Treatment Effect on Treated
      ------------------------------------------------------------------------------
                   | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
               ATT |  -2.679485   1.622186    -1.65   0.099    -5.858911    .4999407
      ------------------------------------------------------------------------------
      ESTIMATION 2:

      Code:
      estat simple
      Average Treatment Effect on Treated
      ------------------------------------------------------------------------------
                   | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
               ATT |   -2.66725   1.601887    -1.67   0.096     -5.80689    .4723907
      -----------------------------------------------------------------------------
      ESTIMATION 3:

      Code:
       estat simple
      Average Treatment Effect on Treated
      ------------------------------------------------------------------------------
                   | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
               ATT |  -1.960418   1.029089    -1.91   0.057    -3.977396    .0565602
      ------------------------------------------------------------------------------
      Now, I want to combine these results in a table that looks like this:

      Code:
       
      Coefficient Std. error z p>|z| [95% conf. interval]
      ATT_1 -2.679485 1.622186 -1.65 0.099 -5.858911 .4999407
      ATT_2 -2.66725 1.601887 -1.67 0.096 -5.80689 .4723907
      ATT_3 -1.960418 1.029089 -1.91 0.057 -3.977396 .0565602
      I made the above table in word for your reference. But i want stata to generate a table like this for my use. Is that possible?

      Comment


      • #4
        Ahhh ok
        that is slightly different.
        you could just copy the information from r(table)

        HTML Code:
        m1
        estat simple
        matrix b = r(table)'
        
        m2
        estat simple
        matrix b = b\r(table)'
        
        m3
        estat simple
        matrix b = b\r(table)'
        
        matrix list b
        So the rest is playing with the matrix "b"

        Comment


        • #5
          I got it! Thank you so much FernandoRios

          Comment


          • #6
            Hi, I was wondering how did you extract the ATT effects only without the long every year effects when you export the results? Thank you so much!!!
            Last edited by Cami Zhang; 11 Jul 2024, 11:56.

            Comment


            • #7
              Estat simple

              estat event
              etc
              see helpfile for post estimation

              Comment

              Working...
              X