**The following is adapted from cor582.sas; **but the GG022JJD definitions have changed from 1992 to account for this years **differences; *generate Total yearly income from wages etc.. and business earnings; if GP202RE >=0 and GP204RE >=0 then TYI = GP202RE + GP204RE; if GP202RE >=0 and GP204RE <0 then TYI = GP202RE; if GP202RE <0 and GP204RE >=0 then TYI = GP204RE; if GP202RE < 0 and GP204RE < 0 then TYI = -1; *generate wage estimation types; *if I missed anything; wagecat = 0; GG021JJD = -2; GG022JJD = -2; *for -2s on GG011JJC; if GG011JJC = -2 or GG011JJC = -5 then wagecat = -2; if GG011JJC = 1 or idswl in (241024, 273025, 464038, 752146, 505002, 613003)then do; *Non truncated valid hourly wage; if GG012JJC > 150 and GG011JJC < 50000 then do; wagecat = 1; GG021JJD = GG012JJC/100; GG022JJD = wagecat; end; *DK hourly wage, non truncated monthly earnings, strictly positive hours reported; if GG012JJC = -1 and (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs > 0 then do; wagecat = 2; GG021JJD = GG018JJC/(bx13hrs*4.33); GG022JJD = wagecat; end; *DK hourly wage, DK/REF monthly earnings, strictly positive hours reported; if GG012JJC = -1 and (GG018JJC = -1 or GG018JJC = -3) and bx13hrs > 0 then wagecat = 3; *TYI; *DK hourly wage, DK/REF monthly earnings, negative or zero hours reported; if GG012JJC = -1 and (GG018JJC = -1 or GG018JJC = -3) and bx13hrs <= 0 then wagecat = 4; *TYI; *REF hourly Wage, strictly positive hours reported; if GG012JJC = -3 and bx13hrs > 0 then wagecat = 5; *TYI; *REF hourly Wage, negative or zero hours reported; if GG012JJC = -3 and bx13hrs <= 0 then wagecat = 6; *TYI; *NOT ASCERTAINED hourly wage, non truncated monthly earnings, strictly positive hours reported; if GG012JJC = -4 and (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs > 0 then do; wagecat = 7; GG021JJD = GG018JJC/(bx13hrs*4.33); GG022JJD = wagecat; end; *NOT ASCERTAINED hourly wage, DK monthly earnings, strictly positive hours reported; if GG012JJC = -4 and GG018JJC = -1 and bx13hrs > 0 then wagecat = 8; *TYI; *Bottom truncated hourly wage, strictly positive hours reported; if GG012JJC = 150 and bx13hrs > 0 then wagecat = 9; *TYI; end; if GG011JJC = 2 or idswl in (278002, 116140, 241416, 450092, 418028) then do; *Top truncated salary, strictly positive hours reported; if GG013JJC = 999999 and bx13hrs > 0 then wagecat = 10; *TYI; *Bottom truncated salary, strictly positive hours reported; if GG013JJC = 10 and bx13hrs > 0 then wagecat = 11; *TYI; *Non truncated Salary, BIWEEKLY pay period, strictly positive hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 3 and bx13hrs > 0 then do; wagecat = 12; GG021JJD = GG013JJC/(bx13hrs*2); GG022JJD = wagecat; end; *Non truncated salary, BIWEEKLY pay period, negative or zero hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 3 and bx13hrs <= 0 then do; wagecat = 13; GG021JJD = GG013JJC/(40*2); GG022JJD = wagecat; end; *Non truncated salary, MONTHLY pay period, strictly positive hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 4 and bx13hrs > 0 then do; wagecat = 14; GG021JJD = GG013JJC/(bx13hrs*4.33); GG022JJD = wagecat; end; *Non truncated salary, MONTHLY pay period, negative or zero hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 4 and bx13hrs <= 0 then do; wagecat = 15; GG021JJD = GG013JJC/(40*4.33); GG022JJD = wagecat; end; *Non truncated salary, ANNUAL pay period, full time/full year, strictly positive hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 5 and GG015JJC = 1 and bx13hrs > 0 then do; wagecat = 16; GG021JJD = GG013JJC/(bx13hrs*52); GG022JJD = wagecat; end; *Non truncated salary, ANNUAL pay period, full time/full year, negative or zero hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 5 and GG015JJC = 1 and bx13hrs <= 0 then do; wagecat = 17; GG021JJD = GG013JJC/(40*52); GG022JJD = wagecat; end; *Non truncated salary, ANNUAL pay period, NOT full time/full year, strictly positive hours reported on GG017JJC; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 5 and GG015JJC = 2 and GG016JJC > 0 and GG017JJC > 0 then do; wagecat = 18; GG021JJD = GG013JJC/(GG017JJC*GG016JJC*4.33); GG022JJD = wagecat; end; *Non truncated salary, ANNUAL pay period, NOT full time/full year, negative or zero hours reported on GG017JJC, strictly positive hours reported in employment section; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 5 and GG015JJC = 2 and GG016JJC > 0 and GG017JJC <= 0 and bx13hrs > 0 then do; wagecat = 19; GG021JJD = GG013JJC/(bx13hrs*GG016JJC*4.33); GG022JJD = wagecat; end; *Non truncated salary, ANNUAL pay period, DK/REF/NOT ASCERTAINED fulltime/full year, strictly positive hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 5 and GG015JJC < 0 and bx13hrs > 0 then do; wagecat = 20; GG021JJD = GG013JJC/(bx13hrs*52); GG022JJD = wagecat; end; *Non truncated salary, ANNUAL pay period, DK/REF/NOT ASCERTAINED fulltime/full year, negative or zero hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC = 5 and GG015JJC < 0 and bx13hrs <= 0 then do; wagecat = 21; GG021JJD = GG013JJC/(40*52); GG022JJD = wagecat; end; *Non truncated salary, DK/REF/NOT ASCERTAINED pay period, strictly positive hours reported; if (GG013JJC > 10 and GG013JJC <= 999998) and GG014JJC < 0 and bx13hrs > 0 then wagecat = 22; *TYI; *DK/REF salary, DK/REF/NOT ASCERTAINED monthly earnings, strictly positive hours reported; if (GG013JJC = -1 or GG013JJC = -3) and GG018JJC < 0 and bx13hrs > 0 then wagecat = 23; *TYI; *DK/REF salary, DK/REF/NOT ASCERTAINED monthly earnings, negative or zero hours reported; if (GG013JJC = -1 or GG013JJC = -3) and GG018JJC < 0 and bx13hrs <= 0 then wagecat = 24; *TYI; *NOT ASCERTAINED salary, non truncated monthly earnings, strictly positive hours reported; if GG013JJC = -4 and (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs > 0 then do; wagecat = 25; GG021JJD = GG018JJC/(bx13hrs*4.33); GG022JJD = wagecat; end; *NOT ASCERTAINED salary, non truncated monthly earnings, negative or zero hours reported; if GG013JJC = -4 and (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs <= 0 then do; wagecat = 26; GG021JJD = GG018JJC/(40*4.33); GG022JJD = wagecat; end; *NOT ASCERTAINED salary, top truncated monthly earnings, strictly positive hours reported; if GG013JJC = -4 and GG018JJC = 90000 and bx13hrs > 0 then wagecat = 27; *TYI; *NOT ASCERTAINED salary, DK/REF/NOT ASCERTAINED monthly earnings, strictly positive hours reported; if GG013JJC = -4 and GG018JJC < 0 and bx13hrs > 0 then wagecat = 28; *TYI; end; if GG011JJC = 4 or GG011JJC = 5 or GG011JJC = 6 and idswl not in (241024, 505002, 613003, 464038, 273025, 752146, 278002, 116140, 241416, 450092, 418028) then do; *Non truncated monthly earnings reported, strictly positive hours reported; if (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs > 0 then do; wagecat = 29; GG021JJD = GG018JJC/(bx13hrs*4.33); GG022JJD = wagecat; end; *DK/REF/NOT ASCERTAINED monthly earnings reported, strictly positive hours reported; if GG018JJC < 0 and bx13hrs > 0 then wagecat = 30; *TYI; *DK/REF/NOT ASCERTAINED monthly earnings reported, negative or zero hours reported; if GG018JJC < 0 and bx13hrs <= 0 then wagecat = 31; *TYI; *Bottom truncated monthly earnings, striclty positive hours reported; if GG018JJC = 0 and bx13hrs > 0 then wagecat = 32; *TYI; end; if GG011JJC = -1 or GG011JJC = -3 or GG011JJC = -4 and idswl not in (241024, 505002, 613003, 464038, 273025, 752146, 278002, 116140, 241416, 450092, 418028) then do; *DK/REF/NOT ASCERTAINED monthly earnings reported, strictly positive hours reported; if GG018JJC < 0 and bx13hrs > 0 then wagecat = 33; *TYI; *DK/REF/NOT ASCERTAINED monthly earnings reported, negative or zero hours reported; if GG018JJC < 0 and bx13hrs <= 0 then wagecat = 34; *TYI; *Bottom truncated monthly earnings, striclty positive hours reported; if GG018JJC = 0 and bx13hrs > 0 then wagecat = 35; *TYI; end; if GG011JJC = 3 and idswl not in (241024, 505002, 613003, 464038, 273025, 752146, 278002, 116140, 241416, 450092, 418028) then do; *Non truncated monthly earnings reported, strictly positive hours reported; if (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs > 0 then do; wagecat = 36; GG021JJD = GG018JJC/(bx13hrs*4.33); GG022JJD = wagecat; end; *Non truncated monthly earnings reported, negative or zero hours reported; if (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs <= 0 then do; wagecat = 37; GG021JJD = GG018JJC/(40*4.33); GG022JJD = wagecat; end; *DK/REF/NOT ASCERTAINED monthly earnings reported, strictly positive hours reported; if GG018JJC < 0 and bx13hrs > 0 then wagecat = 38; *TYI; *DK/REF/NOT ASCERTAINED monthly earnings reported, negative or zero hours reported; if GG018JJC < 0 and bx13hrs <= 0 then wagecat = 39; *TYI; *Bottom truncated monthly earnings, striclty positive hours reported; if GG018JJC = 0 and bx13hrs > 0 then wagecat = 40; *TYI; *Bottom truncated monthly earnings. negative or zero hours reported; if GG018JJC = 0 and bx13hrs <= 0 then wagecat = 41; *TYI; *Top truncated monthly earnings reported, strictly positive hours reported; if GG018JJC = 90000 and bx13hrs > 0 then wagecat = 42; *TYI; end; if GG011JJC = 7 and idswl not in (241024, 505002, 613003, 464038, 273025, 752146, 278002, 116140, 241416, 450092, 418028) then do; *Non truncated monthly earnings reported, strictly positive hours reported; if (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs > 0 then do; wagecat = 43; GG021JJD = GG018JJC/(bx13hrs*4.33); GG022JJD = wagecat; end; *Non truncated monthly earnings reported, negative or zero hours reported; if (GG018JJC > 0 and GG018JJC < 90000) and bx13hrs <= 0 then do; wagecat = 44; GG021JJD = GG018JJC/(40*4.33); GG022JJD = wagecat; end; *DK/REF/NOT ASCERTAINED monthly earnings reported, strictly positive hours reported; if GG018JJC < 0 and bx13hrs > 0 then wagecat = 45; *TYI; *DK/REF/NOT ASCERTAINED monthly earnings reported, negative or zero hours reported; if GG018JJC < 0 and bx13hrs <= 0 then wagecat = 46; *TYI; *Bottom truncated monthly earnings, striclty positive hours reported; if GG018JJC = 0 and bx13hrs > 0 then wagecat = 47; *TYI; *Bottom truncated monthly earnings. negative or zero hours reported; if GG018JJC = 0 and bx13hrs <= 0 then wagecat = 48; *TYI; *Top truncated monthly earnings reported, strictly positive hours reported; if GG018JJC = 90000 and bx13hrs > 0 then wagecat = 49; *TYI; end; if GG011JJC = 0 and idswl not in (241024, 505002, 613003, 464038, 273025, 752146, 278002, 116140, 241416, 450092, 418028) then do; *DK/REF/NOT ASCERTAINED monthly earnings reported, negative or zero hours reported; if GG018JJC < 0 and bx13hrs <= 0 then wagecat = 50; *TYI; *Bottom truncated monthly earnings, striclty positive hours reported; if GG018JJC = 0 and bx13hrs > 0 then wagecat = 51; *TYI; end; *Estimating using TYI; *nontruncated with hours; if wagecat in (3, 5, 8, 23, 28, 30, 33, 38, 45) then do; if TYI > 0 then do; GG021JJD = TYI/(bx13hrs*52); GG022JJD = wagecat; wagecat = wagecat+100; end; if TYI = 0 then do; GG021JJD = 0; GG022JJD = 0; end; if TYI < 0 then do; GG021JJD = -2; GG022JJD = -2; end; end; *nontruncated without hours; if wagecat in (4, 6, 24, 31, 34, 39, 46, 50) then do; if TYI > 0 then do; GG021JJD = TYI/(40*52); GG022JJD = wagecat; wagecat = wagecat+100; end; if TYI = 0 then do; GG021JJD = 0; GG022JJD = 0; end; if TYI < 0 then do; GG021JJD = -2; GG022JJD = -2; end; end; **NEED TO FIGURE OUT THIS, SHOULD USE TRUNCATION POINT BECAUSE WE HAVE IT IF TYI < 0; *truncated with hours; if wagecat in (9, 10, 11, 27, 32, 35, 40, 42, 47, 49, 51) then do; if TYI > 0 then do; GG021JJD = TYI/(bx13hrs*52); GG022JJD = wagecat; wagecat = wagecat+100; end; if TYI = 0 then do; GG021JJD = 0; GG022JJD = 0; end; if TYI < 0 then do; if wagecat = 9 then do; GG021JJD = GG012JJC/100; GG022JJD = wagecat; wagecat = wagecat+200; end; if wagecat in (10, 11) then do; GG021JJD = GG013JJC/(bx13hrs*52); GG022JJD = wagecat; wagecat = wagecat+200; end; if wagecat in (32, 35, 41, 47, 48, 51, 27, 49) then do; GG021JJD = GG018JJC/(bx13hrs*4.33); GG022JJD = wagecat; wagecat = wagecat+200; end; end; end; *truncated without hours; if wagecat in (41, 48) then do; if TYI > 0 then do; GG021JJD = TYI/(40*52); GG022JJD = wagecat; wagecat = wagecat+100; end; if TYI = 0 then do; GG021JJD = 0; GG022JJD = 0; end; if TYI < 0 then do; if wagecat = 9 then do; GG021JJD = GG012JJC/100; GG022JJD = wagecat; wagecat = wagecat+200; end; if wagecat in (10, 11) then do; GG021JJD = GG013JJC/(40*52); GG022JJD = wagecat; wagecat = wagecat+200; end; if wagecat in (32, 35, 41, 47, 48, 51, 27, 49) then do; GG021JJD = GG018JJC/(40*4.33); GG022JJD = wagecat; wagecat = wagecat+200; end; end; end; /*put individually coded here including why and what change*/ *******************************************************************************************************; *******************************************************************************************************; *******************************************************************************************************; *******************************************************************************************************; /* j270m@ : 1:2572:an:26000 b1366@ : 1:2573:co:b j270m@ : 1:2575:an:d : 1:2575:db:Begin re-execution for "j270m" change answer from "26000" : 1:2575:db:End of re-execution for "j270m" . Reached "b1366@" before return. b1366@ : 1:2577:co:b j270m@ : 1:2578:co:kc j270m@ : 1:2578:co:n j270m@ : 1:2588:sp:26000 a year. She doesn't know monthly// j270m@ : 1:2589:an:d */ if idswl = 509008 then do; if 0=0 then GG021JJD = (26000/(40*52)); GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:1570:an:1 : 1:1570:db:[goto j266s] j266s@ : 1:1589:an:0 j266s@ : 1:1598:sp:96k per year// */ if idswl = 279012 then do; if 0=0 then GG021JJD = (96000/(40*52)); GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:2420:an:1 : 1:2420:db:[goto j266s] j266s@ : 1:2441:an:0 j266s@ : 1:2453:sp:it was minimum wage it was 5 something/hour i can't remember j266s@ : 1:2454:sp:what// */ if idswl = 380011 then do; GG021JJD = 5; **5 something = 5; GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:3514:an:3 j266r@ : 1:3529:sp:by the hour or by the job depending on the situation, I do some side j266r@ : 1:3542:sp:work like painting and yardwork which is by hour but then it's different j266r@ : 1:3560:sp:for some jobs// : 1:3560:db:[goto j270m] j270m@ : 1:3561:co:b j266r@ : 1:3562:an:1 : 1:3562:db:Begin re-execution for "j266r" change answer from "3" : 1:3562:db:[goto j266s] : 1:3562:db:Pruning backup list: current item doesn't match backup list : 1:3562:db:End of re-execution for "j266r" . Reached "j266s@" before return. j266s@ : 1:3613:an:0 j266s@ : 1:3661:sp:for clean three hrs and under its $20/hr, and for 4 hrs or more it's j266s@ : 1:3678:sp:$18/hr and anything other than cleaning that I do is $12/hr like I do j266s@ : 1:3689:sp:ironing and yardwork and anything I can do to earn some money// */ if idswl = 464038 then do; GG021JJD = 19; **avg 20 and 18 to get 19 ignore else; GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:3041:an:1 : 1:3041:db:[goto j266s] j266s@ : 1:3044:co:b j266r@ : 1:3046:co:kc j266r@ : 1:3047:co:n j266r@ : 1:3051:sp:and piecework// j266r@ : 1:3052:an:1 j266s@ : 1:3073:an:0 j266s@ : 1:3106:sp:we were averaging about 17 dollars an hour but i dont know how j266s@ : 1:3126:sp:that broke down between piecework and hourly i think it was 10.66 an j266s@ : 1:3127:sp:hour// */ if idswl = 526022 then do; GG021JJD = 17; **avg about 17 = 17; GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:4165:an:1 : 1:4165:db:[goto j266s] j266s@ : 1:4195:an:0 j266s@ : 1:4214:sp:Regular route,$11.25, charters its $8.25// b1366@ : 1:4240:co:b j266s@ : 1:4243:co:kc j266s@ : 1:4244:co:n j266s@ : 1:4275:sp:unless, went somewhere overnight, 82.5o a day, plus 14 for food j266s@ : 1:4281:sp:and lodging taken care of// j266s@ : 1:4281:an:0 */ if idswl = 535106 then do; GG021JJD = 9.75; **avg 11.25 and 8.25 = 9.75; GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:2074:an:1 : 1:2074:db:[goto j266s] j266s@ : 1:2110:an:0 j266s@ : 1:2154:sp:most ever made was 18,000/yr, possibly $10.00 hour// */ if idswl = 583264 then do; if 0=0 then GG021JJD = (18000/(40*52)); GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:2546:an:1 : 1:2546:db:[goto j266s] j266s@ : 1:2565:an:0 j266s@ : 1:2612:sp:i have 3 different wage bases; the highest i have is 10.60/hr. j266s@ : 1:2655:sp:the other 2 i dk what the bases are. they have not put out j266s@ : 1:2667:sp:our wage scale yet bc they're waiting for what their financial j266s@ : 1:2680:sp:situation will be for the school// */ if idswl = 627003 then do; GG021JJD = 10.60; **this is the only wage they know; GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:3713:an:1 : 1:3713:db:[goto j266s] j266s@ : 1:3759:an:0 j266s@ : 1:3780:sp:$15,000 in one year, (how many hours a week ) 40 hours.// */ if idswl = 628119 then do; GG021JJD = (15000/(40*52)); GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:2458:an:1 : 1:2458:db:[goto j266s] j266s@ : 1:2472:an:0 j266s@ : 1:2480:sp:it varied depending on kids// */ if idswl = 629327 then do; GG021JJD = 0; **do not have any information; GG022JJD = 0; rulenumber = 6; end; /* j266r@ : 1:2721:an:1 : 1:2721:db:[goto j266s] j266s@ : 1:2736:an:0 j266s@ : 1:2746:sp:37000/year// */ if idswl = 710197 then do; if 0=0 then GG021JJD = (37000/(40*52)); GG022JJD = 0; rulenumber = 7; end; /* j268f@ : 1:2835:sp:broke down to about 22 to 24 dollars an hour// */ if idswl = 450014 then do; GG021JJD = 23.00; GG022JJD = 0; rulenumber = 7; end; /* j266r@ : 1:2700:an:1 : 1:2700:db:[goto j266s] j266s@ : 1:2701:co:kc j266s@ : 1:2701:co:n j266s@ : 1:2704:sp:plus commission// j266s@ : 1:2714:an:800 */ if idswl = 403308 then do; GG021JJD = 8.00; GG022JJD = 0; rulenumber = 7; end; /*-------------------------------------------------------- Summary Note: I cross-checked this program to ensure that each R is assigned a wage rate according to one and only one rule. There are 7 exceptions to this--these are the 7 Rs who are dealt w/ in the "special coding" instructions (Rule 13). Originally, these Rs were assigned a wage frm another rule (usually one of the "best estimates") and Rule 14 overrides that rule b/c it is placed last. It is impt that Rule 14 continue to be executed last. The information used in this rule is usually superior (more specific) than the general earnings information used in Rules 15-17. 5-30-95 p.k. -----------------------------------------------------------*/ * Round the wage rate to 3 decimal places; if (GG021JJD>=0) then do; GG021JJD=round(GG021JJD,.001); end; * make the decimal implied; if (GG021JJD lt 9999998 and GG021JJD>=0) then do; GG021JJD=GG021JJD*1000; end;