Table needed for state data: 18-24 yr olds; not working not in school, and in labor force no postsecondary degree

Hoping to get some guidance on generating a table to capture, on a state-level, the number of 18-24 year-olds in 016 that were: (1) not working, not in school; (2) in labor force, no postsecondary degree.

Assuming you are using the weighted Census and ACS data samples, one way you can accomplish this is by downloading the following variables and using the following commands (if you are using Stata). If you are using CPS data or another data set, then the variables and Stata commands may differ from what I have outlined below.

***Variables Needed for Census and ACS data




educ (select the detailed version of this variable “educd”)

If you are using Stata, you can run the following commands to get what you are looking for:


***This will generate a dummy variable that identifies people between 18 and 24

gen age_18_24 = age>=18 & age<=24

***This will generate a dummy variable that identifies people in the LF who are not working

gen not_work_but_in_lf = empstat==2

***This will generate a dummy variable that identifies people who are not in school

gen not_in_school = school==1

***This will generate a variable that identifies people who do not have any post-secondary schooling

gen no_ps = educd<=64

***This will generate a dummy variable for people in your sample who meet all your criteria

gen count = age_18_24==1 & no_work_but_in_lf==1 & not_in_school==1 & no_ps==1

***This will generate the population estimate for the individuals in your sample that meet all your criteria which uses the weighting variable “perwt” to make a weighted sum

collapse (sum)count [pweight = perwt]


If you want to get these figures regionally or over time, you need to add a “by” command to the collapse command at the end of your code.

An example of this would be:

collapse (sum)count [pweight = perwt], by(year)

which will give you the count by year


collapse (sum)count [pweight = perwt], by(statefip)

which will give you the count by state


collapse (sum)count [pweight = perwt], by(statefip year)

which will give you the count by state and year

If you need any further guidance, you can email me at and I will be happy to help.

What you are trying to accomplish could be done using either IPUMS USA or IPUMS CPS. Furthermore, you could either create a data extract and make a table using a program such as Stata, SPSS or SAS, or you could make use of our Online Analysis Tool (IPUMS USA | IPUMS CPS).

We have online tutorials which will guide you through a custom extract and the Online Analysis Tool. In either case, you will first need to create an account to use IPUMS.

As an example, using IPUMS CPS, you will need the following:

  • A geographic variable to identify your area of interest, such as STATEFIP.

  • A work variable, such as EMPSTAT, to identify those individuals who are in the labor force/not in the labor force and those who are employed/not employed.

  • AGE

  • Education variables; EDUC will give you a respondent’s educational attainment by the highest year of school or degree completed, while SCHLCOLL will indicate whether respondents age 16 to 24 (or 16 to 54 for ASEC 2013 onward) were enrolled in high school or college during the previous week.

  • The time frame of interest (i.e. 2010-2016).

The specifics of how to actually create a table will depend on which approach you use (data extract or online analysis). If you have further questions, you can post them here or email