Hi all. Say I have a data set of date of births from 2010-2016. Each entry is a birth comprised of a lot of variables like date of birth year, date of birth month, illness, birthweight, and so on. I was able to collapse the data set by year by generating a count variable that adds up the number of births within a year, then collapse by(year). However, now I want the data to look like so that there are 3 variables: date of birth year, date of birth month, total births. So first column would have 12 entries of 2010, then 12 entries of 2011, and so on. The second column would be Jan, Feb,.... The third column is the number of births in the month and year in the same row. How would you do that? Thank you.
-
Login or Register
- Log in with
Comment