Announcement

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

  • Count Data and Staggered DiD

    Hi All,

    I am trying to run a staggered DiD with count data on the LHS (patent count). CSDID doesn't work as it tells me "Error in DRDID::drdid_rc(y = Y, post = post, D = G, covariates = covariates, :
    The regression design matrix for pre-treatment is singular. Consider removing some covariates." which I think that might come from the fact that I have many zeros.
    I read that the etwfe a la Wooldridge (2021,2023) might be able to work with this. Any idea on this matter?

    Thank you and have a nice day!



  • #2
    jwdid has poisson method.

    Comment


    • #3
      I doubt that the mistake you're getting with csdid has to do with Y being a count variable. But it probably would be better to use Poisson regression. The one thing about jwdid is that it doesn't give you level effects, only the proportionate effects. The latter are certainly useful -- maybe even the most useful -- but then you can't compare with a linear analysis. You can use jwdid for both the linear and exponential (Poisson).

      Comment


      • #4
        Originally posted by Jeff Wooldridge View Post
        I doubt that the mistake you're getting with csdid has to do with Y being a count variable. But it probably would be better to use Poisson regression. The one thing about jwdid is that it doesn't give you level effects, only the proportionate effects. The latter are certainly useful -- maybe even the most useful -- but then you can't compare with a linear analysis. You can use jwdid for both the linear and exponential (Poisson).
        maybe the combination of count variable + many zeros? Or are you hinting at some other issues in my panel?

        Thank you very much!

        Comment


        • #5
          csdid should provide estimates for any kind of outcome variable. Now, if there’s poor overlap in the covariates that can cause problems. You should really show a sample of your data and exactly the command you typed. In simulations I’ve applied csdid to binary outcomes and count outcomes with lots of zeros and never had any problem.

          Comment


          • #6
            Originally posted by Jeff Wooldridge View Post
            csdid should provide estimates for any kind of outcome variable. Now, if there’s poor overlap in the covariates that can cause problems. You should really show a sample of your data and exactly the command you typed. In simulations I’ve applied csdid to binary outcomes and count outcomes with lots of zeros and never had any problem.
            Hi Jeff!
            I am trying to run JWDID with not yet treated as controls, and at the same time have pretreatment coefficients for parallel trend assumption.
            I first calculate IPWs using, e.g. for treated cohorts 2014, the units in cohorts [2015,2025]. Cohorts [2023,2025] are recoded as never treated and they only function as control cohorts. Then, I try to use JWDID, but if I use the 'never' option, cohorts [2023,2025] are the only controls used, while if I remove it I cannot have pretreatment coefficients as the command assumes that parallel trends hold. Considered that I have a count variable on the left hand side (patent count), that the treatment is staggered, and that I would like to use the ppmlhdfe, what are my options? Maybe toremove 'never' and do an ad-hoc event study on the side to complement it?

            Thank you and have a nice day.

            Salvo

            Comment


            • #7
              First, I don't understand the role of IPW here. It's actually tricky to combine that with nonlinear DID. Aside from that, regression-type methods don't allow you to both use the not-yet-treated as controls and also estimate pre-trends. You might be able to do something "by hand" but I think what would happen is you'd wind up using jwdid without the "never" option for the actual ATTs and then use the "never" option for the pre-trends.

              Comment

              Working...
              X