I will like to find out how I can use egen to find
1. how do i create a new variable which is the percentage of 17-20 years in poverty in each district.
2. how do I create two variable which has min and max percentage of young adults age 17 - 20 at the schools district levels within the state?
3. how do I create a new dataset which will have a min and max percentage of young adults in poverty at school districts for each state?
4. how do I generate a new variable, which is the difference between the smallest and the largest percent of children in poverty
Sample of my data below:
state postal code | State FIPS Code | District ID | Name | Total Population | Population 17 -20 | Estimated Number of relevant young between ages 17 to 20 years old in poverty who are related to househould |
Al | 01 | 00190 | Alabaster Ciety school district | 34,015 | 6,703 | 860 |
Al | 01 | 00020 | Albertville city school | 21,786 | 2,659 | 1,546 |
AL | 02 | 00030 | Alexander City school | 17,073 | 2,659 | 832 |
AL | 02 | 00060 | Andalusia City School | 8,854 | 1,444 | 386 |
AL | 03 | 00090 | Andalusia | 22,350 | 3184 | 1,106 |
AL | 03 | 00100 | Anthes | 22,668 | 3,340 | 870 |
0 Response to Using egen function to create variables
Post a Comment