Announcement

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

  • csdid2 w/controls doesn't affect coefficients

    I have some csdid code. Adding dummy controls leaves the coefficients and absolutely unchanged.


    Why?

    Is it merely that the controls are entirely uncorrelated with the event? pwcorr says that this is very much not the case.

    The two lines of code that produce the identical output are:

    Code:
    csdid cbirths, time(birthyr) ivar(countynhg) gvar(dtcsl) notyet  agg(event) cluster(stateicp)
    Code:
    csdid cbirths clr con, time(birthyr) ivar(countynhg) gvar(dtcsl) notyet  agg(event) cluster(stateicp)
    (Yes I know that csdid2 is faster. Yes I get the same outcome with both csdid and csdid2)

  • #2
    Could you show the tab of gvar and year?
    also do this controls vary across cohorts?

    Comment


    • #3
      I'm not at my work computer, so I can't show the tabulation.

      BUT, I can tell you that each dummy variable is also a permanent 'switch' from zero to one at some heterogeneous time after the gvar (by cohort). It may in fact be the case that the switch from zero to one occurs at a time that is unique to each cohort. But I figured that the cohort effects would not grab that variation since the 'switch' timing is different relative to each cohort date.

      For clarity, given three cohort dates, g1, g2, & g3, clr is zero until it switches to one at times: g1+t1, g2+t2, & g3+t3.

      The data is strongly balanced. Let's assume that the timing of the clr dummies are unique to each cohort. If I did show the tabulation of the dummy clr and dtcsl (the gvar), then it would look something like this (obviously with much greater frequencies):

      Click image for larger version

Name:	Untitled.png
Views:	1
Size:	8.1 KB
ID:	1734655
      Attached Files

      Comment


      • #4
        I will wait to see the full tabulations
        because based on what you are showing me , seems that there is no variation across cohorts, which will be a problem

        Comment


        • #5
          Thanks for your patience and guidance. Below are three tabulations:
          1. gvar vs control (dtscl clr)
          2. time vs control (birthyr clr)
          3. time vs gvar (birthyr dtcsl)
          Click image for larger version

Name:	Untitled.png
Views:	1
Size:	349.0 KB
ID:	1734982

          Comment


          • #6
            Ok the problem is lack of overlapping
            ypu should not see any zeroes I. The first two
            tabulaTions

            Comment


            • #7
              OK!
              In my own words:
              "Not only do individuals need to overlap over time within each cohort, but there must also be overlap across controls within each cohort (and within the tvar, because there are controls tvar, cohort, and cohort-year)."
              Is my expression of the issue correct?

              However, if I drop the cohorts that have zeros in the first table, and I drop all of the years with zeros from the 2nd table, then I am still get the exact same output with and without the control.

              HTML Code:
              csdid2 cbirths,      time(birthyr) ivar(countynhg) gvar(dtcsl) notyet  agg(event) cluster(stateicp)
              csdid2 cbirths clr , time(birthyr) ivar(countynhg) gvar(dtcsl) notyet  agg(event) cluster(stateicp)


              Below are the updated tabulations:
              Click image for larger version

Name:	Untitled2.png
Views:	1
Size:	47.9 KB
ID:	1735002


              I probably get identical results due to the lack of clr overlap within cohort-years?
              Last edited by Zachary Bartsch; 24 Nov 2023, 08:25.

              Comment


              • #8
                It’s something else
                i would consider doing couple of atts by hand and see what is going on
                choose a treated group. Choose a year of analysis with the g-1 year
                estimate effects by hand for that simple 2x2
                that will tell you what’s happening

                Comment

                Working...
                X