I need to create a two column dataset by age-class and number of events. I can do so manually by using
Code:
tab age events
Here's sample dataset which should give you something like age: 18; events: 12 (here event is codified by 0) , age 19; events: counts of 0s, and so on.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int age byte event 18 0 18 0 28 0 18 0 38 1 18 0 48 0 18 0 58 0 18 0 68 1 18 0 38 0 18 1 18 0 68 0 18 0 18 0 18 0 18 0 end
0 Response to calculating frequency of events by age-class
Post a Comment