*Purpose: Create histogram of RNs not in labor force by age *Author: Martha Johnson *Date: January 13, 2020 *Data: IPUMS-USA 2017 ACS 5yr *Sample restriction: STATEFIP=36 and AGE 18-65 *Variables used: age, occ, empstat, perwt clear all set more off *set directory global input "U:\NY Nurse Project\input" global output "U:\NY Nurse Project\output" *load data use "$input\usa_00009", clear *what percentage of those not in labor force and age 18-65 are age 55+? gen age55to65=age>=55 tab age55 if occ==3255 & empstat==3 [fweight=perwt] *histogram of RNs not in labor force by age keep if occ==3255 la var age "Age" histogram age if empstat==3 [fweight=perwt], name(occ, replace) /// fraction discrete width(1) start(18) scheme(s1mono) xlabel(#10) ylabel(#10, angle(horizontal)) graph export "$output\histogram_age_rns_nilf.png", replace