Appendix 2: Employment Variable Creation

Return to Appendix 2
Return to Table of Contents


Hourly Rate of Pay

Variables Created: CV_HRLY_PAY.xx

Variables Used

Name in Program

Question Name in Data

Name in Program

Question Name in Data

E1920001-E1920011  

YEMP-19200.01-.11       

E3810301  

YEMP-38103.01       

E2290001-E2290010  

YEMP-22900.01-.10

E3810302  

YEMP-38103.02       

E2300001-E2300011  

YEMP-23000.01-.11       

E3810303  

YEMP-38103.03       

E2320001  

YEMP-23200.01       

E3810304  

YEMP-38103.04       

E2320002  

YEMP-23200.02       

E3810305  

YEMP-38103.05       

E2320003  

YEMP-23200.03       

E3810601  

YEMP-38106.01       

E2390001  

YEMP-23900.01       

E3810602  

YEMP-38106.02        

E2390101-E2390111  

YEMP-23901.01-.11       

E3810603  

YEMP-38106.03       

E3340001  

YEMP-33400.01       

E3810604  

YEMP-38106.04       

E3340002  

YEMP-33400.02       

E3810605  

YEMP-38106.05       

E3340003  

YEMP-33400.03       

E3810701  

YEMP-38107.01       

E3340004  

YEMP-33400.04       

E3810702  

YEMP-38107.02       

E3340005  

YEMP-33400.05       

E3810703  

YEMP-38107.03       

E3340006  

YEMP-33400.06       

E3810704  

YEMP-38107.04       

E3350001  

YEMP-33500.01       

E3810705  

YEMP-38107.05       

E3350002  

YEMP-33500.02       

E3811601  

YEMP-38116.01       

E3350003  

YEMP-33500.03       

E3811602  

YEMP-38116.02       

E3350004  

YEMP-33500.04       

E3811603  

YEMP-38116.03        

E3350005  

YEMP-33500.05       

E3811604  

YEMP-38116.04       

E3360001  

YEMP-33600.01       

E3811605  

YEMP-38116.05       

E3360002  

YEMP-33600.02       

E8310001-E8310007  

YEMP-83100.01-.07       

E3360003  

YEMP-33600.03        

E8680001-E8680007  

YEMP-86800.01-.07       

E3360004  

YEMP-33600.04       

E8690001-E8690007  

YEMP-86900.01-.07       

E3440201  

YEMP-34402.01       

E8710001  

YEMP-87100.01       

E3440202  

YEMP-34402.02       

E8710002  

YEMP-87100.02       

E3440203  

YEMP-34402.03       

E8710003  

YEMP-87100.03       

E3440204  

YEMP-34402.04       

E8710004  

YEMP-87100.04       

E3440205  

YEMP-34402.05       

E8780002  

YEMP-87800.02       

E3440206  

YEMP-34402.06        

E8800001-E8800007  

YEMP-88000.01-.07       

E34402AAB01

YEMP-34402AAB.01    

E9730001  

YEMP-97300.01       

E34402AAB02

YEMP-34402AAB.02    

E9730002  

YEMP-97300.02       

E34402AAB03

YEMP-34402AAB.03    

E9730003  

YEMP-97300.03        

E34402AAB04

YEMP-34402AAB.04    

E9730004  

YEMP-97300.04       

E34402AAB05

YEMP-34402AAB.05    

E9730005  

YEMP-97300.05       

E34402AAD01

YEMP-34402AAD.01    

E9730006  

YEMP-97300.06       

E34402AAD02

YEMP-34402AAD.02    

E9740001  

YEMP-97400.01       

E34402AAD03

YEMP-34402AAD.03    

E9740002  

YEMP-97400.02       

E34402AAD04

YEMP-34402AAD.04    

E9740003  

YEMP-97400.03       

E34402AAD05

YEMP-34402AAD.05    

E9740004  

YEMP-97400.04       

E34402AB01

YEMP-34402AB.01     

E9740005  

YEMP-97400.05       

E34402AB02

YEMP-34402AB.02     

E9750001  

YEMP-97500.01       

E34402AB03

YEMP-34402AB.03     

E9750002  

YEMP-97500.02       

E34402AB04

YEMP-34402AB.04     

E9750003  

YEMP-97500.03       

E3442801  

YEMP-34428.01       

E9750004  

YEMP-97500.04       

E3442802  

YEMP-34428.02       

E9830001  

YEMP-98300.01       

E3442803  

YEMP-34428.03       

E9830002  

YEMP-98300.02       

E3442804  

YEMP-34428.04       

E9830003  

YEMP-98300.03       

E3443001  

YEMP-34430.01       

E9840201  

YEMP-98402.01       

E3560001  

YEMP-35600.01       

E9840202  

YEMP-98402.02       

E3560002  

YEMP-35600.02       

E9840203  

YEMP-98402.03       

E3560003  

YEMP-35600.03        

E9840204  

YEMP-98402.04       

E3560004  

YEMP-35600.04       

E9840205  

YEMP-98402.05       

E3610001  

YEMP-36100.01       

E9840206  

YEMP-98402.06       

E3610002  

YEMP-36100.02       

E98402CAA01

YEMP-98402CAA.01    

E3610003   

YEMP-36100.03       

E98402CAA02

YEMP-98402CAA.02    

E3610004  

YEMP-36100.04       

E98402CAA03

YEMP-98402CAA.03    

E3620001  

YEMP-36200.01       

E98402CAA04

YEMP-98402CAA.04    

E3620002  

YEMP-36200.02       

E98402CAA05

YEMP-98402CAA.05    

E3620003  

YEMP-36200.03       

E98402CAB01

YEMP-98402CAB.01    

E3620004  

YEMP-36200.04       

E98402CAB02

YEMP-98402CAB.02    

E22604011 

YEMP-22604.01~000001

E98402CAB03

YEMP-98402CAB.03    

E22604012 

YEMP-22604.01~000002

E98402CAB04

YEMP-98402CAB.04    

E22604021 

YEMP-22604.02~000001

E98402CAB05

YEMP-98402CAB.05    

E22604022 

YEMP-22604.02~000002

E98402D01 

YEMP-98402D.01      

E22604031 

YEMP-22604.03~000001

E98402D02 

YEMP-98402D.02      

E22604032 

YEMP-22604.03~000002

E98402D03 

YEMP-98402D.03      

E22604041 

YEMP-22604.04~000001

E98402D04 

YEMP-98402D.04      

E22604042 

YEMP-22604.04~000002

E9842901  

YEMP-98429.01       

E2260901  

YEMP-22609.01.01    

E9842902  

YEMP-98429.02       

E2260902  

YEMP-22609.02.01    

E9842903  

YEMP-98429.03       

E2260904  

YEMP-22609.04.01    

E9950001  

YEMP-99500.01       

E2261001  

YEMP-22610.01.02    

E9950002  

YEMP-99500.02       

E2261002  

YEMP-22610.02.02    

E9950003  

YEMP-99500.03       

E2262601  

YEMP-22626.01.01    

E9950004  

YEMP-99500.04       

E2262602  

YEMP-22626.02.01    

E10000001 

YEMP-100000.01      

E2262604  

YEMP-22626.04.01    

E10000002 

YEMP-100000.02      

E38000B01-E38000B11 

YEMP-38000B.01-.11      

E10000003 

YEMP-100000.03      

E38000F01-E38000F10 

YEMP-38000F.01-.10      

E10000004 

YEMP-100000.04      

E3800201  

YEMP-38002.01       

E10010001 

YEMP-100100.01      

E3800202  

YEMP-38002.02       

E10010002 

YEMP-100100.02      

E3800203  

YEMP-38002.03       

E10010003 

YEMP-100100.03      

E3800204  

YEMP-38002.04       

E10010004 

YEMP-100100.04      

E3800205  

YEMP-38002.05       

E100225011

YEMP-100225.01~000001

E3801301-E3801311  

YEMP-38013.01-.11       

E100225012

YEMP-100225.01~000002

E3801401-E3801410  

YEMP-38014.01-.10       

E100225021

YEMP-100225.02~000001

E3802301-E3802310  

YEMP-38023.01-.10       

E100225022

YEMP-100225.02~000002

E38024B01 

YEMP-38024B.01      

E100225031

YEMP-100225.03~000001

E38024B02 

YEMP-38024B.02      

E100225032

YEMP-100225.03~000002

E38024B04 

YEMP-38024B.04      

E100225041

YEMP-100225.04~000001

E38024C01 

YEMP-38024C.01      

E100225042

YEMP-100225.04~000002

E38024C02 

YEMP-38024C.02      

E10023001 

YEMP-100230.01.01   

E38024C04 

YEMP-38024C.04      

E10023002 

YEMP-100230.02.01   

E3802701  

YEMP-38027.01       

E10023101 

YEMP-100231.01.02   

E3802702  

YEMP-38027.02       

E10023102 

YEMP-100231.02.02    

E3802703  

YEMP-38027.03       

E10023103 

YEMP-100231.03.02   

E3802704  

YEMP-38027.04       

E10023104 

YEMP-100231.04.02   

E3802710  

YEMP-38027.10       

E10024801 

YEMP-100248.01.01   

E3810201  

YEMP-38102.01       

E10024802 

YEMP-100248.02.01   

E3810202  

YEMP-38102.02       

E100248E01

YEMP-100248E.01.01  

E3810203  

YEMP-38102.03       

MILFLAG01-MILFLAG11 

YEMP_MILFLAG.01-.11     

E3810204  

YEMP-38102.04       

EUID01-EUID11    

YEMP_UID.01-.11          

E3810205  

YEMP-38102.05       

pubid    

PUBID

Codes for Created Variable

Note that hourly rate of pay is reported with two implied decimal places.

This program creates the hourly rate of pay for NLSY97 respondents. The hourly rate of pay is constructed from stop date information for respondents whose job lasted more than 13 weeks. For all other respondents the start wage is used.


array e19200 e1920001-e1920011;
array e22900 e2290001-e2290011;
array e23000 e2300001-e2300011;
array e23200 e2320001-e2320011;
array e23900 e2390001-e2390011;
array e33400 e3340001-e3340011;
array e34402 e3440201-e3440211;
array e34402ab e34402ab01-e34402ab11;
array e33600 e3360001-e3360011;
array e33500 e3350001-e3350011;
array e34428 e3442801-e3442811;
array e34430 e3443001-e3443011;
array e38013 e3801301-e3801311;
array e38014 e3801401-e3801411;
array e38023 e3802301-e3802311;
array e38106 e3810601-e3810611;
array e38107 e3810701-e3810711;
array e38116 e3811601-e3811611;
array e3800b e38000b01-e38000b11;
array e38027 e3802701-e3802711;
array e23901 e2390101-e2390111;
array e3800f e38000f01-e38000f11;
array e38102 e3810201-e3810211;
array e38103 e3810301-e3810311;
array e83100 e8310001-e8310011;
array e86800 e8680001-e8680011;
array e86900 e8690001-e8690011;
array e87100 e8710001-e8710011;
array e87800 e8780001-e8780011;
array e88000 e8800001-e8800011;
array e97300 e9730001-e9730011;
array e97400 e9740001-e9740011;
array e97500 e9750001-e9750011;
array e98300 e9830001-e9830011;
array e98402 e9840201-e9840211;
array e98402d e98402d01-e98402d11;
array e98429 e9842901-e9842911;
array e98429l e98429l01-e98429l11;
array e99500 e9950001-e9950011;
array e38002 e3800201-e3800211;
array e35600 e3560001-e3560011;
array e22609 e2260901-e2260911;
array e22610 e2261001-e2261011;
array e22626 e2262601-e2262611;
array e100230 e10023001-e10023011;
array e100231 e10023101-e10023111;
array e100248 e10024801-e10024811;
array e38116b e38116b01-e38116b11;
array e34400 e3440001-e3440011;
array e36100 e3610001-e3610011;
array e36200 e3620001-e3620011;
array e100000 e10000001-e10000011;
array e100100 e10010001-e10010011;
array od2comp od2comp01-od2comp11;
array od2pay od2pay01-od2pay11;

array e226041 e22604011 e22604021 e22604031 e22604041 e22604051 e22604061 e22604071 e22604081 e22604091 e22604101 e22604111;
array e226042 e22604012 e22604022 e22604032 e22604042 e22604052 e22604062 e22604072 e22604082 e22604092 e22604102 e22604112;

array e102251 e100225011 e100225021 e100225031 e100225041 e100225051 e100225061 e100225071 e100225081 e100225091 e100225101 e100225111;
array e102252 e100225012 e100225022 e100225032 e100225042 e100225052 e100225062 e100225072 e100225082 e100225092 e100225102 e100225112;


/* arrays added in round 4 */
array e34402aab e34402aab01-e34402aab11;
array e34402aad e34402aad01-e34402aad11;
array e98402caa e98402caa01-e98402caa11;
array e98402cab e98402cab01-e98402cab11;
array e22626c e22626c01-e22626c11;
array e22626cb e22626cb01-e22626cb11;
array e22626e e22626e01-e22626e11;
array e100248c e100248c01-e100248c11;
array e100248cb e100248cb01-e100248cb11;
array e100248e e100248e01-e100248e11;
array e38024b e38024b01-e38024b11;
array e38024c e38024c01-e38024c11;
array endhr1 endhr101-endhr111;
array endhr2 endhr201-endhr211;
array e38116aaa e38116aaa01-e38116aaa11;
array e38116aab e38116aab01-e38116aab11;

/* variables generated in this program */
array unit unit01-unit11;
array days days01-days11;
array daysa daysa01-daysa11; /*number of days per week if they answer per job*/
array weeks weeks01-weeks11;
array perjobu perjobu01-perjobu11;
array perjobt perjobt01-perjobt11;
array hourly hourly01-hourly11;
array weekly weekly01-weekly11;
array amount amount01-amount11; /* which is the amount in the time unit other than hourly.*/
array hoursb hoursb01-hoursb11;
array hours hours01-hours11;
array hrwg hrwg01-hrwg11;

do i=1 to 11;
if e34402[i]>-4 then e34428[i]=-4;
end;


/*----- Initialize the variables ------*/

do i=1 to 11;
unit[i]=-4;
days[i]=-4;
weeks[i]=-4;
perjobu[i]=-4;
perjobt[i]=-4;
hourly[i]=-4;
weekly[i]=-4;
amount[i]=-4;
hoursb[i]=-4;
hours[i]=-4;
end;

/*------------------------------------------------------------------------------------------------

------------------------------------------------ The variables will be created as the following:

The final created variable is called "Hourly", which is the hourly pay. I also what to create the variables
"hours" in this program, which is the number of regular hours a person works per week. This is the variable
that we need in order to calculate hourly compensation later.


For the people who answer "per hour" time unit or answer "per hour" or "per minute" in "pay by item or by job'
I create "hourly" directly. For the people who answer all the other time units. I will calculate "weekly", which
is their weekly pay, and "hours", which is the number of hours they work per week. Dividing "weekly" by "hours",
I can calculate "hourly" for these people.


----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------*/
***** Time Unit;
do i=1 to 11;
if e19200[i] not in (., -4, -5) then unit[i]=e19200[i];
if e22609[i] not in (., -4, -5) then unit[i]=e22609[i];
ELSE IF E226041[I] LT 0 AND E226041[I] NOT IN (.,-4,-5) THEN UNIT[I]=-3;

if e83100[i] not in (., -4, -5) then unit[i]=e83100[i];
if e100230[i] not in (., -4, -5) then unit[i]=e100230[i];
ELSE IF E102251[I] LT 0 AND E102251[I] NOT IN (.,-4,-5) THEN UNIT[I]=-3;

if e38014[i] not in (., -4, -5) then unit[i]=e38014[i];
ELSE IF E38013[I] LT 0 AND E38013[I] NOT IN (.,-4,-5) THEN UNIT[I]=-3;
if e38107[i] not in (., -4, -5) then unit[i]=e38107[i];
ELSE IF E38106[I] LT 0 AND E38106[I] NOT IN (.,-4,-5) THEN UNIT[I]=-3;
end;

***** Number of Days Per Week except e34430 and e98429l because they are not used in "per job" unit;
do i=1 to 11;
if e34402ab[i] not in (.,-4,-5) then daysa[i]=e34402ab[i];
*if e34430[i] not in (.,-4,-5) then daysa[i]=e34430[i];
if e22626e[i] not in (.,-4,-5) then daysa[i]=e22626e[i];
if e98402d[i] not in (.,-4,-5) then daysa[i]=e98402d[i];
*if e98429l[i] not in (.,-4,-5) then daysa[i]=e98429l[i];
if e100248e[i] not in (.,-4,-5) then daysa[i]=e100248e[i];
if e38027[i] not in (.,-4,-5) then daysa[i]=e38027[i];
if e38116b[i] not in (.,-4,-5) then daysa[i]=e38116b[i];
end;

***** Number of Days Per Week including e34430 and e98429l;
do i=1 to 11;
if e34402ab[i] not in (.,-4,-5) then days[i]=e34402ab[i];
if e34430[i] not in (.,-4,-5) then days[i]=e34430[i];
if e22626e[i] not in (.,-4,-5) then days[i]=e22626e[i];
if e98402d[i] not in (.,-4,-5) then days[i]=e98402d[i];
if e98429l[i] not in (.,-4,-5) then days[i]=e98429l[i];
if e100248e[i] not in (.,-4,-5) then days[i]=e100248e[i];
if e38027[i] not in (.,-4,-5) then days[i]=e38027[i];
if e38116b[i] not in (.,-4,-5) then days[i]=e38116b[i];
end;


***** Number of Weeks Per Year;
do i=1 to 11;
if e35600[i] not in (.,-4,-5) then weeks[i]=e35600[i];
if e99500[i] not in (.,-4,-5) then weeks[i]=e99500[i];
end;

***** Time Unit to Finish One Item or Job if reporting "Per Item" or "Per Job";
do i=1 to 11;
if e34402aab[i] not in (.,-4,-5) then perjobu[i]=e34402aab[i];
if e22626c[i] not in (.,-4,-5) then perjobu[i]=e22626c[i];
if e98402caa[i] not in (.,-4,-5) then perjobu[i]=e98402caa[i];
if e100248c[i] not in (.,-4,-5) then perjobu[i]=e100248c[i];
if e38024b[i] not in (.,-4,-5) then perjobu[i]=e38024b[i];
if e38116aaa[i] not in (.,-4,-5) then perjobu[i]=e38116aaa[i];
end;

***** Amount of Time to Finish One Item or Job if Reporting "Per Item" or "Per Job";
do i=1 to 11;
if e34402aad[i] not in (.,-4,-5) then perjobt[i]=e34402aad[i];
if e22626cb[i] not in (.,-4,-5) then perjobt[i]=e22626cb[i];
if e98402cab[i] not in (.,-4,-5) then perjobt[i]=e98402cab[i];
if e100248cb[i] not in (.,-4,-5) then perjobt[i]=e100248cb[i];
if e38024c[i] not in (.,-4,-5) then perjobt[i]=e38024c[i];
if e38116aab[i] not in (.,-4,-5) then perjobt[i]=e38116aab[i];
end;

***** Amount;
do i=1 to 11;
if e22900[i] not in (.,-4,-5) then amount[i]=e22900[i];
if e23000[i] not in (.,-4,-5) then amount[i]=e23000[i];
if e23200[i] not in (.,-4,-5) then amount[i]=e23200[i];
if e23900[i] not in (.,-4,-5) then amount[i]=e23900[i];

if e33400[i] not in (.,-4,-5) then amount[i]=e33400[i];
if e33500[i] not in (.,-4,-5) then amount[i]=e33500[i];
if e33600[i] not in (.,-4,-5) then amount[i]=e33600[i];
if e34400[i] not in (.,-4,-5) then amount[i]=e34400[i];
if e22626[i] not in (.,-4,-5) then amount[i]=e22626[i];

if e86800[i] not in (.,-4,-5) then amount[i]=e86800[i];
if e86900[i] not in (.,-4,-5) then amount[i]=e86900[i];
if e87100[i] not in (.,-4,-5) then amount[i]=e87100[i];
if e87800[i] not in (.,-4,-5) then amount[i]=e87800[i];

if e97300[i] not in (.,-4,-5) then amount[i]=e97300[i];
if e97400[i] not in (.,-4,-5) then amount[i]=e97400[i];
if e97500[i] not in (.,-4,-5) then amount[i]=e97500[i];
if e98300[i] not in (.,-4,-5) then amount[i]=e98300[i];

if e100248[i] not in (.,-4,-5) then amount[i]=e100248[i];

if e38023[i] not in (.,-4,-5) then amount[i]=e38023[i];

if e38116[i] not in (.,-4,-5) then amount[i]=e38116[i];

end;

***** Hours Per Week;

do i=1 to 11;
if e23901[i] not in (.,-4,-5) then hoursb[i]=e23901[i];
if e34402[i] not in (.,-4,-5) then hoursb[i]=e34402[i];
if e34428[i] not in (.,-4,-5) then hoursb[i]=e34428[i];

if e22610[i] not in (.,-4,-5) then hoursb[i]=e22610[i];
else if e226042[i] lt 0 and e226042[i] not in (.,-4,-5) then hoursb[i]=-3;

if e88000[i] not in (.,-4,-5) then hoursb[i]=e88000[i];
if e98402[i] not in (.,-4,-5) then hoursb[i]=e98402[i];
if e98429[i] not in (.,-4,-5) then hoursb[i]=e98429[i];

if e100231[i] not in (.,-4,-5) then hoursb[i]=e100231[i];
else if e102252[i] lt 0 and e102252[i] not in (.,-4,-5) then hoursb[i]=-3;

if e3800f[i] not in (.,-4,-5) then hoursb[i]=e3800f[i];

if e38002[i] in (.,-4,0) then hours[i]=hoursb[i];
else if e38002[i] lt 0 and e38002[i] ne -5 then hours[i]=-3;
else if e38002[i] gt 0 then do;
if hoursb[i] gt 0 then hours[i]=hoursb[i]-e38002[i];
else hours[i]=-3;
end;


if e3800b[i] lt 0 and e3800b[i] not in (-4,-5,.) then hours[i]=-3;

if e38102[i] in (1,3) and e38103[i] not in (.,-4,-5) then hours[i]=e38103[i];
if e38102[i] lt 0 and e38102[i] not in (-4,-5, .) then hours[i]=-3;
end;

***** Hourly Wage by Time Unit;

do i=1 to 11;
if unit[i]=-4 then hourly[i]=-4;
else if unit[i]=1 and hours[i] ne 0 then hourly[i]=amount[i];

else if amount[i] ge 0 and unit[i] in (12,13) and perjobu[i] in (1,2) and hours[i] ne 0 then do;
if perjobu[i]=1 and perjobt[i]>0 then hourly[i]=(amount[i]/perjobt[i])*60;
else if perjobu[i]=2 and perjobt[i]>0 then hourly[i]=amount[i]/perjobt[i];
else hourly[i]=-3;
end;

else if amount[i] ge 0 and hours[i] gt 0 then do;

if unit[i]=2 then do;
if days[i] gt 0 then hourly[i]=amount[i]*days[i]/hours[i];
else hourly[i]=-3;
end;

else if unit[i] in (3, 7, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 28, 999,-1,-2) then hourly[i]=amount[i]/hours[i];
else if unit[i]=4 then hourly[i]=amount[i]/(2*hours[i]);
else if unit[i]=5 then hourly[i]=amount[i]/(4.3*hours[i]);

else if unit[i] =6 then do;
if weeks[i] gt 0 then hourly[i]=amount[i]/(weeks[i]*hours[i]);
else hourly[i]=-3;
end;

else if unit[i]=8 then hourly[i]=amount[i]/(2.15*hours[i]);

else if unit[i] in (12,13) then do;
if perjobt[i]>0 then do;
if perjobu[i]=3 then do;
if daysa[i]>=0 then hourly[i]=(amount[i]*daysa[i])/(hours[i]*perjobt[i]);
else hourly[i]=-3;
end;
else if perjobu[i]=4 then hourly[i]=amount[i]/(perjobt[i]*hours[i]);
else if perjobu[i]=5 then hourly[i]=amount[i]/(perjobt[i]*4.3*hours[i]);
else hourly[i]=-3;
end;
else hourly[i]=-3;
end;

else hourly[i]=-3;

end;


else if amount[i] ne -4 or hours[i] le 0 then hourly[i]=-3;

if unit[i] in (9,14) then hourly[i]=0;
end;

***** final wrapping;

do i=1 to 11;
if hourly[i] in (-1,-2,-3) then hourly[i]=-3;
hrwg[i]=round(hourly[i],1);
if e200a=-5 then do;
hourly[i]=-5;
hrwg[i]=-5;
end;
end;

***** Use e36100 e36200 e100000 e100100 answers;

array stilhr stilhr01-stilhr11;

do i=1 to 11;
stilhr[i]=-4;
if e36100[i] not in (.,-5,-4) or e36200[i] not in (.,-5,-4) or e100000[i] not in (.,-5,-4) or e100100[i] not in (.,-5,-4) then do;
if e36100[i] not in (.,-5,-4) then stilhr[i]=e36100[i];
else if e36200[i] not in (.,-5,-4) then stilhr[i]=e36200[i];
else if e100000[i] not in (.,-5,-4) then stilhr[i]=e100000[i];
else if e100100[i] not in (.,-5,-4) then stilhr[i]=e100100[i];
end;
else if e36100[i] in (.,-4) and e36200[i] in (.,-4) and e100000[i] in (.,-4) and e100100[i] in (.,-4) then stilhr[i]=-4;
else stilhr[i]=-5;
end;

f4lag=0;
do i=1 to 11;
if stilhr[i]>0 and hours[i] ne 0 and
(e226041[i] in (.,-4,0) and e226042[i] in (.,-4,0)) and (e102251[i] in (.,-4,0) and e102252[i] in (.,-4,0)) and
(e38013[i] in (.,-4,0) and e38106[i] in (.,-4,0) and e3800b[i] in (.,-4,1) and e38102[i] in (.,-4,2))
then do;
hourly[i]=stilhr[i];
hrwg[i]=round(stilhr[i],1);
f4lag=1;
end;
end;
 

array euid euid01-euid11;
array hrwg hrwg01-hrwg11;
array milflag milflag01-milflag11;
array jleng jleng01-jleng11;

array r1euid r1euid1-r1euid7;
array r1wage r1wage1-r1wage7;
array r1comp r1comp1-r1comp7;
array r2euid r2euid1-r2euid9;
array r2wage r2wage1-r2wage9;
array r2comp r2comp1-r2comp9;
array r3euid r3euid1-r3euid9;
array r3wage r3wage1-r3wage9;
array r3comp r3comp1-r3comp9;
array r4euid r4euid1-r4euid9;
array r4wage r4wage1-r4wage9;
array r4comp r4comp1-r4comp9;
array r5euid r5euid1-r5euid9;
array r5wage r5wage1-r5wage9;
array r5comp r5comp1-r5comp9;


array oldcomp oldcomp01-oldcomp11;

do i=1 to 11;
oldcomp[i]=-99;
end;


flagg1=0; flagg2=0; flagg3=0; flagg4=0;
do i=1 to 11;
if milflag[i] ne 1 and euid[i]>0 and hrwg[i]=-4 then do;
flagg1=1;
/* 296 people has flagg1=1.*/
if jleng[i]=1 then do;

if 9700 lt euid[i] lt 9800 then do;
do j1=1 to 7;
if euid[i]=r1euid[j1] then do;
hrwg[i]=r1wage[j1];
oldcomp[i]=r1comp[j1];
end;
end;
end;

else if 9800 lt euid[i] lt 9900 then do;
do j2=1 to 9;
if euid[i]=r2euid[j2] then do;
hrwg[i]=r2wage[j2];
oldcomp[i]=r2comp[j2];
end;
end;
end;

else if 199900 lt euid[i] lt 200000 then do;
do j3=1 to 9;
if euid[i]=r3euid[j3] then do;
hrwg[i]=r3wage[j3];
oldcomp[i]=r3comp[j3];
end;
end;
end;

else if 200000 lt euid[i] lt 200100 then do;
do j4=1 to 9;
if euid[i]=r4euid[j4] then do;
hrwg[i]=r4wage[j4];
oldcomp[i]=r4comp[j4];
end;
end;
end;

else if 200100 lt euid[i] lt 200200 then do;
do j5=1 to 9;
if euid[i]=r5euid[j5] then do;
hrwg[i]=r5wage[j5];
oldcomp[i]=r5comp[j5];
end;
end;
end;

else if euid[i] gt 200200 then do;
flagg2=1;
/* Nobody has flagg2=1. */
hrwg[i]=-3;
oldcomp[i]=-3;
end;

end;

else if jleng[i]=0 or -4<jleng[i]<0 then do;
flagg3=1;
/* 11 people has flagg3=1.*/
hrwg[i]=-3;
oldcomp[i]=-3;
end;

else if jleng[i]=-4 then do;
flagg4=1;
/* Nobody has flagg4=1. */
hrwg[i]=-4;
oldcomp[i]=-4;
end;

end;
end;

*** check those whose hourly wage is still -4 and job uid is not -4 after this;

flagg5=0;
do i=1 to 11;
if milflag[i] ne 1 and euid[i]>0 and hrwg[i]=-4 then do;
flagg5=1;
/* 7 people has flagg5=1. */
end;
end;


/* We found that there are 7 people who have flagg5=1 and flagg4=0.
For 5 of those 7, the job uid ends with 99 and they are the old job uids. So these are the old
freelance jobs. Since they are old enough in round 6 to report self-employed job, so they should report
occupation, industry and hourly wage related information in round 6.
So we will give them -3 for the created hourly wage or hourly compensation.This same problem appeared in round 5 too.

For 2 of those 7, the job uid in round 6 is 199901, when we look at employer's name, we found that this
is the same job as the ones in round 4 or 5 with job uid=199999. For one of them, I will hand edit using the
created hourly wage from round 4 since he is not interviewed in round 5. The created hourly wage is -3 for the
other one in round 5, so I will also -3 it in round 6. */

do i=1 to 11;
if milflag[i] ne 1 and euid[i]>0 and hrwg[i]=-4 then do;
hrwg[i]=-3;
oldcomp[i]=-3;
end;
end;

if pubid=4328 then do;
hrwg02=66;
oldcomp02=66;
end;


/*Assign -3 to the very extreme cases whose created hourly wage is $51,000 and leave the rest as they are. */

if pubid=2695 then do;
hourly01=-3;
hrwg01=-3;
end;
 

endsas;

Return to top


Hourly Monetary Compensation

Variables Created: CV_HRLY_COMPENSATION.xx

Variables Used

Name in Program

Name in NLS

  Name in Program

Name in NLS

E21200011 YEMP-21200.01~000001   E3810501 YEMP-38105.01
E21200012 YEMP-21200.01~000002   E3810502 YEMP-38105.02
E21200013 YEMP-21200.01~000003   E3810503 YEMP-38105.03
E21200014 YEMP-21200.01~000004   E3810504 YEMP-38105.04
E21200015 YEMP-21200.01~000005   E3820101 YEMP-38201.01
E21200016 YEMP-21200.01~000006   E3820102  YEMP-38201.02
E21200021 YEMP-21200.02~000001   E3820103 YEMP-38201.03
E21200022 YEMP-21200.02~000002   E3820104 YEMP-38201.04
E21200023 YEMP-21200.02~000003   E3820105 YEMP-38201.05
E21200024 YEMP-21200.02~000004   E3820201 YEMP-38202.01
E21200025 YEMP-21200.02~000005   E3820202 YEMP-38202.02
E21200026 YEMP-21200.02~000006   E3820203 YEMP-38202.03
E21200031 YEMP-21200.03~000001   E3820205 YEMP-38202.05
E21200032 YEMP-21200.03~000002   E3821101 YEMP-38211.01
E21200033 YEMP-21200.03~000003   E3821102 YEMP-38211.02
E21200034 YEMP-21200.03~000004   E3821103 YEMP-38211.03
E21200035 YEMP-21200.03~000005   E3821105 YEMP-38211.05
E21200036 YEMP-21200.03~000006   E38329B01 YEMP-38329B.01
E21200041 YEMP-21200.04~000001   E38329B02 YEMP-38329B.02
E21200042 YEMP-21200.04~000002   E38329B03 YEMP-38329B.03
E21200043 YEMP-21200.04~000003   E38329B05  YEMP-38329B.05
E21200044 YEMP-21200.04~000004   E38329D01 YEMP-38329D.01
E21200045 YEMP-21200.04~000005   E38329D02 YEMP-38329D.02
E21200046 YEMP-21200.04~000006   E38329D03 YEMP-38329D.03
E21200051 YEMP-21200.05~000001   E38329D05 YEMP-38329D.05
E21200052 YEMP-21200.05~000002   E38329I01 YEMP-38329I.01
E21200053 YEMP-21200.05~000003   E38329IB01 YEMP-38329IB.01
E21200054 YEMP-21200.05~000004   E38329K01 YEMP-38329K.01
E21200055 YEMP-21200.05~000005   E38329K02 YEMP-38329K.02
E21200056 YEMP-21200.05~000006   E38329K03 YEMP-38329K.03
E21200061 YEMP-21200.06~000001   E38329K05 YEMP-38329K.05
E21200062 YEMP-21200.06~000002   E38407011 YEMP-38407.01.01
E21200063 YEMP-21200.06~000003   E38407012 YEMP-38407.01.02
E21200064 YEMP-21200.06~000004   E38407013 YEMP-38407.01.03
E21200065 YEMP-21200.06~000005   E38407014 YEMP-38407.01.04
E21200066 YEMP-21200.06~000006   E38407015 YEMP-38407.01.05
E21200081 YEMP-21200.08~000001   E38407021 YEMP-38407.02.01
E21200082 YEMP-21200.08~000002   E38407022   YEMP-38407.02.02
E21200083 YEMP-21200.08~000003   E38407023  YEMP-38407.02.03
E21200084 YEMP-21200.08~000004   E38407024  YEMP-38407.02.04
E21200085 YEMP-21200.08~000005   E38407025   YEMP-38407.02.05
E21200086 YEMP-21200.08~000006   E38407032   YEMP-38407.03.02
E21200101 YEMP-21200.10~000001   E38407033   YEMP-38407.03.03
E21200102 YEMP-21200.10~000002   E38407043  YEMP-38407.04.03
E21200103 YEMP-21200.10~000003   E38407062   YEMP-38407.06.02
E21200104 YEMP-21200.10~000004   E38416011   YEMP-38416.01.01
E21200105 YEMP-21200.10~000005   E38416012   YEMP-38416.01.02
E21200106 YEMP-21200.10~000006   E38416013   YEMP-38416.01.03
E2450101 YEMP-24501.01   E38416014  YEMP-38416.01.04
E2450102 YEMP-24501.02   E38416015  YEMP-38416.01.05
E2450103 YEMP-24501.03   E38416021   YEMP-38416.02.01
E2450104 YEMP-24501.04   E38416022   YEMP-38416.02.02
E2450105 YEMP-24501.05   E38416023   YEMP-38416.02.03
E2450106 YEMP-24501.06   E38416024  YEMP-38416.02.04
E2450108 YEMP-24501.08   E38416025  YEMP-38416.02.05
E2450201 YEMP-24502.01   E38416032  YEMP-38416.03.02
E2450202 YEMP-24502.02   E38416033   YEMP-38416.03.03
E2450203 YEMP-24502.03   E38416043   YEMP-38416.04.03
E2450204 YEMP-24502.04   E38416062  YEMP-38416.06.02
E2450205 YEMP-24502.05   E38416011 YEMP-38416I.01.01
E2450206 YEMP-24502.06   E38416I012  YEMP-38416I.01.02
E2450208 YEMP-24502.08   E38416I013   YEMP-38416I.01.03
E2451401 YEMP-24514.01   E38416I015  YEMP-38416I.01.05
E2451402 YEMP-24514.02   E38416I022  YEMP-38416I.02.02
E2451403 YEMP-24514.03   E38416I023   YEMP-38416I.02.03
E2451404 YEMP-24514.04   E38416I062  YEMP-38416I.06.02
E2451405 YEMP-24514.05   E38416IB011   YEMP-38416IB.01.01
E2451406 YEMP-24514.06   E38416IB012  YEMP-38416IB.01.02
E2451408 YEMP-24514.08   E38416IB013   YEMP-38416IB.01.03
E3440301 YEMP-34403.01   E38416IB015   YEMP-38416IB.01.05
E3440302 YEMP-34403.02   38416IB022   YEMP-38416IB.02.02
E3440303 YEMP-34403.03   E8416IB023  YEMP-38416IB.02.03
E3440304 YEMP-34403.04   E38416IB062   YEMP-38416IB.06.02
E3440401 YEMP-34404.01   E38416K011   YEMP-38416K.01.01
E3440402 YEMP-34404.02   E38416K012  YEMP-38416K.01.02
E3440403 YEMP-34404.03   E38416K013  YEMP-38416K.01.03
E3440404 YEMP-34404.04   E38416K021   YEMP-38416K.02.01
E34413C01 YEMP-34413C.01   E38416K025   YEMP-38416K.02.05
E34413C02 YEMP-34413C.02   E8850101   YEMP-88501.01
E34413C03 YEMP-34413C.03   E8850102  YEMP-88501.02
E34413C04 YEMP-34413C.04   E8850103  YEMP-88501.03
E34413CC03 YEMP-34413CC.03   E8850104   YEMP-88501.04
E34413CD03 YEMP-34413CD.03   E8850105  YEMP-88501.05
E34413E01 YEMP-34413E.01   E8850106   YEMP-88501.06
E3560001 YEMP-35600.01   E8850107   YEMP-88501.07
E3560002 YEMP-35600.02   E8850201   YEMP-88502.01
E3560003 YEMP-35600.03   E8850202   YEMP-88502.02
E3560004 YEMP-35600.04   E8850203   YEMP-88502.03
E21600012 YEMP-21600.01.02   E8850204  YEMP-88502.04
E21600013 YEMP-21600.01.03   E8850205  YEMP-88502.05
E21600014 YEMP-21600.01.04   E8850206   YEMP-88502.06
E21600015 YEMP-21600.01.05   E8850207   YEMP-88502.07
E21600016 YEMP-21600.01.06   E8851201   YEMP-88512.01
E21600022 YEMP-21600.02.02   E8851202  YEMP-88512.02
E21600023 YEMP-21600.02.03   E8851203   YEMP-88512.03
E21600024 YEMP-21600.02.04   E8851204   YEMP-88512.04
E21600025 YEMP-21600.02.05   E8851205   YEMP-88512.05
E21600026 YEMP-21600.02.06   E8851207   YEMP-88512.07
E21600032 YEMP-21600.03.02   E9840301   YEMP-98403.01
E21600033 YEMP-21600.03.03   E9840302  YEMP-98403.02
E21600034 YEMP-21600.03.04   E9840303  YEMP-98403.03
E21600035 YEMP-21600.03.05   E98404A01   YEMP-98404A.01
E21600036 YEMP-21600.03.06   E98404A02   YEMP-98404A.02
E21600042 YEMP-21600.04.02   E98404A03  YEMP-98404A.03
E21600043 YEMP-21600.04.03   E9841401   YEMP-98414.01
E21600044 YEMP-21600.04.04   E9841402  YEMP-98414.02
E21600052 YEMP-21600.05.02   E9841403   YEMP-98414.03
E21600053 YEMP-21600.05.03   E98414AAA02  YEMP-98414AAA.02
E21600054 YEMP-21600.05.04   E98414AAB02  YEMP-98414AAB.02
E21600062 YEMP-21600.06.02   E98414B01   YEMP-98414B.01
E21600102 YEMP-21600.10.02   E9950001   YEMP-99500.01
E22500012 YEMP-22500.01.02   E9950002   YEMP-99500.02
E22500013 YEMP-22500.01.03   E9950003   YEMP-99500.03
E22500014 YEMP-22500.01.04   E9950004  YEMP-99500.04
E22500015 YEMP-22500.01.05   E100205012   YEMP-100205.01.02
E22500016 YEMP-22500.01.06   E100205013   YEMP-100205.01.03
E22500022 YEMP-22500.02.02   E100205014  YEMP-100205.01.04
E22500023 YEMP-22500.02.03   E100205015   YEMP-100205.01.05
E22500024 YEMP-22500.02.04   E100205016   YEMP-100205.01.06
E22500025 YEMP-22500.02.05   E100205022  YEMP-100205.02.02
E22500026 YEMP-22500.02.06   E100205023   YEMP-100205.02.03
E22500032 YEMP-22500.03.02   E100205024   YEMP-100205.02.04
E22500033 YEMP-22500.03.03   E100205025  YEMP-100205.02.05
E22500034 YEMP-22500.03.04   E100205026   YEMP-100205.02.06
E22500035 YEMP-22500.03.05   E100205032  YEMP-100205.03.02
E22500036 YEMP-22500.03.06   E100205033  YEMP-100205.03.03
E22500042 YEMP-22500.04.02   E100205034  YEMP-100205.03.04
E22500043 YEMP-22500.04.03   E100205035  YEMP-100205.03.05
E22500044 YEMP-22500.04.04   E100205042   YEMP-100205.04.02
E22500052 YEMP-22500.05.02   E100205043  YEMP-100205.04.03
E22500053 YEMP-22500.05.03   E100205044  YEMP-100205.04.04
E22500054 YEMP-22500.05.04   E100205045   YEMP-100205.04.05
E22500062 YEMP-22500.06.02   E100205046   YEMP-100205.04.06
E22500102 YEMP-22500.10.02   E100205052   YEMP-100205.05.02
E22530012 YEMP-22530.01.02   E100205053   YEMP-100205.05.03
E22530013 YEMP-22530.01.03   E100205054  YEMP-100205.05.04
E22530014 YEMP-22530.01.04   E100214012   YEMP-100214.01.02
E22530015 YEMP-22530.01.05   E100214013  YEMP-100214.01.03
E22530016 YEMP-22530.01.06   E100214014  YEMP-100214.01.04
E22530022  YEMP-22530.02.02   E100214015  YEMP-100214.01.05
E22530023 YEMP-22530.02.03   E100214016  YEMP-100214.01.06
E22530024 YEMP-22530.02.04   E100214022   YEMP-100214.02.02
E22530025 YEMP-22530.02.05   E100214023   YEMP-100214.02.03
E22530033 YEMP-22530.03.03   E100214024  YEMP-100214.02.04
E22530034 YEMP-22530.03.04   E100214025   YEMP-100214.02.05
E22530042 YEMP-22530.04.02   E100214026   YEMP-100214.02.06
E22530043 YEMP-22530.04.03   E100214032  YEMP-100214.03.02
E22530054 YEMP-22530.05.04   E100214033  YEMP-100214.03.03
E22535012 YEMP-22535.01.02   E100214034  YEMP-100214.03.04
E22535013 YEMP-22535.01.03   E100214035   YEMP-100214.03.05
E22535014 YEMP-22535.01.04   E100214042  YEMP-100214.04.02
E22535015 YEMP-22535.01.05   E100214043   YEMP-100214.04.03
E22535016 YEMP-22535.01.06   E100214044  YEMP-100214.04.04
E22535022 YEMP-22535.02.02   E100214045   YEMP-100214.04.05
E22535023 YEMP-22535.02.03   E100214046  YEMP-100214.04.06
E22535024 YEMP-22535.02.04   E100214052  YEMP-100214.05.02
E22535025 YEMP-22535.02.05   E100214053  YEMP-100214.05.03
E22535033 YEMP-22535.03.03   E100214054   YEMP-100214.05.04
E22535034 YEMP-22535.03.04   E100214AAA012   YEMP-100214AAA.01.02
E22535042 YEMP-22535.04.02   E100214AAA013   YEMP-100214AAA.01.03
E22535043 YEMP-22535.04.03   E100214AAA014  YEMP-100214AAA.01.04
E22535054 YEMP-22535.05.04   E100214AAA015   YEMP-100214AAA.01.05
E22550012 YEMP-22550.01.02   E100214AAA022   YEMP-100214AAA.02.02
E22550013 YEMP-22550.01.03   E100214AAA023   YEMP-100214AAA.02.03
E22550014 YEMP-22550.01.04   E100214AAA024  YEMP-100214AAA.02.04
E22550015  YEMP-22550.01.05   E100214AAA032  YEMP-100214AAA.03.02
E22550022 YEMP-22550.02.02   E100214AAA033   YEMP-100214AAA.03.03
E22550023 YEMP-22550.02.03   E100214AAA035   YEMP-100214AAA.03.05
E22550024 YEMP-22550.02.04   E100214AAB012  YEMP-100214AAB.01.02
E22550026 YEMP-22550.02.06   E100214AAB013   YEMP-100214AAB.01.03
E22550032 YEMP-22550.03.02   E100214AAB014  YEMP-100214AAB.01.04
E22550033 YEMP-22550.03.03   E100214AAB015  YEMP-100214AAB.01.05
E22550034 YEMP-22550.03.04   E100214AAB022   YEMP-100214AAB.02.02
E22550035 YEMP-22550.03.05   E100214AAB023  YEMP-100214AAB.02.03
E22550042 YEMP-22550.04.02   E100214AAB024  YEMP-100214AAB.02.04
E22550043 YEMP-22550.04.03   E100214AAB032   YEMP-100214AAB.03.02
E22550052  YEMP-22550.05.02   E100214AAB033  YEMP-100214AAB.03.03
E22550053 YEMP-22550.05.03   E100214AAB035  YEMP-100214AAB.03.05
E22550062 YEMP-22550.06.02   E100214B012   YEMP-100214B.01.02
E22550102 YEMP-22550.10.02   E100214B013   YEMP-100214B.01.03
E22604013 YEMP-22604.01~000003   E100214B015  YEMP-100214B.01.05
E22604014 YEMP-22604.01~000004   E100214B022  YEMP-100214B.02.02
E22604023 YEMP-22604.02~000003   E100214B023  YEMP-100214B.02.03
E22604024 YEMP-22604.02~000004   E100214B024  YEMP-100214B.02.04
E22604033 YEMP-22604.03~000003   E100214B025  YEMP-100214B.02.05
E22604034 YEMP-22604.03~000004   E100214B032  YEMP-100214B.03.02
E22604043 YEMP-22604.04~000003   E100214B033  YEMP-100214B.03.03
E22604044 YEMP-22604.04~000004   E100214B034  YEMP-100214B.03.04
E2261101 YEMP-22611.01.03   E100214B035  YEMP-100214B.03.05
E2261102  YEMP-22611.02.03   E100214B042  YEMP-100214B.04.02
E2261201 YEMP-22612.01.04   E100214B052  YEMP-100214B.05.02
E2261202  YEMP-22612.02.04   E100225013  YEMP-100225.01~000003
E2261301 YEMP-22613.01.05   E100225014  YEMP-100225.01~000004
E2261303 YEMP-22613.03.05   E100225023 YEMP-100225.02~000003
E2261401 YEMP-22614.01.06   E100225024  YEMP-100225.02~000004
E2261501 YEMP-22615.01.07   E100225033  YEMP-100225.03~000003
E2261502 YEMP-22615.02.07   E100225034  YEMP-100225.03~000004
E2261701 YEMP-22617.01.09   E100225043  YEMP-100225.04~000003
E2261702 YEMP-22617.02.09   E100225044  YEMP-100225.04~000004
E2262701 YEMP-22627.01.04   E10023201   YEMP-100232.01.03
E2262702 YEMP-22627.02.04   E10023301  YEMP-100233.01.04
E22627C01  YEMP-22627C.01.04   E10023402   YEMP-100234.02.05
E22627CB01 YEMP-22627CB.01.04   E10023501  YEMP-100235.01.06
E2262801 YEMP-22628.01.05   E10023502  YEMP-100235.02.06
E2262803 YEMP-22628.03.05   E10023602   YEMP-100236.02.07
E22628E03 YEMP-22628E.03.05   E10023603   YEMP-100236.03.07
E2262901 YEMP-22629.01.06   E10023701   YEMP-100237.01.08
E22629C01 YEMP-22629C.01.06   E10023901   YEMP-100239.01.09
E22629CB01 YEMP-22629CB.01.06   E10024901  YEMP-100249.01.04
E2263001 YEMP-22630.01.07   E10025002  YEMP-100250.02.05
E2263002 YEMP-22630.02.07   E10025101  YEMP-100251.01.06
E2263201 YEMP-22632.01.09   E10025102  YEMP-100251.02.06
E2263202 YEMP-22632.02.09   E10025202  YEMP-100252.02.07
E22632C01 YEMP-22632C.01.09   E10025203  YEMP-100252.03.07
E22632CB01 YEMP-22632CB.01.09   E10025301  YEMP-100253.01.08
E3800201 YEMP-38002.01   E10025401  YEMP-100254.01.09
E3800202 YEMP-38002.02   ECURR01 YEMP_CURFLAG.01
E3800203 YEMP-38002.03   ECURR02  YEMP_CURFLAG.02
E3800204 YEMP-38002.04   ECURR03   YEMP_CURFLAG.03
E3800205 YEMP-38002.05   ECURR04 YEMP_CURFLAG.04
E3800301 YEMP-38003.01   ECURR05  YEMP_CURFLAG.05
E3800302 YEMP-38003.02   ECURR06  YEMP_CURFLAG.06
E3800303 YEMP-38003.03   ECURR07  YEMP_CURFLAG.07
E3800304 YEMP-38003.04   ECURR08   YEMP_CURFLAG.08
E3800305 YEMP-38003.05   ECURR09  YEMP_CURFLAG.09
E3801201 YEMP-38012.01   ECURR10  YEMP_CURFLAG.10
E3801202 YEMP-38012.02   ECURR11   YEMP_CURFLAG.11
E3801203 YEMP-38012.03   EUID01 YEMP_UID.01
E3801204 YEMP-38012.04   EUID02  YEMP_UID.02
E3801205 YEMP-38012.05   EUID03   YEMP_UID.03
E38012AAA01 YEMP-38012AAA.01   EUID04  YEMP_UID.04
E38012AAB01 YEMP-38012AAB.01   EUID05 YEMP_UID.05
E38012B01 YEMP-38012B.01   EUID06   YEMP_UID.06
E38012B02 YEMP-38012B.02   EUID07   YEMP_UID.07
E3810201 YEMP-38102.01   EUID08  YEMP_UID.08
E3810202 YEMP-38102.02   EUID09 YEMP_UID.09
E3810203 YEMP-38102.03   EUID10 YEMP_UID.10
E3810204 YEMP-38102.04   EUID11 YEMP_UID.11
E3810205 YEMP-38102.05   pubid  PUBID

Codes for Created Variable

Note that hourly monetary compensation is reported with two implied decimal places.

This program creates an hourly monetary compensation variable for NLSY97 respondents. This variable that includes information about all compensation received by the respondent, such as tips, bonuses, commissions, overtime, etc., in the calculation. Hourly monetary compensation differs from hourly rate of pay variable, which calculates only the base pay rate. This variable is constructed from stop date information for respondents with jobs longer than 13 weeks and start date information for others.


/*Based on the hourly wage and regular hours variables created in the program "hrwage.sas", this program creates the hourly compensation.

I first go through the overtime and create overtime hours and weekly overtime pay. Then I will go through the other compensations, for which I only need to create weekly payment for these compensations. Hours info. is not asked about the other compensation, we will assume they make the other compensation in every hour they work, regular hours or overtime hours.*/

***** Define arrays used in the overtime part;

 

array e24501 e2450101-e2450111;

array e24502 e2450201-e2450211;

array e24514 e2451401-e2451411;

array e24514b e24514b01-e24514b11;

array e24514aab e24514aab01-e24514aab11;

array e24514aabb e24514aabb01-e24514aabb11;

array e34403 e3440301-e3440311;

array e34404 e3440401-e3440411;

array e34413c e34413c01-e34413c11;

array e34413e e34413e01-e34413e11;

array e34413cc e34413cc01-e34413cc11;

array e34413cd e34413cd01-e34413cd11;

array e35600 e3560001-e3560011;

array e22611 e2261101-e2261111;

array e22627 e2262701-e2262711;

array e22627e e22627e01-e22627e11;

array e22627c e22627c01-e22627c11;

array e22627cb e22627cb01-e22627cb11;

array e22612 e2261201-e2261211;

array e226044 e22604014 e22604024 e22604034 e22604044 e22604054 e22604064 e22604074 e22604084 e22604094 e22604104 e22604114;

array e226043 e22604013 e22604023 e22604033 e22604043 e22604053 e22604063 e22604073 e22604083 e22604093 e22604103 e22604113;

array e38002 e3800201-e3800211;

array e38003 e3800301-e3800311;

array e38012 e3801201-e3801211;

array e38012b e38012b01-e38012b11;

array e38012aaa e38012aaa01-e38012aaa11;

array e38012aab e38012aab01-e38012aab11;

array e38102 e3810201-e3810211;

array e38105 e3810501-e3810511;

array e38201 e3820101-e3820111;

array e38202 e3820201-e3820211;

array e38211 e3821101-e3821111;

array e38211b e38211b01-e38211b11;

array e38211aaa e38211aaa01-e38211aaa11;

array e38211aab e38211aab01-e38211aab11;

array e88501 e8850101-e8850111;

array e88502 ee8850201-e8850211;

array e88512 e8851201-e8851211;

array e88512b e88512b01-e88512b11;

array e88512aaa e88512aaa01-e88512aaa11;

array e88512aab e88512aab01-e88512aab11;

array e98403 e9840301-e9840311;

array e98404a e98404a01-e98404a11;

array e98414 e9841401-e9841411;

array e98414b e98414b01-e98414b11;

array e98414aaa e98414aaa01-e98414aaa11;

array e98414aab e98414aab01-e98414aab11;

array e99500 e9950001-e9950011;

array e100232 e1023201-e1023211;

array e100233 e1023301-e1023311;

array e100249 e1024901-e1024911;

array e100249e e10249e01-e10249e11;

array e100249c e10249c01-e10249c11;

array e100249cb e10249cb01-e10249cb11;

array ecurr ecurr01-ecurr11;
array euid euid01-euid11;
*array wkswk wkswk01-wkswk11;
array e102253 e100225013 e100225023 e100225033 e100225043 e100225053 e100225063 e100225073 e100225083 e100225093
e100225103 e100225113 ;
array e102254 e100225014 e100225024 e100225034 e100225044 e100225054 e100225064 e100225074 e100225084 e100225094
e100225104 e100225114 ;


flagot16=0; /* flag for the cases whose overtime unit is 16, since "number of weeks worked" is not available. */
flagcp16=0; /* flag for the cases whose other comp. time unit is 16 */ 

 

/*---------------------------------overtime hours and overtime payment------------------------------------*/

 

array hourly hourly01-hourly11;

 

array otunit otunit01-otunit11;

array otdays otdays01-otdays11;

array otwks otwks01-otwks11;

array otperju otperju01-otperju11;

array otperjt otperjt01-otperjt11;

array othrly othrly01-othrly11;

array otamt otamt01-otamt11; /* which is the amount in the time unit other than hourly.*/

array othours othrs01-othrs11;

 

/*----- Initialize the variables ------*/

do i=1 to 11;

   otunit[i]=-4;

   otdays[i]=-4;

   otwks[i]=-4;

   otperju[i]=-4;

   otperjt[i]=-4;

   othrly[i]=-4;

   otamt[i]=-4;

   othours[i]=-4;

end;

 

/* Overtime is asked in the following places:

   beginning with 19200 (two branches depends on if regular pay is hourly or non-hourly),

   beginning correction with 19200,

   beginning with 83100 (two branches depends on if regular pay is hourly or non-hourly),

   beginning correction with 83100, ending if no overtime reported in the beginning,

   ending if no overtime reported in the beginning,

   ending if overtime reported in the beginning. */

 

***** Time Unit;

do i=1 to 11;

 if e24502[i] not in (.,-4,-5) then otunit[i]=e24502[i];

 if e34404[i] not in (.,-4,-5) then otunit[i]=e34404[i];

 if e22612[i] not in (.,-4,-5) then otunit[i]=e22612[i];

 else if e226044[i] lt 0 and e226043[i] not in (.,-4,-5) then otunit[i]=-3;

 if e88502[i] not in (.,-4,-5) then otunit[i]=e88502[i];

 if e98404a[i] not in (.,-4,-5) then otunit[i]=e98404a[i];

 if e100233[i] not in (.,-4,-5) then otunit[i]=e100233[i];

 else if e102254[i] lt 0 and e102254[i] not in (.,-4,-5) then otunit[i]=-3;

 if e38003[i] not in (.,-4,-5) then otunit[i]=e38003[i];

 if e38202[i] not in (.,-4,-5) then otunit[i]=e38202[i];

 else if e38201[i] lt 0 and e38201[i] not in (.,-4,-5) then otunit[i]=-3;

 

end;

 

 

***** Number of Days Per Week;

do i=1 to 11;

 if e24514b[i] not in (.,-4,-5) then otdays[i]=e24514b[i];

 if e34413e[i] not in (.,-4,-5) then otdays[i]=e34413e[i];

 if e22627e[i] not in (.,-4,-5) then otdays[i]=e22627e[i];

 if e88512b[i] not in (.,-4,-5) then otdays[i]=e88512b[i];

 if e98414b[i] not in (.,-4,-5) then otdays[i]=e98414b[i];

 if e100249e[i] not in (.,-4,-5) then otdays[i]=e100249e[i];

 if e38012b[i] not in (.,-4,-5) then otdays[i]=e38012b[i];

 if e38211b[i] not in (.,-4,-5) then otdays[i]=e38211b[i];

end;

 

 

***** Number of Weeks Per Year;

do i=1 to 11;

 if e35600[i] not in (.,-4,-5) then otwks[i]=e35600[i];

 if e99500[i] not in (.,-4,-5) then otwks[i]=e99500[i];

end;

 

***** Time Unit to Finish One Item or Job if reporting "Per Item" or "Per Job";

do i=1 to 11;

 if e24514aab[i] not in (.,-4,-5) then otperju[i]=e24514aab[i];

 if e34413cc[i] not in (.,-4,-5) then otperju[i]=e34413cc[i];

 if e22627c[i] not in (.,-4,-5) then otperju[i]=e22627c[i];

 if e88512aaa[i] not in (.,-4,-5) then otperju[i]=e88512aaa[i];

 if e98414aaa[i] not in (.,-4,-5) then otperju[i]=e98414aaa[i];

 if e100249c[i] not in (.,-4,-5) then otperju[i]=e100249c[i];

 if e38012aaa[i] not in (.,-4,-5) then otperju[i]=e38012aaa[i];

 if e38211aaa[i] not in (.,-4,-5) then otperju[i]=e38211aaa[i];

end;

 

***** Amount of Time to Finish One Item or Job if Reporting "Per Item" or "Per Job";

do i=1 to 11;

 if e24514aabb[i] not in (.,-4,-5) then otperjt[i]=e24514aabb[i];

 if e34413cd[i] not in (.,-4,-5) then otperjt[i]=e34413cd[i];

 if e22627cb[i] not in(.,-4,-5) then otperjt[i]=e22627cb[i];

 if e88512aab[i] not in (.,-4,-4) then otperjt[i]=e88512aab[i];

 if e98414aab[i] not in (.,-4,-5) then otperjt[i]=e98414aab[i];

 if e100249cb[i] not in (.,-4,-5) then otperjt[i]=e100249cb[i];

 if e38012aab[i] not in (.,-4,-5) then otperjt[i]=e38012aab[i];

 if e38211aab[i] not in (.,-4,-5) then otperjt[i]=e38211aab[i];

end;

 

***** Amount;

do i=1 to 11;

 if e24514[i] not in (.,-4,-5) then otamt[i]=e24514[i];

 if e34413c[i] not in (.,-4,-5) then otamt[i]=e34413c[i];

 if e22627[i] not in (.,-4,-5) then otamt[i]=e22627[i];

 if e88512[i] not in (.,-4,-5) then otamt[i]=e88512[i];

 if e98414[i] not in (.,-4,-5) then otamt[i]=e98414[i];

 if e100249[i] not in (.,-4,-5) then otamt[i]=e100249[i];

 if e38012[i] not in (.,-4,-5) then otamt[i]=e38012[i];

 if e38211[i] not in (.,-4,-5) then otamt[i]=e38211[i];

 

end;

 

***** Hours Per Week;

 

do i=1 to 11;

 if e24501[i] not in (.,-4,-5) then othours[i]=e24501[i];

 if e34403[i] not in (.,-4,-5) then othours[i]=e34403[i];

 if e22611[i] not in (.,-4,-4) then othours[i]=e22611[i];

 else if e226043[i] lt 0 and e226043[i] not in (.,-4,-5) then othours[i]=-3;

 if e88501[i] not in (.,-4,-5) then othours[i]=e88501[i];

 if e98403[i] not in (.,-4,-5) then othours[i]=e98403[i];

 if e100232[i] not in (.,-4,-5) then othours[i]=e100232[i];

 else if e102253[i] lt 0 and e102253[i] not in (.,-4,-5) then othours[i]=-3;

 if e38002[i] not in (.,-4,-5) then othours[i]=e38002[i];

 if e38105[i] not in (.,-4,-5) then othours[i]=e38105[i];

 else if e38102[i] lt 0 and e38102[i] not in (.,-4,-5) then othours[i]=-3;

end;

 

***** Hourly overtime pay;

 

do i=1 to 11;

 if otunit[i]=-4 then othrly[i]=-4;

 else if otunit[i]=0 then othrly[i]=-3;

 else if otunit[i]=10 then othrly[i]=hourly[i]*1.5;

 else if otunit[i]=11 then othrly[i]=hourly[i]*2;

 else if otunit[i] in (9,14) then othrly[i]=0;

 else if otunit[i] in (1,21) then othrly[i]=otamt[i];

 

 else if otamt[i] ge 0 and otunit[i] in (12,13) and  otperju[i] in (1,2) then do;

   if otperju[i]=1 and otperjt[i]>0 then othrly[i]=(otamt[i]/otperjt[i])*60;

   else if otperju[i]=2 and otperjt[i]>0 then othrly[i]=otamt[i]/otperjt[i];

   else othrly[i]=-3;

 end;

 

 else if otamt[i] ge 0 and othours[i] gt 0 then do;                            /*---- loop 3 -----*/

 

  if otunit[i] in (2,22) then do;

    if otdays[i] gt 0 then othrly[i]=otamt[i]*otdays[i]/othours[i];

    else othrly[i]=-3;

  end;

 

  else if otunit[i] in (3,23) then othrly[i]=otamt[i]/othours[i];

  else if otunit[i] in (4,24) then othrly[i]=otamt[i]/(2*othours[i]);

  else if otunit[i] in (5,25) then othrly[i]=otamt[i]/(4.3*othours[i]);

 

  else if otunit[i] in (6,26) then do;

   if otwks[i] gt 0 then othrly[i]=otamt[i]/(otwks[i]*othours[i]);

   else othrly[i]=-3;

  end;

 

  else if otunit[i] in (8,28) then othrly[i]=otamt[i]/(2.15*othours[i]);

 

  else if otunit[i] in (12,13) then do;

    if otperjt[i]>0 then do;

      if otperju[i]=3 then do;

        if otdays[i]>0 then othrly[i]=(otamt[i]*otdays[i])/(othours[i]*otperjt[i]);

        else othrly[i]=-3;

      end;

      else if otperju[i]=4 then othrly[i]=otamt[i]/(otperjt[i]*othours[i]);

      else if otperju[i]=5 then othrly[i]=otamt[i]/(otperjt[i]*4.3*othours[i]);

      else othrly[i]=-3;

    end;

    else othrly[i]=-3;

  end;

 

 /*
else if otunit[i]=16 then do;
flagot16=1;
if ecurr[i] ne 1 and euid[i] ge 200101 and wkswk[i]>0 then othrly[i]=otamt[i]/(wkswk[i]*othours[i]);
else othrly[i]=-3;
end;
*/

 

  ***Because we don't have the created variable "number of weeks worked" yet, so I flag these cases for now;

  else if otunit[i]=16 then do;

    flagot16=1;

    othrly[i]=-3;

  end;

 

  else othrly[i]=-3;

 

 end;                                                

 

 else if otamt[i] ne -4 or othours[i] le 0 then othrly[i]=-3;

 

end;

 

/*----- bad overtime unit -----*/

 

unit7ot=0;

unit16ot=0;

unit9ot=0;

 

do i=1 to 11;

  if otunit[i]=7 then unit7ot=1;

  if otunit[i]=16 then unit16ot=1;

  if otunit[i]=999 then unit9ot=1;

end;

 

/*---------------------------------Weekly Pay for Other Compensations ------------------------------------*/

 

/* There are five types of other compensations: tips, bonus, commission, incentive pay and others.

   Each type is asked to 9 jobs. So I am going to use double array for compensation. One level for type and

   other level is for job.

 

   Other compensations are also asked in six places:

   Beginning compensation with E19200;

   Correction to beginning compensation with E19200;

   Beginning compensation with E83100;

   Correction to beginning compensation with E83100;

   Ending compensation if there is only one type of other compensation reported in the beginning;

   Ending compensation otherwise.

 

/*-------- Define arrays and initialize the variables: t indicates type and j indicates job --------*/

 

***** Variables used;

**** Second level of arrays, for 9 jobs;

 

array E212002 (j) E21200012 E21200022 E21200032 E21200042 E21200052 E21200062 E21200072 E21200082 E21200092 E21200102 E21200112;

array E212003 (j) E21200013 E21200023 E21200033 E21200043 E21200053 E21200063 E21200073 E21200083 E21200093 E21200103 E21200113;

array E212004 (j) E21200014 E21200024 E21200034 E21200044 E21200054 E21200064 E21200074 E21200084 E21200094 E21200104 E21200114;

array E212005 (j) E21200015 E21200025 E21200035 E21200045 E21200055 E21200065 E21200075 E21200085 E21200095 E21200105 E21200115;

array E212006 (j) E21200016 E21200026 E21200036 E21200046 E21200056 E21200066 E21200076 E21200086 E21200096 E21200106 E21200116;

 

array E216001 (j) E21600012 E21600022 E21600032 E21600042 E21600052 E21600062 E21600072 E21600082 E21600092 E21600102 E21600112;

array E216002 (j) E21600013 E21600023 E21600033 E21600043 E21600053 E21600063 E21600073 E21600083 E21600093 E21600103 E21600113;

array E216003 (j) E21600014 E21600024 E21600034 E21600044 E21600054 E21600064 E21600074 E21600084 E21600094 E21600104 E21600114;

array E216004 (j) E21600015 E21600025 E21600035 E21600045 E21600055 E21600065 E21600075 E21600085 E21600095 E21600105 E21600115;

array E216005 (j) E21600016 E21600026 E21600036 E21600046 E21600056 E21600066 E21600076 E21600086 E21600096 E21600106 E21600116;

 

array E225001 (j) E22500012 E22500022 E22500032 E22500042 E22500052 E22500062 E22500072 E22500082 E22500092 E22500102 E22500112;

array E225002 (j) E22500013 E22500023 E22500033 E22500043 E22500053 E22500063 E22500073 E22500083 E22500093 E22500103 E22500113;

array E225003 (j) E22500014 E22500024 E22500034 E22500044 E22500054 E22500064 E22500074 E22500084 E22500094 E22500104 E22500114;

array E225004 (j) E22500015 E22500025 E22500035 E22500045 E22500055 E22500065 E22500075 E22500085 E22500095 E22500105 E22500115;

array E225005 (j) E22500016 E22500026 E22500036 E22500046 E22500056 E22500066 E22500076 E22500086 E22500096 E22500106 E22500116;

 

array E225501 (j) E22550012 E22550022 E22550032 E22550042 E22550052 E22550062 E22550072 E22550082 E22550092 E22550102 E22550112;

array E225502 (j) E22550013 E22550023 E22550033 E22550043 E22550053 E22550063 E22550073 E22550083 E22550093 E22550103 E22550113;

array E225503 (j) E22550014 E22550024 E22550034 E22550044 E22550054 E22550064 E22550074 E22550084 E22550094 E22550104 E22550114;

array E225504 (j) E22550015 E22550025 E22550035 E22550045 E22550055 E22550065 E22550075 E22550085 E22550095 E22550105 E22550115;

array E225505 (j) E22550016 E22550026 E22550036 E22550046 E22550056 E22550066 E22550076 E22550086 E22550096 E22550106 E22550116;

 

array E225301 (j) E22530012 E22530022 E22530032 E22530042 E22530052 E22530062 E22530072 E22530082 E22530092 E22530102 E22530112;

array E225302 (j) E22530013 E22530023 E22530033 E22530043 E22530053 E22530063 E22530073 E22530083 E22530093 E22530103 E22530113;

array E225303 (j) E22530014 E22530024 E22530034 E22530044 E22530054 E22530064 E22530074 E22530084 E22530094 E22530104 E22530114;

array E225304 (j) E22530015 E22530025 E22530035 E22530045 E22530055 E22530065 E22530075 E22530085 E22530095 E22530105 E22530115;

array E225305 (j) E22530016 E22530026 E22530036 E22530046 E22530056 E22530066 E22530076 E22530086 E22530096 E22530106 E22530116;

 

array E225351 (j) E22535012 E22535022 E22535032 E22535042 E22535052 E22535062 E22535072 E22535082 E22535092 E22535102 E22535112;

array E225352 (j) E22535013 E22535023 E22535033 E22535043 E22535053 E22535063 E22535073 E22535083 E22535093 E22535103 E22535113;

array E225353 (j) E22535014 E22535024 E22535034 E22535044 E22535054 E22535064 E22535074 E22535084 E22535094 E22535104 E22535114;

array E225354 (j) E22535015 E22535025 E22535035 E22535045 E22535055 E22535065 E22535075 E22535085 E22535095 E22535105 E22535115;

array E225355 (j) E22535016 E22535026 E22535036 E22535046 E22535056 E22535066 E22535076 E22535086 E22535096 E22535106 E22535116;

 

array E22613 (j) E2261301-E2261311;

array E22614 (j) E2261401-E2261411;

array E22615 (j) E2261501-E2261511;

array E22616 (j) E2261601-E2262611;

array E22617 (j) E2261701-E2261711;

 

array E22628 (j) E2262801-E2262811;

array E22629 (j) E2262901-E2262911;

array E22630 (j) E2263001-E2263011;

array E22631 (j) E2263101-E2263111;

array E22632 (j) E2263201-E2263211;

 

array E22628e (j) E22628e01-E22628e11;

array E22629e (j) E22629e01-E22629e11;

array E22630e (j) E22630e01-E22630e11;

array E22631e (j) E22631e01-E22631e11;

array E22632e (j) E22632e01-E22632e11;

 

array E22628c (j) E22628c01-E22628c11;

array E22629c (j) E22629c01-E22629c11;

array E22630c (j) E22630c01-E22630c11;

array E22631c (j) E22631c01-E22631c11;

array E22632c (j) E22632c01-E22632c11;

 

array E22628cb (j) E22628cb01-E22628cb11;

array E22629cb (j) E22629cb01-E22629cb11;

array E22630cb (j) E22630cb01-E22630cb11;

array E22631cb (j) E22631cb01-E22631cb11;

array E22632cb (j) E22632cb01-E22632cb11;

 

array E102051 (j) E100205012 E100205022 E100205032 E100205042 E100205052 E100205062 E100205072 E100205082 E100205092 E100205102 E100205112;

array E102052 (j) E100205013 E100205023 E100205033 E100205043 E100205053 E100205063 E100205073 E100205083 E100205093 E100205103 E100205113;

array E102053 (j) E100205014 E100205024 E100205034 E100205044 E100205054 E100205064 E100205074 E100205084 E100205094 E100205104 E100205114;

array E102054 (j) E100205015 E100205025 E100205035 E100205045 E100205055 E100205065 E100205075 E100205085 E100205095 E100205105 E100205115;

array E102055 (j) E100205016 E100205026 E100205036 E100205046 E100205056 E100205066 E100205076 E100205086 E100205096 E100205106 E100205116;

 

array E102141 (j) E100214012 E100214022 E100214032 E100214042 E100214052 E100214062 E100214072 E100214082 E100214092 E100214102 E100214112;

array E102142 (j) E100214013 E100214023 E100214033 E100214043 E100214053 E100214063 E100214073 E100214083 E100214093 E100214103 E100214113;

array E102143 (j) E100214014 E100214024 E100214034 E100214044 E100214054 E100214064 E100214074 E100214084 E100214094 E100214104 E100214114;

array E102144 (j) E100214015 E100214025 E100214035 E100214045 E100214055 E100214065 E100214075 E100214085 E100214095 E100214105 E100214115;

array E102145 (j) E100214016 E100214026 E100214036 E100214046 E100214056 E100214066 E100214076 E100214086 E100214096 E100214106 E100214116;

 

array E10214b1 (j) E100214b012 E100214b022 E10214b32 E100214b042 E100214b052 E100214b062 E100214b072 E100214b082 E100214b092 E100214b102 E100214b112;

array E10214b2 (j) E100214b013 E100214b023 E100214b033 E100214b043 E100214b053 E100214b063 E100214b073 E100214b083 E100214b093E100214b103 E100214b113;

array E10214b3 (j) E100214b014 E100214b024 E100214b034 E100214b044 E100214b054 E100214b064 E100214b074 E100214b084 E100214b094 E100214b104 E100214b114;

array E10214b4 (j) E100214b015 E100214b025 E100214b035 E100214b045 E100214b055 E100214b065 E100214b075 E100214b085 E100214b095 E100214b105 E100214b115;

array E10214b5 (j) E100214b016 E100214b026 E100214b036 E100214b046 E100214b056 E100214b066 E100214b076 E100214b086 E100214b096 E100214b106 E100214b116;

 

array E10214aaa1 (j) E100214aaa012 E100214aaa022 E100214aaa032 E100214aaa042 E100214aaa052 E100214aaa062 E100214aaa072 E100214aaa082 E10214aaa092 E100214aaa102 E10214aaa112;

array E10214aaa2 (j) E100214aaa013 E100214aaa023 E100214aaa033 E100214aaa043 E100214aaa053 E100214aaa063 E100214aaa073 E100214aaa083 E10214aaa093 E100214aaa103 E10214aaa113;

array E10214aaa3 (j) E100214aaa014 E100214aaa024 E100214aaa034 E100214aaa044 E100214aaa054 E100214aaa064 E100214aaa074 E100214aaa084 E10214aaa094 E100214aaa104 E10214aaa114;

array E10214aaa4 (j) E100214aaa015 E100214aaa025 E100214aaa035 E100214aaa045 E100214aaa055 E100214aaa065 E100214aaa075 E100214aaa085 E10214aaa095 E100214aaa105 E10214aaa115;

array E10214aaa5 (j) E100214aaa016 E100214aaa026 E100214aaa036 E100214aaa046 E100214aaa056 E100214aaa066 E100214aaa076 E100214aaa086 E10214aaa096 E100214aaa106 E10214aaa116;

 

array E10214aab1 (j) E100214aab012 E100214aab022 E100214aab032 E100214aab042 E100214aab052 E100214aab062 E100214aab072 E100214aab082 E10214aab092 E100214aab102 E10214aab112;

array E10214aab2 (j) E100214aab013 E100214aab023 E100214aab033 E100214aab043 E100214aab053 E100214aab063 E100214aab073 E100214aab083 E10214aab093 E100214aab103 E10214aab113;

array E10214aab3 (j) E100214aab014 E100214aab024 E100214aab034 E100214aab044 E100214aab054 E100214aab064 E100214aab074 E100214aab084 E10214aab094 E100214aab104 E10214aab114;

array E10214aab4 (j) E100214aab015 E100214aab025 E100214aab035 E100214aab045 E100214aab055 E100214aab065 E100214aab075 E100214aab085 E10214aab095 E100214aab105 E10214aab115;

array E10214aab5 (j) E100214aab016 E100214aab026 E100214aab036 E100214aab046 E100214aab056 E100214aab066 E100214aab076 E100214aab086 E10214aab096 E100214aab106 E10214aab116;

 

array E100234 (j) E1023401-E1023411;

array E100235 (j) E1023501-E1023511;

array E100236 (j) E1023601-E1023611;

array E100237 (j) E1023701-E1023711;

array E100239 (j) E1023901-E1023911;

 

array E100250 (j) E1025001-E1025011;

array E100251 (j) E1025101-E1025111;

array E100252 (j) E1025201-E1025211;

array E100253 (j) E1025301-E1025311;

array E100254 (j) E1025401-E1025411;

 

array E100250e (j) E10250e01-E10250e11;

array E100251e (j) E10251e01-E10251e11;

array E100252e (j) E10252e01-E10252e11;

array E100253e (j) E10253e01-E10253e11;

array E100254e (j) E10254e01-E10254e11;

 

array E100250c (j) E10250c01-E10250c11;

array E100251c (j) E10251c01-E10251c11;

array E100252c (j) E10252c01-E10252c11;

array E100253c (j) E10253c01-E10253c11;

array E100254c (j) E10254c01-E10254c11;

 

array E100250cb (j) E10250cb01-E10250cb11;

array E100251cb (j) E10251cb01-E10251cb11;

array E100252cb (j) E10252cb01-E10252cb11;

array E100253cb (j) E10253cb01-E10253cb11;

array E100254cb (j) E10254cb01-E10254cb11;

 

array E384071 (j) E38407011 E38407021 E38407031 E38407041 E38407051 E38407061 E38407071 E38407081 E38407091 E38407101 E38407111;

array E384072 (j) E38407012 E38407022 E38407032 E38407042 E38407052 E38407062 E38407072 E38407082 E38407092 E38407102 E38407112;

array E384073 (j) E38407013 E38407023 E38407033 E38407043 E38407053 E38407063 E38407073 E38407083 E38407093 E38407103 E38407113;

array E384074 (j) E38407014 E38407024 E38407034 E38407044 E38407054 E38407064 E38407074 E38407084 E38407094 E38407104 E38407114;

array E384075 (j) E38407015 E38407025 E38407035 E38407045 E38407055 E38407065 E38407075 E38407085 E38407095 E38407105 E38407115;

 

array E384161 (j) E38416011 E38416021 E38416031 E38416041 E38416051 E38416061 E38416071 E38416081 E38416091 E38416101 E38416111;

array E384162 (j) E38416012 E38416022 E38416032 E38416042 E38416052 E38416062 E38416072 E38416082 E38416092 E38416102 E38416112;

array E384163 (j) E38416013 E38416023 E38416033 E38416043 E38416053 E38416063 E38416073 E38416083 E38416093 E38416103 E38416113;

array E384164 (j) E38416014 E38416024 E38416034 E38416044 E38416054 E38416064 E38416074 E38416084 E38416094 E38416104 E38416114;

array E384165 (j) E38416015 E38416025 E38416035 E38416045 E38416055 E38416065 E38416075 E38416085 E38416095 E38416105 E38416115;

 

array E38416K1 (j) E38416K011 E38416K021 E38416K031 E38416K041 E38416K051 E38416K061 E38416K071 E38416K081 E38416K091 E38416K101 E38416K111;

array E38416K2 (j) E38416K012 E38416K022 E38416K032 E38416K042 E38416K052 E38416K062 E38416K072 E38416K082 E38416K092 E38416K102 E38416K112;

array E38416K3 (j) E38416K013 E38416K023 E38416K033 E38416K043 E38416K053 E38416K063 E38416K073 E38416K083 E38416K093 E38416K103 E38416K113;

array E38416K4 (j) E38416K014 E38416K024 E38416K034 E38416K044 E38416K054 E38416K064 E38416K074 E38416K084 E38416K094 E38416K104 E38416K114;

array E38416K5 (j) E38416K015 E38416K025 E38416K035 E38416K045 E38416K055 E38416K065 E38416K075 E38416K085 E38416K095 E38416K105 E38416K115;

 

array E38416I1 (j) E38416I011 E38416I021 E38416I031 E38416I041 E38416I051 E38416I061 E38416I071 E38416I081 E38416I091 E38416I101 E38416I111;

array E38416I2 (j) E38416I012 E38416I022 E38416I032 E38416I042 E38416I052 E38416I062 E38416I072 E38416I082 E38416I092 E38416I102 E38416I112;

array E38416I3 (j) E38416I013 E38416I023 E38416I033 E38416I043 E38416I053 E38416I063 E38416I073 E38416I083 E38416I093 E38416I103 E38416I113;

array E38416I4 (j) E38416I014 E38416I024 E38416I034 E38416I044 E38416I054 E38416I064 E38416I074 E38416I084 E38416I094 E38416I104 E38416I114;

array E38416I5 (j) E38416I015 E38416I025 E38416I035 E38416I045 E38416I055 E38416I065 E38416I075 E38416I085 E38416I095 E38416I105 E38416I115;

 

array E38416IB1 (j) E38416IB011 E38416IB021 E38416IB031 E38416IB041 E38416IB051 E38416IB061 E38416IB071 E38416IB081 E38416IB091 E38416IB101 E38416IB111;

array E38416IB2 (j) E38416IB012 E38416IB022 E38416IB032 E38416IB042 E38416IB052 E38416IB062 E38416IB072 E38416IB082 E38416IB092 E38416IB102 E38416IB112;

array E38416IB3 (j) E38416IB013 E38416IB023 E38416IB033 E38416IB043 E38416IB053 E38416IB063 E38416IB073 E38416IB083 E38416IB093 E38416IB103 E38416IB113;

array E38416IB4 (j) E38416IB014 E38416IB024 E38416IB034 E38416IB044 E38416IB054 E38416IB064 E38416IB074 E38416IB084 E38416IB094 E38416IB104 E38416IB114;

array E38416IB5 (j) E38416IB015 E38416IB025 E38416IB035 E38416IB045 E38416IB055 E38416IB065 E38416IB075 E38416IB085 E38416IB095 E38416IB105 E38416IB115;

 

 

*** Define the faked sub-arrays for 38329 variables for each of the 5 comp. types, the variables in the five related sub-arrays are same because the 38329 variables are only about the single comp. type reported in the beginning;

 

array e383291b (j) e38329b01-e38329b11;

array e383292b (j) e38329b01-e38329b11;

array e383293b (j) e38329b01-e38329b11;

array e383294b (j) e38329b01-e38329b11;

array e383295b (j) e38329b01-e38329b11;

 

array e383291d (j) e38329d01-e38329d11;

array e383292d (j) e38329d01-e38329d11;

array e383293d (j) e38329d01-e38329d11;

array e383294d (j) e38329d01-e38329d11;

array e383295d (j) e38329d01-e38329d11;

 

array e383291k (j) e38329k01-e38329k11;

array e383292k (j) e38329k01-e38329k11;

array e383293k (j) e38329k01-e38329k11;

array e383294k (j) e38329k01-e38329k11;

array e383295k (j) e38329k01-e38329k11;

 

array e383291i (j) e38329i01-e38329i11;

array e383292i (j) e38329i01-e38329i11;

array e383293i (j) e38329i01-e38329i11;

array e383294i (j) e38329i01-e38329i11;

array e383295i (j) e38329i01-e38329i11;

 

array e383291ib (j) e38329ib01-e38329ib11;

array e383292ib (j) e38329ib01-e38329ib11;

array e383293ib (j) e38329ib01-e38329ib11;

array e383294ib (j) e38329ib01-e38329ib11;

array e383295ib (j) e38329ib01-e38329ib11;

 

**** First level of arrays, for 5 comp. types;

array e21200 (t) e212002-e212006;

 

array e21600 (t) e216001-e216005;

array e22500 (t) e225001-e225005;

array e22550 (t) e225501-e225505;

array e22530 (t) e225301-e225305;

array e22535 (t) e225351-e225355;

 

array ct1unit (t) e22613-e22617;

array ct1amt  (t) e22628-e22632;

array ct1days (t) e22628e e22629e e22630e e22631e e22632e;

array ct1prju  (t) e22628c e22629c e22630c e22631c e22632c;

array ct1prjt  (t) e22628cb e22629cb e22630cb e22631cb e22632cb;

 

array e10205 (t) e102051-e102055;

array e10214 (t) e102141-e102145;

array e10214b (t) e10214b1-e10214b5;

array e10214aaa (t) e10214aaa1-e10214aaa5;

array e10214aab (t) e10214aab1-e10214aab5;

 

array ct2unit (t) e100234 e100235 e100236 e100237 e100239;

array ct2amt  (t) e100250-e100254;

array ct2days (t) e100250e e100251e e100252e e100253e e100254e;

array ct2prju  (t) e100250c e100251c e100252c e100253c e100254c;

array ct2prjt  (t) e100250cb e100251cb e100252cb e100253cb e10025cb;

 

 

array e38329b (t) e383291b e383292b e383293b e383294b e3832995b;

array e38329d (t) e383291d e383292d e383293d e383294d e383295d;

array e38329k (t) e383291k e383292k e383293k e383294k e383295k;

array e38329i (t) e383291i e383292i e383293i e383294i e383295i;

array e38329ib (t) e383291ib e383292ib e383293ib e383294ib e383295ib;

 

array e38407 (t) e384071-e384075;

array e38416 (t) e384161-e384165;

array e38416k (t) e38416k1-e38416k5;

array e38416i (t) e38416i1-e38416i5;

array e38416ib (t) e38416ib1-e38416ib5;

 

array e22510 (t) e225101-e225105;

 

***** Define the faked arrays for variables ECURR, EUID and WKSWK;

array ecur1 (j) ecurr01-ecurr11;

array ecur2 (j) ecurr01-ecurr11;

array ecur3 (j) ecurr01-ecurr11;

array ecur4 (j) ecurr01-ecurr11;

array ecur5 (j) ecurr01-ecurr11;

 

array euidd1 (j) euid01-euid11;

array euidd2 (j) euid01-euid11;

array euidd3 (j) euid01-euid11;

array euidd4 (j) euid01-euid11;

array euidd5 (j) euid01-euid11;

 

array ecur (t) ecur1-ecur5;

array euidd (t) euidd1-euidd5;

 

***** Variables created;

**** Second level of arrays: for nine jobs;

 

array cpunit1 (j) cpunit101-cpunit111;

array cpunit2 (j) cpunit201-cpunit211;

array cpunit3 (j) cpunit301-cpunit311;

array cpunit4 (j) cpunit401-cpunit411;

array cpunit5 (j) cpunit501-cpunit511;

 

array cpdays1 (j) cpdays101-cpdays111;

array cpdays2 (j) cpdays201-cpdays211;

array cpdays3 (j) cpdays301-cpdays311;

array cpdays4 (j) cpdays401-cpdays411;

array cpdays5 (j) cpdays501-cpdays511;

 

array cpprju1 (j) cpprju101-cpprju111;

array cpprju2 (j) cpprju201-cpprju211;

array cpprju3 (j) cpprju301-cpprju311;

array cpprju4 (j) cpprju401-cpprju411;

array cpprju5 (j) cpprju501-cpprju511;

 

array cpprjt1 (j) cpprjt101-cpprjt111;

array cpprjt2 (j) cpprjt201-cpprjt211;

array cpprjt3 (j) cpprjt301-cpprjt311;

array cpprjt4 (j) cpprjt401-cpprjt411;

array cpprjt5 (j) cpprjt501-cpprjt511;

 

array cpamt1 (j) cpamt101-cpamt111;

array cpamt2 (j) cpamt201-cpamt211;

array cpamt3 (j) cpamt301-cpamt311;

array cpamt4 (j) cpamt401-cpamt411;

array cpamt5 (j) cpamt501-cpamt511;

 

array cpwkly1 (j) cpwkly101-cpwkly111;

array cpwkly2 (j) cpwkly201-cpwkly211;

array cpwkly3 (j) cpwkly301-cpwkly311;

array cpwkly4 (j) cpwkly401-cpwkly411;

array cpwkly5 (j) cpwkly501-cpwkly511;

 

**** First level of arrays: for five comp. types;

array cpunit (t) cpunit1-cpunit5;

array cpdays (t) cpdays1-cpdays5;

array cpprju (t) cpprju1-cpprju5;

array cpprjt (t)cpprjt1-cpprjt5;

array cpamt (t) cpamt1-cpamt5;

array cpwkly (t) cpwkly1-cpwkly5;

 

***** Initialize variables;

do t=1 to 5;

  do j=1 to 11;

    cpunit=-4;

    cpamt=-4;

    cpdays=-4;

    cpprju=-4;

    cpprjt=-4;

    cpwkly=-4;

  end;

end;

 

/*------------------------------  The process to create weekly compensation --------------------------*/

 

***** Time Unit;

do t=1 to 5;

  do j=1 to 11;

    if e21600 not in (.,-4,-5) then cpunit=e21600;

    if ct1unit not in (.,-4,-5) then cpunit=ct1unit;

    if e10205 not in (.,-4,-5) then cpunit=e10205;

    if ct2unit not in (.,-4,-5) then cpunit=ct2unit;

    if e38329b not in (.,-4,-5) and e21200=1 then cpunit=e38329b;

    if e38407 not in (.,-4,-5) then cpunit=e38407;

  end;

end;

 

***** Number of Days Per Week;

do t=1 to 5;

  do j=1 to 11;

    if e22550 not in (.,-4,-5) then cpdays=e22550;

    if ct1days not in (.,-4,-5) then cpdays=ct1days;

    if e10214b not in (.,-4,-5) then cpdays=e10214b;

    if ct2days not in (.,-4,-5) then cpdays=ct2days;

    if e38329k not in (.,-4,-5) and e21200=1 then cpdays=e38329k;

    if e38416k not in (.,-4,-5) then cpdays=e38416k;

  end;

end;

 

***** Time Unit to Finish One Item or Job if reporting "Per Item" or "Per Job";

do t=1 to 5;

  do j=1 to 11;

    if e22530 not in (.,-4,-5) then cpprju=e22530;

    if ct1prju not in (.,-4,-5) then cpprju=ct1prju;

    if e10214aaa not in (.,-4,-5) then cpprju=e10214aaa;

    if ct2prju not in (.,-4,-5) then cpprju=ct2prju;

    if e38329i not in (.,-4,-5) and e21200=1 then cpprju=e38329i;

    if e38416i not in (.,-4,-5) then cpprju=e38416i;

  end;

end;

 

***** Amount of Time to Finish One Item or Job if Reporting "Per Item" or "Per Job";

do t=1 to 5;

  do j=1 to 11;

    if e22535 not in (.,-4,-5) then cpprjt=e22535;

    if ct1prjt not in (.,-4,-5) then cpprjt=ct1prjt;

    if e10214aab not in (.,-4,-5) then cpprjt=e10214aab;

    if ct2prjt not in (.,-4,-5) then cpprjt=ct2prjt;

    if e38329ib not in (.,-4,-5) and e21200=1 then cpprjt=e38329ib;

    if e38416ib not in (.,-4,-5) then cpprjt=e38416ib;

  end;

end;

 

***** Amount;

do t=1 to 5;

  do j=1 to 11;

    if e22500 not in (.,-4,-5) then cpamt=e22500;

    if ct1amt not in (.,-4,-5) then cpamt=ct1amt;

    if e10214 not in (.,-4,-5) then cpamt=e10214;

    if ct2amt not in (.,-4,-5) then cpamt=ct2amt;

    if e38329d not in (.,-4,-5) and e21200=1 then cpamt=e38329d;

    if e38416 not in (.,-4,-5) then cpamt=e38416;

  end;

end;

 

***** Weekly compensation pay;

**** First, define and calculate total hours, which will be the no. of hours worked for other comp.;

array tt1hrs (j) tthrs01-tthrs11;

array tt2hrs (j) tthrs01-tthrs11;

array tt3hrs (j) tthrs01-tthrs11;

array tt4hrs (j) tthrs01-tthrs11;

array tt5hrs (j) tthrs01-tthrs11;

 

array hour1s (j) hours01-hours11;

array hour2s (j) hours01-hours11;

array hour3s (j) hours01-hours11;

array hour4s (j) hours01-hours11;

array hour5s (j) hours01-hours11;

 

array ot1hrs (j) othrs01-othrs11;

array ot2hrs (j) othrs01-othrs11;

array ot3hrs (j) othrs01-othrs11;

array ot4hrs (j) othrs01-othrs11;

array ot5hrs (j) othrs01-othrs11;

 

array tthrs (t) tt1hrs tt2hrs tt3hrs tt4hrs tt5hrs;

array hours (t) hour1s hour2s hour3s hour4s hour5s;

array othrs (t) ot1hrs ot2hrs ot3hrs ot4hrs ot5hrs;

 

do t=1 to 5;

  do j=1 to 11;

    tthrs=-4;

    if hours in (-1,-2,-3) or othrs in (-1,-2,-3) then tthrs=-3;

    else if hours=-4 and othrs=-4 then tthrs=-4;

    else if hours=-4 and othrs ge 0  then tthrs=othrs;

    else if othrs=-4 and hours ge 0  then tthrs=hours;

    else if hours ge 0 and othrs ge 0 then tthrs=hours+othrs;

  end;

end;

 

**** No. of weeks per year;

array cpwks1 (j) otwks01-otwks11;

array cpwks2 (j) otwks01-otwks11;

array cpwks3 (j) otwks01-otwks11;

array cpwks4 (j) otwks01-otwks11;

array cpwks5 (j) otwks01-otwks11;

 

array cpwks (t) cpwks1-cpwks5;

 

**** Calculate the Weekly Compensation Pay;

do t=1 to 5;

  do j=1 to 11;

    if cpunit=-4 then cpwkly=-4;

    else if cpunit in (9,14) then cpwkly=0;

    else if cpunit in (1,21) then do;

      if cpamt ge 0 and tthrs ge 0 then cpwkly=cpamt*tthrs;

      else cpwkly=-3;

    end;

    else if cpamt ge 0 and cpunit in (12,13) and cpprju in (1,2) then do;

      if cpprju=1 and cpprjt>0 and tthrs ge 0 then cpwkly=(cpamt/cpprjt)*60*tthrs;

      else if cpprju=2 and cpprjt>0 and tthrs ge 0 then cpwkly=(cpamt/cpprjt)*tthrs;

      else cpwkly=-3;

    end;

 

    else if cpamt ge 0 then do;

      if cpunit in (2,22) then do;

        if cpdays gt 0 then cpwkly=cpamt*cpdays;

        else cpwkly=-3;

      end;

 

      else if cpunit in (3,23) then cpwkly=cpamt;

      else if cpunit in (4,24) then cpwkly=cpamt/2;

      else if cpunit in (5,25) then cpwkly=cpamt/4.3;

      else if cpunit in (6,26) then do;

        if cpwks gt 0 then cpwkly=cpamt/cpwks;

        else cpwkly=-3;

      end;

      else if cpunit in (8,28) then cpwkly=cpamt/2.15;

 

      else if cpunit in (12,13) then do;

        if cpprjt gt 0 then do;

          if cpprju=3 then do;

            if cpdays gt 0 then cpwkly=(cpamt/cpprjt)*cpdays;

            else cpwkly=-3;

          end;

          else if cpprju=4 then cpwkly=cpamt/cpprjt;

          else if cpprju=5 then cpwkly=cpamt/(cpprjt*4.3);

          else cpwkly=-3;

        end;

        else cpwkly=-3;

      end;

      else if cpunit=16 then do;

        flagcp16=1;

        cpwkly=-3;

      end;

 

      else cpwkly=-3;

    end;

 

    else if cpamt ne -4 then cpwkly=-3;

 

  end;

end;

 

/*---- bad time unit for compensations ----*/

 

perjobck=0;

 

unit7cp=0;

unit16cp=0;

unit9cp=0;

 

do t=1 to 5;

  do j=1 to 11;

    if cpunit=7 then unit7cp=1;

    if cpunit=16 then unit16cp=1;

    if cpunit=999 then unit9cp=1;

 

  end;

end;

 

/*---------------------------------Hourly Total compensation for Each Job---------------------------------*/

 

/* After computing the hourly overtime payment and hourly other compensation payment. Putting these info.

   together with hourly regular pay and working hours, the hourly total compensation will be created. */

 

***** Redefine the arrays that are going to be used in this last step so the format will be unified;

 array hrly hrly01-hrly11;

 array hrs hrs01-hrs11;

 array ot ot01-ot11;

 array othr othr01-othr11;

 array comp1 comp101-comp111;

 array comp2 comp201-comp211;

 array comp3 comp301-comp311;

 array comp4 comp401-comp411;

 array comp5 comp501-comp511;

 

 array ttcomp ttcomp01-ttcomp11;

 

 array ttlhrs tthrs01-tthrs11;

 

 **** Change the created hours or payment info. with value -4 to value 0;

 array var hourly01-hourly11 hours01-hours11 othrly01-othrly11 othrs01-othrs11

           cpwkly101-cpwkly111 cpwkly201-cpwkly211 cpwkly301-cpwkly311 cpwkly401-cpwkly411 cpwkly501-cpwkly511;

 array temp  hrly01-hrly11 hrs01-hrs11 ot01-ot11 othr01-othr11

             comp101-comp111 comp201-comp211 comp301-comp311 comp401-comp411 comp501-comp511;

 do over var;

   temp=var;

   if var=-4 then temp=0;

 end;

 

 ***** Initialize the total hourly compensation;

 do i=1 to 11;

   ttcomp[i]=-4;

 end;

 

 ***** Calculate the total compensation;

 do i=1 to 11;

  if -4<hrly[i]<0 or -4<ot[i]<0 or -4<comp1[i]<0 or -4<comp2[i]<0 or -4<comp3[i]<0 or -4<comp4[i]<0 or

     -4<comp5[i]<0 or -4<hrs[i]<0 or -4<othr[i]<0  then ttcomp[i]=-3;

  else if ttlhrs[i]=0 then ttcomp[i]=-3;

  else if ttlhrs[i] ne -4 then ttcomp[i]

          =( hrly[i]*hrs[i] + ot[i]*othr[i]+ comp1[i]+comp2[i]+comp3[i]+comp4[i]+comp5[i])/ttlhrs[i];

 end;

 

*** Cases whose job UID is not -4, it's not a military job, but they didn't answer the wage or compensation related questions in this round. We use flag variable "flagg1" created in hourly wage program to identify these people. And "oldcompe" created in hourly wage program is used as ttcomp;

 

array oldcomp oldcomp01-oldcomp11;

 

flagg2=0;

if flagg1=1 then do;

  do i=1 to 11;

    if oldcomp[i] ne -99 then do;

      ttcomp[i]=oldcomp[i];

      flagg2=1;

    end;

  end;

end;

 

*** Not interviewed in round 5;

do i=1 to 11;

  if e21200011=-5 then ttcomp[i]=-5;

end;

 

***** final wrapping and comparing;

array hrcomp hrcomp01-hrcomp11;

do i=1 to 11;
hrcomp[i]=round(ttcomp[i],1);
if ttcomp[i] in (-1,-2,-3) then hrcomp[i]=-3;
end;

endsas;

 


Return to top Return to Appendix 2 Return to Table of Contents