Dear Experts,
I have an aggregate time-series data from 2000 to 2013. For each year, the data is aggregated by number of events per cohort (each cohort is the population size in each age-gender combination), as shown below
1. From this data, I need to create a dataset in which age is categorized into 5 groups: 18-39, 40-64, 65-74, 75-85, and >85. Also, I need to sum the numbers of males and female from each age-year ; so that it looks like this:
So events would be the sum of events for those aged 18-39, both males and females, in the year 2000, and so forth.
2. Based on the first table, and if I want to declare the data as panel time-seris in tsset, it seems I have two panel variables (age and gender), I keep getting an error message if I put both of them in the command, so what should I do about this?
Sincerely
Omar
I have an aggregate time-series data from 2000 to 2013. For each year, the data is aggregated by number of events per cohort (each cohort is the population size in each age-gender combination), as shown below
year | age | sex | events | cohort |
2000 | 18 | F | 42 | 32913 |
2000 | 18 | M | 138 | 34813 |
2000 | 19 | F | 36 | 31815 |
2000 | 19 | M | 542 | 33211 |
2000 | 20 | M | 330 | 33131 |
2000 | 20 | F | 33 | 31474 |
year | age | events | cohort (males and females) |
2000 | 18-39 | xxx | xxxxx |
2000 | 40-64 | xxx | xxxxx |
2. Based on the first table, and if I want to declare the data as panel time-seris in tsset, it seems I have two panel variables (age and gender), I keep getting an error message if I put both of them in the command, so what should I do about this?
Sincerely
Omar
Comment