Announcement

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

  • csdid dropping observations

    Hi all, I'm having some trouble with the csdid command and was hoping someone would be able to help. I'm using Stata 17.0, and csdid/drdid were installed from ssc roughly a month ago.

    I'm working on an event study, where I am comparing people who moved and switched medical practice type (from primary only to multispecialty, or vice versa) to those who moved and stayed in the same practice type. I'm running the event study twice, once for those who started in a primary practice and once for those who started in a multispecialty practice. The command I'm having trouble with is as follows:

    Code:
    csdid total_spending i.hrr if prim_start == 1, ivar(beneficiary_id) time(year) gvar(prim_treated)
    where total_spending is the outcome variable of interest, hrrs are fixed effects on location, prim_start is an indicator variable for having started in a primary-only practice, beneficiary_id is an id variable, year is year, and prim_treated is an indicator for whether the beneficiary switched practice types multiplied by the year that they moved. Also relevant is that (for other reasons) I have dropped the year that the person moved from the dataset, so my relative year variable goes ... -2, -1, 1, 2, ...

    When I run the command without the hrr fixed effects, both regressions look as I'd expect. However, when I run it with the hrr fixed effects, the regression for those starting in a primary-only practice omits a large percentage of the observations. I might expect this, but the regression for those starting in a multispecialty practice looks normal. I'm not sure what the difference might be. I also manually (using areg) ran the same event study by year groups, and nothing was omitted.

    Has anyone seen this problem (or one similar) before? I'm not sure what to do. Happy to provide more specific information about my dataset if that would help.

  • #2
    Hi Grabriel
    Keep in mind that you can only include hrr in the model specification only if there is overlapping.
    In other wors, if you tabulate hrr and prim_treated, there cannot be a single case with zero observations.

    The other problem may be related to the method. The default with csdid is using dripw which calls on estimating a logit first, then the main model of interest.
    While the outcome model could be estimated with many fixed effects, the logit one is far more sensitive to adding fixed effects, which could explain your results
    F

    Comment


    • #3
      Hi Fernando,

      Thank you so much for your response! There are a few times when there is no overlapping, so that looks like it is my issue. Thank you also for the note on the dripw method, that makes a lot of sense. csdid is a great package, thanks for making it!

      Comment

      Working...
      X