setmoreoffclearall*NOTE: Users will need to create their own directory and relative directories global base "/your_directory"global code ${base}code/global output ${base}output/*load_epiextracts is an easy way to load a selection of years and variables * of the EPI CPS extracts into memory. First, install the Stata package with*See https://microdata.epi.org/basicuse/ for use information.*net install load_epiextracts, from("https://microdata.epi.org/stata")* load CPS ORG: wage, wbhoload_epiextracts, begin(2022m1) end(2022m12) sample(ORG) keep(yearmonth orgwgt age emp selfemp wage statefips)tempfile allthedatasave`allthedata'* definesamplekeepif age>=16keepif emp==1keepif selfemp!=1 & selfemp!=.* Calculate wage deciles, byyear and statefipsuse`allthedata', clearbinipolate wage [pw=orgwgt/12], binsize(.50) by(year statefips) collapsefun(gcollapse) p(10 20 30 40 50 60 70 80 90)*Turn statefips labels into stringsdecode statefips, gen(states)drop statefips*Reshape datawidereshapewide wage_binned, i(year percentile) j(states) string*Export state wage deciles to csv fileexport delim ${output}state_wage_deciles.csv, replace