Announcement

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

  • Hi @FernandoRios,

    I am using csdid. I have a few questions about the csdid's output. Here is an example of my code:

    csdid rpcinccpi distCBD if cty==1, ivar(StationID) time(year2) gvar(openingyear2) notyet long2
    estat simple
    estat calendar
    estat group
    estat event
    csdid_plot, title("Event-Study")
    estat pretrend
    Is estat simple equation (3.10) in Callaway and Sant’Anna (2021)? Further, I assume that estat event generates the "Event study" line of estimates in Table 3 of Callaway and Sant’Anna (2021)?

    Thanks for your help in advance!

    -Erik
    Last edited by Erik Nelson; 16 Jun 2025, 12:42.

    Comment


    • 1) Yes, that is the idea
      2) No, the original paper CS(2021) produced "Dynamic" effectplot that is replicated if ou drop the long2 option. However, most people like the traditional event/like plot that is what you observe

      Comment


      • Dear Fernando,

        I'm using the Stata csdid package as part of my job market paper. In the main specification, I cluster the standard errors at the district level (around 400 districts). As a robustness check, I, however, need to show that the results are robust when clustering at a more aggregate level (regions, 11 in total). For this purpose, I'm using wild bootstrap within the csdid command. I'm sharing the code that I'm using for this purpose below. I'm a bit surprised by how large the t statistics still is after wild bootstrapping standard errors. When I replicate the results with standard TWFE and wild bootstrap standard errors there, the p values get much larger - this may partly be due to smaller coefficients when using TWFE but I'm not sure the difference in how the statistical significance of the results changes with and without bootstrap standard errors should be so large. Could you please check the code to see if I'm applying the wild bootstrap command correctly? (I tried to closely follow the example in the Stata helpfile).

        Code:
        gen gvar = cond(reformyear== ., 0, reformyear) // group variable as required for the csdid command
        
        csdid $outcome, time(birthyear) gvar(gvar) method(reg) agg(simple) cluster($se_distr)  
        
        csdid $outcome, time(birthyear) gvar(gvar) method(reg) cluster($se_region) wboot rseed(1212) saverif(_rif_) replace 
            
        use _rif_, clear
        
        csdid_rif ATT  , wboot reps(2000) cluster($se_region) seed(1212)
        Here are screenshots from the results window (1) after wild bootstrapping standard errors (I'm not showing the first part of the results here as the table is very large with lots of comparisons) and (2) with the more disaggregately clustered standard errors:

        Click image for larger version

Name:	wildbootstrap results.jpg
Views:	1
Size:	46.4 KB
ID:	1778998


        Click image for larger version

Name:	clustered results district level.jpg
Views:	1
Size:	104.5 KB
ID:	1778999


        Thanks a lot in advance!

        Kind regards,
        Anne

        Comment


        • There is something else going on here.
          Your results using csdid_rif and estat simple should be the same. Would need to double check what you are getting

          Comment


          • Thank you for your response! Is there anything you'd need from me to do that?

            Comment


            • Reproducible example

              Comment


              • Alright. I will share one with you on Monday/ Tuesday.

                Comment


                • Just a heads up:
                  I shared the data and code via email with you yesterday.

                  Comment


                  • Yes Saw that. Will take at least til friday to look at it

                    Comment

                    Working...
                    X