Hello-- I have been working on implementing Calloway and Sant'Anna's staggered DID specification using
. I have developed a collapsed state-level balanced panel pre-estimation. I run the following code on the entire sample (of all consumers in my dataset) and csdid produces an estimate of the ATT (of the change in SNAP -- or food stamps-- spending after a change in a specific SNAP policy):
.
The issue arises when I create a sub-sample of SNAP participants, then collapse the data to the state level and run the same specification. When I do this, I get the error: "estimates post: matrix has missing values". I use
and confirm that there are no missing values in any of the variables used. I use
and see one observation per time period for each state-- which is the expected data format. There isn't much documentation on the command and clicking on the error doesn't really say much, other than this error isn't really common anymore in new versions of Stata (I am using 18). I'm befuddled as to why the code would be error-less for the entire sample, but in a similarly structured dataset on a subsample generates an error. I'm not able to include a data example, as I am working with disclosure-protected proprietary data, but would very much appreciate any insight into what could be generating this error and how I can effectively troubleshoot it. Thank you in advance for any help you can provide!
Code:
csdid
Code:
csdid snap_spending snap_policy ui_policy $state_control $hh_control_collapse [w = weight], ivar(state) time(time) gvar(cohort) agg(simple)
The issue arises when I create a sub-sample of SNAP participants, then collapse the data to the state level and run the same specification. When I do this, I get the error: "estimates post: matrix has missing values". I use
Code:
misstable summarize, all
Code:
tab state time