Announcement

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

  • csdid pannel resulting in all ommisions

    Hello all!

    I am working through a staggered did model where I am looking at the impact of policy implementation (VarA) on total real dollars (VarB) in a panel dataset. When I try to run csdid everything is being committed.

    So far, here is what I have tried:

    Code:
    csdid totaldollars, ivar(state) time(year) gvar(treatmentyear) method(dripw)
    Click image for larger version

Name:	Screenshot 2023-10-22 at 9.27.54 AM.png
Views:	1
Size:	72.2 KB
ID:	1731154


    I first tired adjusting my variable based on inflation-generating adjtotaldollars but the results were the same. I also did log of the variable and std(totaldollars) but all resulted in the same.

    Here is the xtreg results:
    Click image for larger version

Name:	Screenshot 2023-10-22 at 9.30.55 AM.png
Views:	1
Size:	50.2 KB
ID:	1731155





    Click image for larger version

Name:	Screenshot 2023-10-22 at 9.34.09 AM.png
Views:	1
Size:	74.7 KB
ID:	1731157


    Click image for larger version

Name:	Screenshot 2023-10-22 at 9.32.33 AM.png
Views:	1
Size:	21.1 KB
ID:	1731158


    Any help or ideas would be greatly appreciated!
    Attached Files

  • #2
    Start with something simple
    Do
    tab year gvar
    thanks
    also make sure you have drdid installed
    Last edited by FernandoRios; 22 Oct 2023, 09:12.

    Comment


    • #3
      Here are the results. I double checked and I have drdid installed


      Click image for larger version

Name:	Screenshot 2023-10-22 at 3.49.33 PM.png
Views:	1
Size:	39.1 KB
ID:	1731185

      Click image for larger version

Name:	Screenshot 2023-10-22 at 3.50.11 PM.png
Views:	1
Size:	33.7 KB
ID:	1731186

      Click image for larger version

Name:	Screenshot 2023-10-22 at 3.50.52 PM.png
Views:	1
Size:	39.1 KB
ID:	1731187

      Comment


      • #4
        Ok that is your error
        except for 1 or 2 cohorts
        you are not observing treated cohorts before treatment
        for example the gvar2004 is zero before 2004

        Comment


        • #5
          Ok that makes sense, so for this to work the gvar value should be applied for years before treatment? For example, for a particular data set, they started the policy in 2004, and currently, I have all years before 2004 as zero for this data set. It should be 2004 for all years if they implemented the policy?

          Comment


          • #6
            Exactly,
            Gvar tells you when a unit would be treated (present past or future) not IF it was treated.
            So if unit 1 is treated in 2004, gvar=2004 at time 2000 , 2004 or 2020.

            Hope this helps
            F

            Comment


            • #7
              Thank you! That worked great!!

              Comment

              Working...
              X