Announcement

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

  • Confusion about the example in STATA help file of didregress

    Today I read the detail description of didregress from STATA. from page 6 and 7, there is a point that I have not yet been cleared

    The setting is on page 6

    A health provider is interested in studying the effect of a new hospital admissions procedure on the satisfaction of patients. The provider has monthly data on patients from January to July. The new admissions procedure was implemented in April by hospitals that were under new management. Of the 46 hospitals in the study, 18 implemented the new procedure.
    And the results of the regression on page 7
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	125.5 KB
ID:	1682021



    I do not understand the part highlighted above. I am still consufed about the number 1 1 4 4 at the second segment of the first table above. I try to read the example many times but still get lost in this case.

  • #2
    If you write...

    Code:
    use https://www.stata-press.com/data/r17/hospdd
    codebook month, tab(100)
    ...you will see that the month april has the value 4 in the variable month. The part of the table that they elaborate in the example is, that the second coloumn in the time-segment of the table tells you that the earliest time that some hospitals adobted the new procedure was in april and the latest time any hospital adopted the treatment was also in april. In other words, all units in the treatment group adopted the new procedure at the same time, meaning that they were treated at the same time. This is relevant information, because in the case where there were differences in timing of the treatment of the treatment group, e.g. some hospitals adopted the procedure in April while others adopted it in May, you would have to use a DiD setup which alloewed for differences in treatment timing, a so-called staggered DiD.

    Comment


    • #3
      Originally posted by Emil Alnor View Post
      If you write...

      Code:
      use https://www.stata-press.com/data/r17/hospdd
      codebook month, tab(100)
      ...you will see that the month april has the value 4 in the variable month. The part of the table that they elaborate in the example is, that the second coloumn in the time-segment of the table tells you that the earliest time that some hospitals adobted the new procedure was in april and the latest time any hospital adopted the treatment was also in april. In other words, all units in the treatment group adopted the new procedure at the same time, meaning that they were treated at the same time. This is relevant information, because in the case where there were differences in timing of the treatment of the treatment group, e.g. some hospitals adopted the procedure in April while others adopted it in May, you would have to use a DiD setup which alloewed for differences in treatment timing, a so-called staggered DiD.
      Dear Emil Alnor , it is totally interesting to me.
      I am wondering can the maximum of the control group higher than 1 still satisfies the in-variant treatment timing (I mean, not staggered DiD)

      Comment


      • #4
        Originally posted by Phuc Nguyen View Post

        Dear Emil Alnor , it is totally interesting to me.
        I am wondering can the maximum of the control group higher than 1 still satisfies the in-variant treatment timing (I mean, not staggered DiD)
        I am not an expert in this area but I am fairly sure that, yes whether you should use staggered DiD depends on the whether all the units in the treatment group were treated at the same time or not. Based on your previous posts on this forum, what you should consider in your case is whether all the firms in your data set was exposed to the anti-corruption policy at the same time or not.

        As a side note I would encourage you to provide a data example of your data using -dataex- in your other post, so that others could answer whether you have specifiec your did model using xtreg correctly. It is nice to have Stata do the things for you, but I found that specifiying your models using the variations of the reg-model forces you to have a econometric understanding of what is actually going on.

        To clarify the contents of the table: Say some hospitals in the control group were observed in all the months while some other hospitals in the control group were observed in all months but January, i.e., the first time they were observed was February. Then the contents of the second column would be minimum==1 and maximum==2 for the control group. You can see this if you do

        Code:
        drop if month == 1 & inrange(hospital, 44, 46)
        
        didregress (satis) (procedure), group(hospital) time(month)
        Last edited by Emil Alnor; 15 Sep 2022, 04:40. Reason: uncertainty

        Comment


        • #5
          Originally posted by Emil Alnor View Post

          I am not an expert in this area but I am fairly sure that, yes whether you should use staggered DiD depends on the whether all the units in the treatment group were treated at the same time or not. Based on your previous posts on this forum, what you should consider in your case is whether all the firms in your data set was exposed to the anti-corruption policy at the same time or not.

          As a side note I would encourage you to provide a data example of your data using -dataex- in your other post, so that others could answer whether you have specifiec your did model using xtreg correctly. It is nice to have Stata do the things for you, but I found that specifiying your models using the variations of the reg-model forces you to have a econometric understanding of what is actually going on.

          To clarify the contents of the table: Say some hospitals in the control group were observed in all the months while some other hospitals in the control group were observed in all months but January, i.e., the first time they were observed was February. Then the contents of the second column would be minimum==1 and maximum==2 for the control group. You can see this if you do

          Code:
          drop if month == 1 & inrange(hospital, 44, 46)
          
          didregress (satis) (procedure), group(hospital) time(month)
          Dear Emil Alnor ,

          Many thanks for your kind explanation. In other post, I also provide part of my data as well. Apart from that, from your example above, logically speaking, the bold phrase whether it is first column rather than second column? My intuition is that it is about the control group and the observation of each hospital has been recorded differently (due to lack of data, missing variable or on purpose as in your code),

          Best regards.

          Comment


          • #6
            Originally posted by Phuc Nguyen View Post

            Dear Emil Alnor ,

            Many thanks for your kind explanation. In other post, I also provide part of my data as well. Apart from that, from your example above, logically speaking, the bold phrase whether it is first column rather than second column? My intuition is that it is about the control group and the observation of each hospital has been recorded differently (due to lack of data, missing variable or on purpose as in your code),

            Best regards.
            Dear Phuc Ngyuen,

            I was refering to this post https://www.statalist.org/forums/for...-date-in-stata but maybe you made a later post which included a data example.

            Yes, that is indeed the first coloumn rather than the second coloumn, my mistake, and thanks for pointing out.

            Comment


            • #7
              Originally posted by Emil Alnor View Post

              Dear Phuc Ngyuen,

              I was refering to this post https://www.statalist.org/forums/for...-date-in-stata but maybe you made a later post which included a data example.

              Yes, that is indeed the first coloumn rather than the second coloumn, my mistake, and thanks for pointing out.
              Hi Emil Alnor

              Thank you for clarifying my unclear and a nice discussion.

              Comment


              • #8
                Hi,

                I am trying to use the didregress command and have the same treatment period ie the same number in minimum and maximum rows of the Treatment column but a different min and max in the Control column.
                I can run estat ptrends and get a valid result but Stata is not letting me run estat trendplots which I would really like to do.

                The error message I get is "treatment assignment times vary; not allowed with estat trendplots".

                Has anyone else encountered this problem? I would really appreciate some help with how to fix it!

                Many thanks

                Comment

                Working...
                X