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:
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.
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)
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.
Comment