*Categorizing individual Census Codes into NHIS Detailed Categories as described here: National Center for Health Statistics. Dataset documentation 2018. Document Version Date: 25 July 2022. National Health Interview Survey (NHIS). Available from: https://ftp.cdc.gov/pub/health_Statistics/NCHs/Dataset_Documentation/NHIS/2021/Adult-codebook.pdf See Industry Appendix page 623, and Occupation Appendix page 626.; *Please note: *NHIS 2018 INDUSTRY AND OCCUPATION GROUPINGS uses the 2012 Census codes; *NHIS 2021 INDUSTRY AND OCCUPATION GROUPINGS uses the 2018 Census codes; *Mortality data starting with 2023 use 2018 census codes; **********************************************************; **********************************************************; **********************************************************; *email noms@cdc.gov with any questions on this program; **********************************************************; **********************************************************; **********************************************************; ; %let year=2023; options formdlim=* linesize=100; /*allows longer page lengths so output does not have as many page breaks*/ /*libname pub2023 'MYFILE\PublicUseData\2023';*/ libname pub2023 'myfile\PublicUseData\2023'; /*proc contents data=pub2023.public2023 ;*/ /*run;*/ proc format; value $occdet2018 '01'='01:Chief executives general and operations managers legislators' '02'='02:Advertising, marketing, promotions, public relations, and sales managers' '03'='03:Operations specialties managers' '04'='04:Other management occupations' '05'='05:Business operations specialists' '06'='06:Financial specialists' '07'='07:Computer specialists' '08'='08:Mathematical science occupations' '09'='09:Architects, surveyors, and cartographers' '10'='10:Engineers' '11'='11:Drafters, engineering, and mapping technicians' '12'='12:Life scientists' '13'='13:Physical scientists' '14'='14:Social scientists and related workers' '15'='15:Life, physical, and social science technicians' '16'='16:Counselors, social workers, and other community and social service specialists' '17'='17:Religious workers' '18'='18:Lawyers, judges and related workers' '19'='19:Legal support workers' '20'='20:Postsecondary teachers' '21'='21:Primary, secondary, and special education school teachers' '22'='22:Other teachers and instructors' '23'='23:Librarians, curators, and archivists' '24'='24:Other education, training, and library occupations' '25'='25:Art and design workers' '26'='26:Entertainers and performers, sports and related workers' '27'='27:Media and communications workers' '28'='28:Media and communications equipment workers' '29'='29:Health diagnosing and treating practitioners' '30'='30:Health technologists and technicians' '31'='31:Other healthcare practitioners and technical occupations' '32'='32:Nursing, psychiatric, and home health aides' '33'='33:Occupational and physical therapist assistants and aides' '34'='34:Other healthcare support occupations' '35'='35:First-line supervisors/managers, protective service workers' '36'='36:Fire fighting and prevention workers' '37'='37:Law enforcement workers' '38'='38:Other protective service workers' '39'='39:Supervisors, food preparation, and service worker' '40'='40:Cooks and food preparation workers' '41'='41:Food and beverage serving workers' '42'='42:Other food preparation and serving related workers' '43'='43:Supervisors, building and grounds cleaning and maintenance workers' '44'='44:Building cleaning and pest control workers' '45'='45:Grounds maintenance workers' '46'='46:Supervisors, personal care and service workers' '47'='47:Animal care and service workers' '48'='48:Entertainment attendants and related workers' '49'='49:Funeral service workers' '50'='50:Personal appearance workers' '51'='51:Transportation, tourism, and lodging attendants' '52'='52:Other personal care and service workers' '53'='53:Supervisors, sales workers' '54'='54:Retail sales workers' '55'='55:Sales representatives, services' '56'='56:Sales representatives, wholesale and manufacturing' '57'='57:Other sales and related workers' '58'='58:Supervisors, office and administrative support workers' '59'='59:Communications equipment operators' '60'='60:Financial clerks' '61'='61:Information and record clerks' '62'='62:Material recording, scheduling, dispatching, and distributing workers' '63'='63:Secretaries and administrative assistants ' '64'='64:Other office and administrative support workers' '65'='65:Supervisors, farming, fishing, and forestry workers' '66'='66:Agricultural workers' '67'='67:Fishing and hunting workers' '68'='68:Forest, conservation, and logging workers' '69'='69:Supervisors, construction and extraction workers' '70'='70:Construction trades workers' '71'='71:Helpers, construction trades' '72'='72:Other construction and related workers' '73'='73:Extraction workers' '74'='74:Supervisors of installation, maintenance, and repair workers' '75'='75:Electrical and electronic equipment mechanics, installers, and repairers' '76'='76:Vehicle and mobile equipment mechanics, installers, and repairers' '77'='77:Other installation, maintenance, and repair occupations' '78'='78:Supervisors, production workers' '79'='79:Assemblers and fabricators' '80'='80:Food processing workers' '81'='81:Metal workers and plastic workers' '82'='82:Printing workers' '83'='83:Textile, apparel, and furnishing workers' '84'='84:Woodworkers' '85'='85:Plant and system operators' '86'='86:Other production occupations' '87'='87:Supervisors, transportation and material moving workers' '88'='88:Air transportation workers' '89'='89:Motor vehicle operators' '90'='90:Rail transportation workers' '91'='91:Water transportation workers' '92'='92:Other transportation workers' '93'='93:Material moving workers' '94'='94:NIOSH NCHS housewife' '95'='95:NIOSH NCHS military' '96'='96:NIOSH NCHS Other--Misc,not available' ; Value $inddet2018 '01'='01:Crop production' '02'='02:Animal production' '03'='03:forestry and logging' '04'='04:fishing, hunting, and trapping' '05'='05:Support activities for Agriculture and forestry' '06'='06:Oil and gas extraction' '07'='07:Mining (except oil and gas)' '08'='08:Support activities for mining' '09'='09:Utilities Industries' '10'='10:Construction Industries' '11'='11:Food Manufacturing' '12'='12:Beverage and tobacco product manufacturing' '13'='13:textile mills' '14'='14:textile product mills' '15'='15:Apparel manufacturing' '16'='16:leather and allied product manufacturing' '17'='17:Wood product manufacturing' '18'='18:paper manufacturing' '19'='19:printing and related support activities' '20'='20:petroleum and coal products manufacturing' '21'='21:chemical manufacturing' '22'='22:plastics and rubber products manufacturing' '23'='23:non-metallic mineral product manufacturing' '24'='24:primary metal manufacturing' '25'='25:fabricated metal product manufacturing' '26'='26:machinery manufacturing' '27'='27:computer and electronic product manufacturing' '28'='28:electrical equipment, appliance, and component manufacturing' '29'='29:Transportation equipment manufacturing' '30'='30:furniture and related product manufacturing' '31'='31:miscellaneous manufacturing' '32'='32:Merchant wholesalers, durable goods' '33'='33:Merchant wholesalers, nondurable goods' '34'='34:non-specified wholesale trade' '35'='35:motor vehicle and parts dealers' '36'='36:furniture and home furnishings stores' '37'='37:electronics and appliance stores' '38'='38:Building material and garden equipment and supplies dealers' '39'='39:food and beverage stores' '40'='40:health and personal care stores' '41'='41:gasoline stations' '42'='42:clothing and clothing accessories stores' '43'='43:sporting goods, camera, hobby, book and music stores' '44'='44:general merchandise stores' '45'='45:miscellaneous store retailers' '46'='46:nonstore retailers and non-specified retail trade' '47'='47:Transportation (including support activities for transportation)' '48'='48:postal service, couriers, and messengers' '49'='49:Warehousing and storage' '50'='50:Publishing industries (except internet)' '51'='51:Motion picture and sound recording industries' '52'='52:broadcasting and telecommunications' '53'='53:Information services and data processing' '54'='54:Monetary authorities--Central Bank' '55'='55:Credit intermediation and related activities' '56'='56:Securities, commodity contracts, and other financial investments and related activities' '57'='57:Insurance carriers and related activities' '58'='58:Real Estate' '59'='59:Rental and Leasing services' '60'='60:Lessors of nonfinancial intangible assets (except copyrighted works)' '61'='61:Professional, Scientific, and Technical Services Industries' '62'='62:Management of Companies and Enterprises' '63'='63:Administrative and Support and Waste management and Remediation Services Industries' '64'='64:Education Services Industries' '65'='65:Ambulatory health care services' '66'='66:hospitals' '67'='67:Nursing and Residential Care Facilities' '68'='68:Social Assistance' '69'='69:performing arts, spectator sports, and related industries' '70'='70:Museums, historical sites, and similar institutions' '71'='71:Amusement, gambling, and recreation industries' '72'='72:Accommodation ' '73'='73:Food Services and Drinking places' '74'='74:Repair and Maintenance' '75'='75:Personal Services (barber shops, beauty salons, nail salons, laundry, funeral homes and cemeteries)' '76'='76:Religious, grantmaking, civic, labor, professional, and similar organizations' '77'='77:Private Households' '78'='78:Public Administration Industries' '79'='79:NIOSH NCHS military' '80'='80:NIOSH NCHS Other--Misc,not available' ; run; data temp; set pub2023.public2023; /*2018 CDC Census Codes*/; /*Management Occupations*/; If CensusOcc in ('0010', '0020', '0030') then occdet2018='01'/*Chief executives; general and operations managers; legislators*/; Else If CensusOcc in ('0040', '0051', '0052', '0060') then occdet2018='02'/*Advertising, marketing, promotions, public relations, and sales managers*/; Else If CensusOcc in ('0101', '0102', '0110', '0120', '0135', '0136', '0137', '0140', '0150', '0160') then occdet2018='03'/*Administrative services, compensation/benefits, human resources, training, production, purchasing, and transportion/distribution, and other operations managers*/; Else If CensusOcc in ('0205', '0220', '0230', '0300', '0310', '0325', '0335', '0340', '0350', '0360', '0400', '0410', '0420', '0425', '0426', '0440') then occdet2018='04'/*All other management occupations*/; /*Business and Financial Operations Occupations*/; Else If CensusOcc in ('0500', '0510', '0520', '0530', '0540', '0565', '0600', '0630', '0640', '0650', '0700', '0705', '0710', '0725', '0726', '0735', '0750') then occdet2018='05'/*Business operations specialists*/; Else If CensusOcc in ('0800', '0810', '0820', '0830', '0845', '0850', '0860', '0900', '0910', '0930', '0940', '0960') then occdet2018='06'/*Financial specialists*/; /*Computer and Mathematical Occupations*/; Else If CensusOcc in ('1005', '1006', '1007', '1010', '1021', '1022', '1031', '1032', '1050', '1065', '1105', '1106', '1108') then occdet2018='07'/*Computer specialists*/; Else If CensusOcc in ('1200', '1210', '1220', '1230', '1240') then occdet2018='08'/*Mathematical science occupations*/; /*Architecture and Engineering Occupations*/; Else If CensusOcc in ('1305', '1306', '1310') then occdet2018='09'/*Architects, surveyors, and cartographers*/; Else If CensusOcc in ('1320', '1330', '1340', '1350', '1360', '1400', '1410', '1420', '1430', '1440', '1450', '1460', '1500', '1510', '1520', '1530') then occdet2018='10'/*Engineers*/; Else If CensusOcc in ('1541', '1545', '1551', '1555', '1560') then occdet2018='11'/*Drafters, engineering, and mapping technicians*/; /*Life, Physical, and Social Science Occupations*/; Else If CensusOcc in ('1600', '1610', '1640', '1650', '1660') then occdet2018='12'/*Life scientists*/; Else If CensusOcc in ('1700', '1710', '1720', '1745', '1750', '1760') then occdet2018='13'/*Physical scientists*/; Else If CensusOcc in ('1800', '1815', '1821', '1822', '1825', '1830', '1840', '1860') then occdet2018='14'/*Social scientists and related workers*/; Else If CensusOcc in ('1900', '1910', '1920', '1935', '1940', '1950', '1970', '1980') then occdet2018='15'/*Life, physical, and social science technicians*/; /*Community and Social Services Occupations*/; Else If CensusOcc in ('2001', '2002', '2003', '2004', '2005', '2006', '2011', '2012', '2013', '2014', '2015', '2016', '2025') then occdet2018='16'/*Counselors, social workers, and other community and social service specialists*/; Else If CensusOcc in ('2040', '2050', '2060') then occdet2018='17'/*Religious workers*/; /*Legal Occupations*/; Else If CensusOcc in ('2100', '2105', '2110') then occdet2018='18'/*Lawyers, judges, and related workers*/; Else If CensusOcc in ('2145', '2170', '2180') then occdet2018='19'/*Legal support workers*/; /*Education, Training, and Library Occupations*/; Else If CensusOcc in ('2205') then occdet2018='20'/*Postsecondary teachers*/; Else If CensusOcc in ('2300', '2310', '2320', '2330') then occdet2018='21'/*Primary, secondary, and special education school teachers*/; Else If CensusOcc in ('2350', '2360') then occdet2018='22'/*Other teachers and instructors*/; Else If CensusOcc in ('2400', '2435', '2440') then occdet2018='23'/*Librarians, curators, and archivists*/; Else If CensusOcc in ('2545', '2555') then occdet2018='24'/*Other education, training, and library occupations*/; /*Arts, Design, Entertainment, Sports, and Media Occupations*/; Else If CensusOcc in ('2600', '2631', '2632', '2633', '2634', '2635', '2636', '2640') then occdet2018='25'/*Art and design workers*/; Else If CensusOcc in ('2700', '2710', '2721', '2722', '2723', '2740', '2751', '2752', '2755', '2770') then occdet2018='26'/*Entertainers and performers, sports and related workers*/; Else If CensusOcc in ('2805', '2810', '2825', '2830', '2840', '2850', '2861', '2862', '2865') then occdet2018='27'/*Media and communication workers*/; Else If CensusOcc in ('2905', '2910', '2920', '2970') then occdet2018='28'/*Media and communication equipment workers*/; /*Healthcare Practitioners and Technical Occupations*/; Else If CensusOcc in ('3000', '3010', '3030', '3040', '3050', '3065', '3070', '3090', '3100', '3110', '3120', '3140', '3150', '3160', '3200', '3210', '3220', '3230', '3235', '3245', '3250', '3255', '3256', '3257', '3258', '3261', '3270') then occdet2018='29'/*Health diagnosing and treating practitioners*/; Else If CensusOcc in ('3300', '3310', '3321', '3322', '3323', '3324', '3330', '3401', '3402', '3421', '3422', '3423', '3424', '3430', '3500', '3515', '3520', '3545') then occdet2018='30'/*Health technologists and technicians*/; Else If CensusOcc in ('3550') then occdet2018='31'/*Other healthcare practitioners and technical occupations*/; /*Healthcare Support Occupations*/; Else If CensusOcc in ('3601', '3602', '3603', '3605') then occdet2018='32'/*Nursing, psychiatric, and home health aides*/; Else If CensusOcc in ('3610', '3620') then occdet2018='33'/*Occupational and physical therapist assistants and aides*/; Else If CensusOcc in ('3630', '3640', '3645', '3646', '3647', '3648', '3649', '3655') then occdet2018='34'/*Other healthcare support occupations*/; /*Protective Service Occupations*/; Else If CensusOcc in ('3700', '3710', '3720', '3725', '3735') then occdet2018='35'/*First-line supervisors/managers, protective service workers*/; Else If CensusOcc in ('3740', '3750') then occdet2018='36'/*Firefighting and prevention workers*/; Else If CensusOcc in ('3801', '3802', '3820', '3830', '3840', '3870') then occdet2018='37'/*Law enforcement workers*/; Else If CensusOcc in ('3900', '3910', '3930', '3940', '3945', '3946', '3960') then occdet2018='38'/*Other protective service workers*/; /*Food Preparation and Serving Related Occupations*/; Else If CensusOcc in ('4000', '4010') then occdet2018='39'/*Supervisors, food preparation, and serving workers*/; Else If CensusOcc in ('4020', '4030') then occdet2018='40'/*Cooks and food preparation workers*/; Else If CensusOcc in ('4040', '4055', '4110', '4120') then occdet2018='41'/*Food and beverage serving working*/; Else If CensusOcc in ('4130', '4140', '4150', '4160') then occdet2018='42'/*Other food preparation and serving related workers*/; /*Building and Grounds Cleaning and Maintenance Occupations*/; Else If CensusOcc in ('4200', '4210') then occdet2018='43'/*Supervisors, building and grounds cleaning and maintenance workers*/; Else If CensusOcc in ('4220', '4230', '4240') then occdet2018='44'/*Building cleaning and pest control workers*/; Else If CensusOcc in ('4251', '4252', '4255') then occdet2018='45'/*Grounds maintenance workers*/; /*Personal Care and Service Occupations*/; Else If CensusOcc in ('4330') then occdet2018='46'/*Supervisors, personal care and service workers*/; Else If CensusOcc in ('4340', '4350') then occdet2018='47'/*Animal care and service workers*/; Else If CensusOcc in ('4400', '4420', '4435') then occdet2018='48'/*Entertainment attendants and related workers*/; Else If CensusOcc in ('4461', '4465') then occdet2018='49'/*Funeral service workers*/; Else If CensusOcc in ('4500', '4510', '4521', '4522', '4525') then occdet2018='50'/*Personal appearance workers*/; Else If CensusOcc in ('4530', '4540') then occdet2018='51'/*Transportation, tourism, and lodging attendants*/; Else If CensusOcc in ('4600', '4621', '4622', '4640', '4655') then occdet2018='52'/*Other personal care and service workers*/; /*Sales and Related Occupations*/; Else If CensusOcc in ('4700', '4710') then occdet2018='53'/*Supervisors, sales workers*/; Else If CensusOcc in ('4720', '4740', '4750', '4760') then occdet2018='54'/*Retail sales workers*/; Else If CensusOcc in ('4800', '4810', '4820', '4830', '4840') then occdet2018='55'/*Sales representatives, services*/; Else If CensusOcc in ('4850') then occdet2018='56'/*Sales representatives, wholesale and manufacturing*/; Else If CensusOcc in ('4900', '4920', '4930', '4940', '4950', '4965') then occdet2018='57'/*Other sales and related workers*/; /*Office and Administrative Support Occupations*/; Else If CensusOcc in ('5000') then occdet2018='58'/*Supervisors, office and administrative support workers*/; Else If CensusOcc in ('5010', '5020', '5040') then occdet2018='59'/*Communications equipment operators*/; Else If CensusOcc in ('5100', '5110', '5120', '5130', '5140', '5150', '5160', '5165') then occdet2018='60'/*Financial clerks*/; Else If CensusOcc in ('5200', '5210', '5220', '5230', '5240', '5250', '5260', '5300', '5310', '5320', '5330', '5340', '5350', '5360', '5400', '5410', '5420') then occdet2018='61'/*Information and record clerks*/; Else If CensusOcc in ('5500', '5510', '5521', '5522', '5530', '5540', '5550', '5560', '5600', '5610', '5630') then occdet2018='62'/*Material recording, scheduling, dispatching, and distributing workers*/; Else If CensusOcc in ('5710', '5720', '5730', '5740') then occdet2018='63'/*Secretaries and administrative assistants*/; Else If CensusOcc in ('5810', '5820', '5830', '5840', '5850', '5860', '5900', '5910', '5920', '5940') then occdet2018='64'/*Other office and administrative support workers*/; /*Farming, Fishing, and Forestry Occupations*/; Else If CensusOcc in ('6005') then occdet2018='65'/*Supervisors, farming, fishing, and forestry workers*/; Else If CensusOcc in ('6010', '6020', '6040', '6050') then occdet2018='66'/*Agricultural workers*/; Else If CensusOcc in ('6115') then occdet2018='67'/*Fishing and hunting workers*/; Else If CensusOcc in ('6120', '6130') then occdet2018='68'/*Forest, conservation, and logging workers*/; /*Construction and Extraction Occupations*/; Else If CensusOcc in ('6200') then occdet2018='69'/*Supervisors, construction and extraction workers*/; Else If CensusOcc in ('6210', '6220', '6230', '6240', '6250', '6260', '6305', '6330', '6355', '6360', '6400', '6410', '6441', '6442', '6460', '6500', '6515', '6520', '6530', '6540') then occdet2018='70'/*Construction trades workers*/; Else If CensusOcc in ('6600') then occdet2018='71'/*Helpers, construction trades*/; Else If CensusOcc in ('6660', '6700', '6710', '6720', '6730', '6740', '6750', '6765') then occdet2018='72'/*Other construction and related workers*/; Else If CensusOcc in ('6800', '6821', '6825', '6835', '6850', '6920', '6950') then occdet2018='73'/*Extraction workers*/; /*Installation, Maintenance, and Repair Occupations*/; Else If CensusOcc in ('7000') then occdet2018='74'/*Supervisors of installation, maintenance, and repair workers*/; Else If CensusOcc in ('7010', '7020', '7030', '7040', '7050', '7100', '7110', '7120', '7130') then occdet2018='75'/*Electrical and electronic equipment mechanics, installers, and repairers*/; Else If CensusOcc in ('7140', '7150', '7160', '7200', '7210', '7220', '7240', '7260') then occdet2018='76'/*Vehicle and mobile equipment mechanics, installers, and repairers*/; Else If CensusOcc in ('7300', '7315', '7320', '7330', '7340', '7350', '7360', '7410', '7420', '7430', '7440', '7510', '7520', '7540', '7550', '7560', '7610', '7640') then occdet2018='77'/*Other installation, maintenance, and repair occupations*/; /*Production Occupations*/; Else If CensusOcc in ('7700') then occdet2018='78'/*Supervisors, production workers*/; Else If CensusOcc in ('7710', '7720', '7730', '7740', '7750') then occdet2018='79'/*Assemblers and fabricators*/; Else If CensusOcc in ('7800', '7810', '7830', '7840', '7850', '7855') then occdet2018='80'/*Food processing workers*/; Else If CensusOcc in ('7905', '7925', '7950', '8000', '8025', '8030', '8040', '8060', '8100', '8130', '8140', '8225') then occdet2018='81'/*Metal workers and plastic workers*/; Else If CensusOcc in ('8250', '8255', '8256') then occdet2018='82'/*Printing workers*/; Else If CensusOcc in ('8300', '8310', '8320', '8335', '8350', '8365', '8450', '8465') then occdet2018='83'/*Textile, apparel, and furnishings workers*/; Else If CensusOcc in ('8500', '8510', '8530', '8540', '8555') then occdet2018='84'/*Woodworkers*/; Else If CensusOcc in ('8600', '8610', '8620', '8630') then occdet2018='85'/*Plant and system operators*/; Else If CensusOcc in ('8640', '8650', '8710', '8720', '8730', '8740', '8750', '8760', '8800', '8810', '8830', '8850', '8910', '8920', '8930', '8940', '8950', '8865', '8990') then occdet2018='86'/*Other production occupations*/; /*Transportation and Material Moving Occupations*/; Else If CensusOcc in ('9005') then occdet2018='87'/*Supervisors, transportation and material moving workers*/; Else If CensusOcc in ('9030', '9040', '9050') then occdet2018='88'/*Air transportation workers*/; Else If CensusOcc in ('9110', '9121', '9122', '9130', '9141', '9142', '9150') then occdet2018='89'/*Motor vehicle operators*/; Else If CensusOcc in ('9210', '9240', '9265') then occdet2018='90'/*Rail transportation workers*/; Else If CensusOcc in ('9300', '9310', '9330') then occdet2018='91'/*Water transportation workers*/; Else If CensusOcc in ('9350', '9365', '9410', '9415', '9430') then occdet2018='92'/*Other transportation workers*/; Else If CensusOcc in ('9510', '9570', '9600', '9610', '9620', '9630', '9640', '9645', '9650', '9720', '9760') then occdet2018='93'/*Material moving workers*/; /*OTHER*/; Else If CensusOcc in ('9830', '9840', '9850') then occdet2018='94'/*NIOSH NCHS military*/; Else If CensusOcc in ('9010') then occdet2018='95'/*NIOSH NCHS Housewife*/; Else If CensusOcc in ('9020', '9070', '9060', '9100', '9900') then occdet2018='96'/*NIOSH NCHS Other--Misc*/; else if CensusOcc in ('') then occdet="";/*no codes*/ /*2018 CDC Census Codes*/; /*Agriculture Industries*/; If CensusInd in ('0170') then IndDet2018='01'/*Crop production*/; Else If CensusInd in ('0180') then IndDet2018='02'/*Animal production and aquaculture*/; Else If CensusInd in ('0190', '0270') then IndDet2018='03'/*Forestry and logging*/; Else If CensusInd in ('0280') then IndDet2018='04'/*Fishing, hunting, and trapping*/; Else If CensusInd in ('0290') then IndDet2018='05'/*Support activities for agriculture and forestry*/; /*Mining Industries*/; Else If CensusInd in ('0370') then IndDet2018='06'/*Oil and gas extraction*/; Else If CensusInd in ('0380', '0390', '0470', '0480') then IndDet2018='07'/*Mining (except oil and gas)*/; Else If CensusInd in ('0490') then IndDet2018='08'/*Support activities for mining*/; Else If CensusInd in ('0570', '0580', '0590', '0670', '0680', '0690') then IndDet2018='09'/*Utilities Industries*/; Else If CensusInd in ('0770') then IndDet2018='10'/*Construction Industries*/; /*Manufacturing Industries*/; Else If CensusInd in ('1070', '1080', '1090', '1170', '1180', '1190', '1270', '1280', '1290') then IndDet2018='11'/*Food manufacturing*/; Else If CensusInd in ('1370', '1390') then IndDet2018='12'/*Beverage and tobacco product manufacturing*/; Else If CensusInd in ('1470', '1480', '1490') then IndDet2018='13'/*Textile mills*/; Else If CensusInd in ('1570', '1590', '1670') then IndDet2018='14'/*Textile product mills*/; Else If CensusInd in ('1691', '1770') then IndDet2018='15'/*Apparel manufacturing*/; Else If CensusInd in ('1790') then IndDet2018='16'/*Leather and allied product manufacturing*/; Else If CensusInd in ('3770', '3780', '3790', '3875') then IndDet2018='17'/*Wood product manufacturing*/; Else If CensusInd in ('1870', '1880', '1890') then IndDet2018='18'/*Paper manufacturing*/; Else If CensusInd in ('1990') then IndDet2018='19'/*Printing and related support activities*/; Else If CensusInd in ('2070', '2090') then IndDet2018='20'/*Petroleum and coal products manufacturing*/; Else If CensusInd in ('2170', '2180', '2190', '2270', '2280', '2290') then IndDet2018='21'/*Chemical manufacturing*/; Else If CensusInd in ('2370', '2380', '2390') then IndDet2018='22'/*Plastics and rubber products manufacturing*/; Else If CensusInd in ('2470', '2480', '2490', '2570', '2590') then IndDet2018='23'/*Nonmetallic mineral product manufacturing*/; Else If CensusInd in ('2670', '2680', '2690', '2770', '2780', '2990') then IndDet2018='24'/*Primary metal manufacturing*/; Else If CensusInd in ('2790', '2870', '2880', '2890', '2970', '2980') then IndDet2018='25'/*Fabricated metal product manufacturing*/; Else If CensusInd in ('3070', '3080', '3095', '3170', '3180', '3291') then IndDet2018='26'/*Machinery manufacturing*/; Else If CensusInd in ('3365', '3370', '3380', '3390') then IndDet2018='27'/*Computer and electronic product manufacturing*/; Else If CensusInd in ('3470', '3490') then IndDet2018='28'/*Electrical equipment, appliance, and component manufacturing*/; Else If CensusInd in ('3570', '3580', '3590', '3670', '3680', '3690') then IndDet2018='29'/*Transportation equipment manufacturing*/; Else If CensusInd in ('3895') then IndDet2018='30'/*Furniture and related product manufacturing*/; Else If CensusInd in ('3960', '3970', '3980', '3990') then IndDet2018='31'/*Miscellaneous manufacturing*/; /*Wholesale Trade Industries*/; Else If CensusInd in ('4070', '4080', '4090', '4170', '4180', '4195', '4265', '4270', '4280', '4290') then IndDet2018='32'/*Merchant wholesalers, durable goods*/; Else If CensusInd in ('4370', '4380', '4390', '4470', '4480', '4490', '4560', '4570', '4580', '4585') then IndDet2018='33'/*Merchant wholesalers, nondurable goods*/; Else If CensusInd in ('4590') then IndDet2018='34'/*Non-specified wholesale trade*/; /*Retail Trade Industries*/; Else If CensusInd in ('4670', '4680', '4690') then IndDet2018='35'/*Motor vehicle and parts dealers*/; Else If CensusInd in ('4770') then IndDet2018='36'/*Furniture and home furnishings stores*/; Else If CensusInd in ('4780', '4795') then IndDet2018='37'/*Electronics and appliance stores*/; Else If CensusInd in ('4870', '4880', '4890') then IndDet2018='38'/*Building material and garden equipment and supplies dealers*/; Else If CensusInd in ('4971', '4972', '4980', '4990') then IndDet2018='39'/*Food and beverage stores*/; Else If CensusInd in ('5070', '5080') then IndDet2018='40'/*Health and personal care stores*/; Else If CensusInd in ('5090') then IndDet2018='41'/*Gasoline stations*/; Else If CensusInd in ('5170', '5180', '5190') then IndDet2018='42'/*Clothing, shoe, jewelry, luggage, and leather goods stores*/; Else If CensusInd in ('5275', '5280', '5295', '5370') then IndDet2018='43'/*Sporting goods, camera, hobby, book and music stores*/; Else If CensusInd in ('5381', '5391') then IndDet2018='44'/*General merchandise stores*/; Else If CensusInd in ('5470', '5480', '5490', '5570', '5580') then IndDet2018='45'/*Miscellaneous store retailers*/; Else If CensusInd in ('5593', '5670', '5680', '5690', '5790') then IndDet2018='46'/*Nonstore retailers and non-specified retail trade*/; /*Transportation and Warehousing Industries*/; Else If CensusInd in ('6070', '6080', '6090', '6170', '6180', '6190', '6270', '6280', '6290') then IndDet2018='47'/*Transportation (including support activities for transportation)*/; Else If CensusInd in ('6370', '6380') then IndDet2018='48'/*Postal service, couriers, and messengers*/; Else If CensusInd in ('6390') then IndDet2018='49'/*Warehousing and storage*/; /*Information Industries*/; Else If CensusInd in ('6470', '6480', '6490') then IndDet2018='50'/*Newspaper, periodical, book, and software publishing industries*/; Else If CensusInd in ('6570', '6590') then IndDet2018='51'/*Motion picture, video, and sound recording industries*/; Else If CensusInd in ('6670', '6680', '6690') then IndDet2018='52'/*Broadcasting and telecommunications*/; Else If CensusInd in ('6672', '6695', '6770', '6780') then IndDet2018='53'/*Libraries and archives, internet publishing, web search portals, data processing and hosting services, and other information services*/; /*Finance and Insurance Industries*/; Else If CensusInd in ('6870') then IndDet2018='54'/*Monetary authorities -- central bank*/; Else If CensusInd in ('6880', '6890') then IndDet2018='55'/*Credit intermediation and related activities*/; Else If CensusInd in ('6970') then IndDet2018='56'/*Securities, commodity contracts, and other financial investments and related activities*/; Else If CensusInd in ('6991', '6992') then IndDet2018='57'/*Insurance carriers and related activities*/; /*Real Estate and Rental and Leasing Industries*/; Else If CensusInd in ('7071', '7072') then IndDet2018='58'/*Real estate*/; Else If CensusInd in ('7080', '7181') then IndDet2018='59'/*Automotive and other consumer goods rental and leasing services*/; Else If CensusInd in ('7190') then IndDet2018='60'/*Commercial, industrial, and other intangible assets (except copyrighted works)*/; Else If CensusInd in ('7270', '7280', '7290', '7370', '7380', '7390', '7460', '7470', '7480', '7490') then IndDet2018='61'/*Professional, Scientific, and Technical Services Industries*/; Else If CensusInd in ('7570') then IndDet2018='62'/*Management of Companies and Enterprises Industries*/; Else If CensusInd in ('7580', '7590', '7670', '7680', '7690', '7770', '7780', '7790') then IndDet2018='63'/*Administrative and Support and Waste Management and Remediation Services Industries*/; Else If CensusInd in ('7860', '7870', '7880 7890') then IndDet2018='64'/*Education Services Industries*/; /*Health Care and Social Assistance Industries*/; Else If CensusInd in ('7970', '7980', '7990', '8070', '8080', '8090', '8170', '8180') then IndDet2018='65'/*Ambulatory health care services*/; Else If CensusInd in ('8191', '8192') then IndDet2018='66'/*Hospitals*/; Else If CensusInd in ('8270', '8290') then IndDet2018='67'/*Nursing and residential care facilities*/; Else If CensusInd in ('8370', '8380', '8390', '8470') then IndDet2018='68'/*Social assistance*/; /*Arts, Entertainment, and Recreation Industries*/; Else If CensusInd in ('8561', '8562', '8563', '8564') then IndDet2018='69'/*Performing arts, spectator sports, promoters, agents, artists, writers and related industries*/; Else If CensusInd in ('8570') then IndDet2018='70'/*Museums, historical sites, and similar institutions*/; Else If CensusInd in ('8580', '8590') then IndDet2018='71'/*Amusement, gambling, and recreation industries*/; /*Accommodation and Food Services Industries*/; Else If CensusInd in ('8660', '8670') then IndDet2018='72'/*Accommodation*/; Else If CensusInd in ('8680', '8690') then IndDet2018='73'/*Food services and drinking places*/; /*Other Services (except Public Administration) Industries*/; Else If CensusInd in ('8770', '8780', '8790', '8870', '8891') then IndDet2018='74'/*Repair and maintenance*/; Else If CensusInd in ('8970', '8980', '8990', '9070', '9080', '9090') then IndDet2018='75'/*Personal services (barber shops, beauty salons, nail salons, laundry, funeral homes and cemeteries)*/; Else If CensusInd in ('9160', '9170', '9180', '9190') then IndDet2018='76'/*Religious, grantmaking, civic, labor, professional, and similar organizations*/; Else If CensusInd in ('9290') then IndDet2018='77'/*Private households*/; Else If CensusInd in ('9370', '9380', '9390', '9470', '9480', '9490', '9570', '9590') then IndDet2018='78'/*Public Administration Industries*/; /*other*/; Else If CensusInd in ( '9670', '9680', '9690', '9770', '9780', '9790', '9870') then IndDet2018='79'/*NIOSH NCHS military*/; Else If CensusInd in ('9890', '9880', '9990') then IndDet2018='80'/*NIOSH NCHS Other--Misc*/; else if CensusInd in ('') then indet2018="";/*no codes*/ /*where ager12 NOT IN ("01", "02", "03", "12");*/ /*to exclude those <15 (no IND/OCC codes for these in any case) or with no age indicated*/ format occdet2018 $occdet2018. inddet2018 $inddet2018.; run; title "CHECK:occ codes not categorized into detailed categories: NVSS Death Certificate data year &year"; proc freq data=temp; tables CensusOcc; where occdet2018 in ('') and censusocc ne ""; run; title "CHECK:ind codes not categorized into detailed categories: NVSS Death Certificate data year &year"; proc freq data=temp; tables CensusInd; where inddet2018 in ('') and censusind ne ""; run; title "NHIS detailed Occupation Categories: Census 2012: NVSS Death Certificate data year &year"; proc freq data =temp; tables occdet2018/nopercent nocum; run; title "NHIS detailed Industry Categories: Census 2012: NVSS Death Certificate data year &year"; proc freq data =temp; tables inddet2018/nopercent nocum; run; title;