******************************************************************* * IPUMS Midpoints of hours worked and weeks worked intervals for 2008 ******************************************************************* * The labor supply and employment measures of the Census years 1980 * forward are based on the variables uhrswork (usual weekly hours) * and wkswork1 (weeks worked per year). In ACS 2008, these variables are * not available. Instead, hours and weeks worked are coded in intervals * only. This file creates hours and weeks variables for 2008 based * on interval midpoints. * Input file: acs2008raw.dta * Output file: acs2008_wks.dta * Based on code from David Dorn * Updated 03/2010 by M. Wasserman * Updated 10/2019 by H. Enayati ******************************************************************* * Hours and Weeks: Midpoints of intervals ******************************************************************* gen wkswork1=. replace wkswork1=7 if wkswork2==1 replace wkswork1=20 if wkswork2==2 replace wkswork1=33 if wkswork2==3 replace wkswork1=43.5 if wkswork2==4 replace wkswork1=48.5 if wkswork2==5 replace wkswork1=51 if wkswork2==6 ** Flag earnings sample. All of the above except: ** self-employed ** those with missing hours ** those with missing weeks ** those with missing earnings last year ** outlier wage observations gen byte earnsamp=1 replace earnsamp=0 if classwkrd>=10 & classwkrd<=14 replace earnsamp=0 if uhrswork==0 replace earnsamp=0 if wkswork1==0 replace earnsamp=0 if incwage==0 tab earnsamp [aw=perwt] ** generate earnings ** ***Following Hallock, Jin, and Barrington 2014 - truncate at top 5% sum incwage if earnsamp==1, d local x = r(p95) gen incwage_tr = incwage replace incwage_tr = `x' if incwage>`x' gen hrwage=incwage_tr/(uhrswork*wkswork1) replace hrwage=. if earnsamp==0 ******************************************************************** * Compute log wages ******************************************************************** gen ln_hrwage=ln(hrwage) if hrwage!=. *Following Blau and Khan JOLE 2007, I imput wages for those without wages (see page 432) gen hiweek=wkswork1>20 & wkswork1<. reg ln_hrwage i.sex i.multyear i.hiweek age c.age#c.age i.edu_hsch i.edu_scoll i.edu_coll i.black i.hisp i.other i.region i.metro if hrwage>=2 & hrwage<=200 predict yhat *use predicted values for those not employed or with invalid wages replace ln_hrwage = yhat if hrwage<2 | hrwage>200 gen flag_ln_hrwage = hrwage<2 | hrwage>200