I created a wide dataset where 'm201509' to 'm201512' are binary variables indicating that the PersonID received subsidy in the given month.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(ID PersonID m201509 m201510 m201511 m201512) 1 11 . . 1 1 1 12 1 1 1 1 1 13 1 . . . 1 14 . 1 . . 1 15 . . . . 2 16 1 . . . 2 17 . . . . 2 18 . . 1 1 end
(The missings should be 0 as the PersonID did not get subsidized)
Then, I would like to count the number of PersonID who was ever subsidized.
Thank you in advance!!
0 Response to Conditioning on wide variables
Post a Comment