Hi,
I want to generate a new variable based on criteria.
I have the data for, let's say, 20 different regions and each region has a percentage of child, young and old persons (which equals to 100%).
It looks like this:
Regions--child-- young--old
region 1--25--20--55
region 2--50--50--00
.
.
.
region 20-- 75--20--5
Now I want to divide regions into 3 different categories, i.e., regions with a majority of children, regions with a majority of young ones, and regions with a majority of old ones.
Here each category would be represented by a dummy (0.1).
Could you please tell me, how can I do this in stata?
I want to generate a new variable based on criteria.
I have the data for, let's say, 20 different regions and each region has a percentage of child, young and old persons (which equals to 100%).
It looks like this:
Regions--child-- young--old
region 1--25--20--55
region 2--50--50--00
.
.
.
region 20-- 75--20--5
Now I want to divide regions into 3 different categories, i.e., regions with a majority of children, regions with a majority of young ones, and regions with a majority of old ones.
Here each category would be represented by a dummy (0.1).
Could you please tell me, how can I do this in stata?
Comment