/*------------------------------------------------------------------------------------*/ /*by Jean Roth Fri Oct 24 10:38:16 EDT 2003 Please report errors to jroth@nber.org NOTE: This program is distributed under the GNU GPL. See end of this file and http://www.gnu.org/licenses/ for details. Six steps: (1) Uncomment the 'options compress=yes' statement if desired to save space (2) Uncomment 'LENGTH' statement if desired to save space (3) Specify output directories in 'libname' statements (4) Specify the input file name/location in the 'filename' statement (5) On a PC, use backslashes as in C:\ (6) Read in the compressed or uncompressed raw data file. See the 'filename' and 'INFILE' statements. Other changes may be user and platform specific. NOTE: A value of -1 (or -1/# of decimals) usually indicates 'Not in Universe' */ /*------------------------------------------------------------------------------------*/ *options obs=100; *options compress=yes; *Choose compress=yes to save space ; *Choose compress=no if converting to another package using transfer software ; *options pagesize=59 linesize=72; /*------------------------------------------------------------------------------------*/ /* A -1 means Blank; Not in Universe; or In Universe, Met No Conditions; Sometimes, -1 is present but not described in the codebook. If the variable has a decimal, it will be resolved as -1/# of decimals These are usually 'Not in Universe' values also. */ /*------------------------------------------------------------------------------------*/ libname library './'; *See the codebook for more detail; PROC FORMAT cntlout=library.frw0104; /* The PROC FORMAT statement will store the formats in a sas data set called frw0104 To use the stored formats in a subsequent program, include something like this: proc format cntlin=library.frw0104; PROC freq; tables PULAYCK1 ; format PULAYCK1 PULAYCKa.; For more information, consult the SAS Procudures Guide section of PROC FORMAT */ ; VALUE NEIO1COW (default=32) 1 = "GOVERNMENT - FEDERAL" 2 = "GOVERNMENT - STATE" 3 = "GOVERNMENT - LOCAL" 4 = "PRIVATE, FOR PROFIT" 5 = "PRIVATE, NONPROFIT" 6 = "SELF-EMPLOYED, INCORPORATED" 7 = "SELF-EMPLOYED, UNINCORPORATED" 8 = "WITHOUT PAY" ; VALUE NEIO2COW (default=32) 1 = "GOVERNMENT - FEDERAL" 2 = "GOVERNMENT - STATE" 3 = "GOVERNMENT - LOCAL" 4 = "PRIVATE, FOR PROFIT" 5 = "PRIVATE, NONPROFIT" 6 = "SELF-EMPLOYED, INCORPORATED" 7 = "SELF-EMPLOYED, UNINCORPORATED" 8 = "WITHOUT PAY" ; VALUE NRAGNA (default=32) 1 = "AGRICULTURAL 0170-0290" 2 = "NON-AGRICULTURAL 0370-9890" ; VALUE NRCOW1L (default=32) 1 = "FEDERAL GOVT" 2 = "STATE GOVT" 3 = "LOCAL GOVT" 4 = "PRIVATE (INCL. SELF-EMPLOYED INCORP.)" 5 = "SELF-EMPLOYED, UNINCORP." 6 = "WITHOUT PAY" ; VALUE NRCOW2L (default=32) 1 = "FEDERAL GOVT" 2 = "STATE GOVT" 3 = "LOCAL GOVT" 4 = "PRIVATE (INCL. SELF-EMPLOYED INCORP.)" 5 = "SELF-EMPLOYED, UNINCORP." 6 = "WITHOUT PAY" ; VALUE NRCOWPG (default=32) 1 = "PRIVATE" 2 = "GOVERNMENT" ; VALUE NRDTCOWA (default=32) 1 = "AGRI., WAGE & SALARY, PRIVATE" 2 = "AGRI., WAGE & SALARY, GOVERNMENT" 3 = "AGRI., SELF-EMPLOYED" 4 = "AGRI., UNPAID" 5 = "NONAG, WS, PRIVATE, PRIVATE HHLDS" 6 = "NONAG, WS, PRIVATE, OTHER PRIVATE" 7 = "NONAG, WS, GOVT, FEDERAL" 8 = "NONAG, WS, GOVT, STATE" 9 = "NONAG, WS, GOVT, LOCAL" 10 = "NONAG, SELF-EMPLOYED" 11 = "NONAG, UNPAID" ; VALUE NRDTCOWB (default=32) 1 = "AGRI., WAGE & SALARY, PRIVATE" 2 = "AGRI., WAGE & SALARY, GOVERNMENT" 3 = "AGRI., SELF-EMPLOYED" 4 = "AGRI., UNPAID" 5 = "NONAG, WS, PRIVATE, PRIVATE HHLDS" 6 = "NONAG, WS, PRIVATE, OTHER PRIVATE" 7 = "NONAG, WS, GOVT, FEDERAL" 8 = "NONAG, WS, GOVT, STATE" 9 = "NONAG, WS, GOVT, LOCAL" 10 = "NONAG, SELF-EMPLOYED" 11 = "NONAG, UNPAID" ; VALUE NRDTINDA (default=32) 1 = "Agriculture 0170-0180, 0290" 2 = "Forestry, logging, fishing, hunting, a" 3 = "Mining 0370-0490" 4 = "Construction 0770" 5 = "Nonmetallic mineral product manufactur" 6 = "Primary metals and fabricated metal pr" 7 = "Machinery manufacturing 3070-3290" 8 = "Computer and electronic product manufa" 9 = "Electrical equipment, appliance manufa" 10 = "Transportation equipment manufacturing" 11 = "Wood products 3770-3870" 12 = "Furniture and fixtures manufacturing 3" 13 = "Miscellaneous and not specified manufa" 14 = "Food manufacturing 1070-1290" 15 = "Beverage and tobacco products 1370-139" 16 = "Textile, apparel, and leather manufact" 17 = "Paper and printing 1870-1990" 18 = "Petroleum and coal products manufactur" 19 = "Chemical manufacturing 2170-2290" 20 = "Plastics and rubber products 2370-2390" 21 = "Wholesale trade 4070-4590" 22 = "Retail trade 4670-5790" 23 = "Transportation and warehousing 6070-63" 24 = "Utilities 0570-0690" 25 = "Publishing industries (except internet" 26 = "Motion picture and sound recording ind" 27 = "Broadcasting (except internet) 6670" 28 = "Internet publishing and broadcasting 6" 29 = "Telecommunications 6680-6690" 30 = "Internet service providers and data pr" 31 = "Other information services 6770-6780" 32 = "Finance 6870-6970" 33 = "Insurance 6990" 34 = "Real estate 7070" 35 = "Rental and leasing services 7080-7190" 36 = "Professional and technical services 72" 37 = "Management of companies and enterprise" 38 = "Administrative and support services 75" 39 = "Waste management and remediation servi" 40 = "Educational services 7860-7890" 41 = "Hospitals 8190" 42 = "Health care services, except hospitals" 43 = "Social assistance 8370-8470" 44 = "Arts, entertainment, and recreation 85" 45 = "Accommodation 8660-8670" 46 = "Food services and drinking places 8680" 47 = "Repair and maintenance 8770-8890" 48 = "Personal and laundry services 8970-909" 49 = "Membership associations and organizati" 50 = "Private households 9290" 51 = "Public administration 9370-9590" 52 = "Armed forces 9890" ; VALUE NRDTINDB (default=32) 1 = "Agriculture" 2 = "Forestry, logging, fishing, hunting, a" 3 = "Mining" 4 = "Construction" 5 = "Nonmetallic mineral product manufactur" 6 = "Primary metals and fabricated metal pr" 7 = "Machinery manufacturing" 8 = "Computer and electronic product manufa" 9 = "Electrical equipment, appliance manufa" 10 = "Transportation equipment manufacturing" 11 = "Wood products" 12 = "Furniture and fixtures manufacturing" 13 = "Miscellaneous and not specified manufa" 14 = "Food manufacturing" 15 = "Beverage and tobacco products" 16 = "Textile, apparel, and leather manufact" 17 = "Paper and printing" 18 = "Petroleum and coal products manufactur" 19 = "Chemical manufacturing" 20 = "Plastics and rubber products" 21 = "Wholesale trade" 22 = "Retail trade" 23 = "Transportation and warehousing" 24 = "Utilities" 25 = "Publishing industries (except internet" 26 = "Motion picture and sound recording ind" 27 = "Broadcasting (except internet)" 28 = "Internet publishing and broadcasting" 29 = "Telecommunications" 30 = "Internet service providers and data pr" 31 = "Other information services" 32 = "Finance" 33 = "Insurance" 34 = "Real estate" 35 = "Rental and leasing services" 36 = "Professional and technical services" 37 = "Management of companies and enterprise" 38 = "Administrative and support services" 39 = "Waste management and remediation servi" 40 = "Educational services" 41 = "Hospitals" 42 = "Health care services, except hospitals" 43 = "Social assistance" 44 = "Arts, entertainment, and recreation" 45 = "Accommodation" 46 = "Food services and drinking places" 47 = "Repair and maintenance" 48 = "Personal and laundry services" 49 = "Membership associations and organizati" 50 = "Private households" 51 = "Public administration" 52 = "Armed forces" ; VALUE NRDTOCCA (default=32) 1 = "Management occupations 0010-0430" 2 = "Business and financial operations occu" 3 = "Computer and mathematical science occu" 4 = "Architecture and engineering occupatio" 5 = "Life, physical, and social science occ" 6 = "Community and social service occupatio" 7 = "Legal occupations 2100-2150" 8 = "Education, training, and library occup" 9 = "Arts, design, entertainment, sports, a" 10 = "Healthcare practitioner and technical " 11 = "Healthcare support occupations 3600-36" 12 = "Protective service occupations 3700-39" 13 = "Food preparation and serving related o" 14 = "Building and grounds cleaning and main" 15 = "Personal care and service occupations " 16 = "Sales and related occupations 4700-496" 17 = "Office and administrative support occu" 18 = "Farming, fishing, and forestry occupat" 19 = "Construction and extraction occupation" 20 = "Installation, maintenance, and repair " 21 = "Production occupations 7700-8960" 22 = "Transportation and material moving occ" 23 = "Armed Forces 9840" ; VALUE NRDTOCCB (default=32) 1 = "Management occupations" 2 = "Business and financial operations occu" 3 = "Computer and mathematical science occu" 4 = "Architecture and engineering occupatio" 5 = "Life, physical, and social science occ" 6 = "Community and social service occupatio" 7 = "Legal occupations" 8 = "Education, training, and library occup" 9 = "Arts, design, entertainment, sports, a" 10 = "Healthcare practitioner and technical " 11 = "Healthcare support occupations" 12 = "Protective service occupations" 13 = "Food preparation and serving related o" 14 = "Building and grounds cleaning and main" 15 = "Personal care and service occupations" 16 = "Sales and related occupations" 17 = "Office and administrative support occu" 18 = "Farming, fishing, and forestry occupat" 19 = "Construction and extraction occupation" 20 = "Installation, maintenance, and repair " 21 = "Production occupations" 22 = "Transportation and material moving occ" 23 = "Armed Forces" ; VALUE NRMJINDA (default=32) 1 = "Agriculture, forestry, fishing, and hu" 2 = "Mining 0370-0490" 3 = "Construction 0770" 4 = "Manufacturing 1070-3990" 5 = "Wholesale and retail trade 4070-5790" 6 = "Transportation and utilities 6070-6390" 7 = "Information 6470-6780" 8 = "Financial activities 6870-7190" 9 = "Professional and business services 727" 10 = "Educational and health services 7860-8" 11 = "Leisure and hospitality 8560-8690" 12 = "Other services 8770-9290" 13 = "Public administration 9370-9590" 14 = "Armed Forces 9890" ; VALUE NRMJINDB (default=32) 1 = "Agriculture, forestry, fishing, and hu" 2 = "Mining" 3 = "Construction" 4 = "Manufacturing" 5 = "Wholesale and retail trade" 6 = "Transportation and utilities" 7 = "Information" 8 = "Financial activities" 9 = "Professional and business services" 10 = "Educational and health services" 11 = "Leisure and hospitality" 12 = "Other services" 13 = "Public administration" 14 = "Armed Forces" ; VALUE NRMJOCCA (default=32) 1 = "Management, business, and financial oc" 2 = "Professional and related occupations 1" 3 = "Service occupations 3600-4650" 4 = "Sales and related occupations 4700-496" 5 = "Office and administrative support occu" 6 = "Farming, fishing, and forestry occupat" 7 = "Construction and extraction occupation" 8 = "Installation, maintenance, and repair " 9 = "Production occupations 7700-8960" 10 = "Transportation and material moving occ" 11 = "Armed Forces 9840" ; VALUE NRMJOCCB (default=32) 1 = "Management, business, and financial oc" 2 = "Professional and related occupations" 3 = "Service occupations" 4 = "Sales and related occupations" 5 = "Office and administrative support occu" 6 = "Farming, fishing, and forestry occupat" 7 = "Construction and extraction occupation" 8 = "Installation, maintenance, and repair " 9 = "Production occupations" 10 = "Transportation and material moving occ" 11 = "Armed Forces" ; VALUE NRMJOCGR (default=32) 1 = "Management, professional, and related " 2 = "Service occupations" 3 = "Sales and office occupations" 4 = "Farming, fishing, and forestry occupat" 5 = "Construction, and maintenance occupati" 6 = "Production, transportation, and materi" 7 = "Armed Forces" ; VALUE NRSJMJ (default=32) 1 = "SINGLE JOBHOLDER" 2 = "MULTIPLE JOBHOLDER" ; VALUE NEERNCOV (default=32) 1 = "YES" 2 = "NO" ; VALUE NEERNLAB (default=32) 1 = "YES" 2 = "NO" ; filename raw pipe "unzip -p /homes/data/cps-basic/rw01.zip rw0104.dat "; * To read in uncompressed file, uncomment INFILE & comment filename & infile lines; * On a PC, you may need to change the direction of the slashes as in C:\; *INFILE '/homes/data/cps-basic/rw0104.dat' LRECL=1300 PAD END=EOF; data library.rw0104; missing A; infile raw lrecl = 1300 missover ; /*-------------------------------------------------------------------------------------*/ /* The following changes in variable names have been made, if necessary: '$' to 'd'; '-' to '_'; '%' to 'p'; ($ = unedited data; - = edited data; % = allocated data) Note: Variable names in SAS are not case-sensitive */ /*-------------------------------------------------------------------------------------*/ *LENGTH QSTNUM 4 HRYEAR4 4 NEIO1ICD 4 NEIO2ICD 4 NTIO1OCD 4 NTIO2OCD 4 NWCMPWGT 8 NWORWGT 8 NWSSWGT 8 DEFAULT=3; INPUT @1 QSTNUM 5. @6 HRMONTH 2. @8 HRYEAR4 4. @12 OCCURNUM 2. @14 NEIO1ICD 4. @18 NEIO1COW 2. @20 NEIO2COW 2. @22 NEIO2ICD 4. @28 NRAGNA 2. @30 NRCOW1 2. @32 NRCOW2 2. @34 NRCOWPG 2. @36 NRDTCOW1 2. @38 NRDTCOW2 2. @40 NRDTIND1 2. @42 NRDTIND2 2. @44 NRDTOCC1 2. @46 NRDTOCC2 2. @48 NREMP 2. @50 NRMJIND1 2. @52 NRMJIND2 2. @54 NRMJOCC1 2. @56 NRMJOCC2 2. @58 NRMJOCGR 2. @60 NRNAGPWS 2. @62 NRNAGWS 2. @64 NRSJMJ 2. @66 NTIO1OCD 4. @70 NTIO2OCD 4. @74 NWCMPWGT 10.4 @84 NWORWGT 10.4 @94 NWSSWGT 10.4 @104 NXIO1COW 2. @106 NXIO1ICD 2. @108 NXIO1OCD 2. @110 NXIO2COW 2. @112 NXIO2ICD 2. @114 NXIO2OCD 2. @116 NEERNCOV 2. @118 NEERNLAB 2. ; LABEL QSTNUM = "Unique household identifier. Valid onl" HRMONTH = "Month of Interview" HRYEAR4 = "Year of Interview" OCCURNUM = "Unique person identifier. Valid only w" NEIO1ICD = "INDUSTRY CODE FOR PRIMARY JOB" NEIO1COW = "INDIVIDUAL CLASS OF WORKER CODE" NEIO2COW = "INDIVIDUAL CLASS OF WORKER ON" NEIO2ICD = "INDUSTRY CODE FOR SECOND JOB." NRAGNA = "AGRICULTURE/NON-AGRICULTURE INDUSTRY" NRCOW1 = "CLASS OF WORKER" NRCOW2 = "CLASS OF WORKER" NRCOWPG = "COW - PRIVATE OR GOVERNMENT" NRDTCOW1 = "DETAILED CLASS OF WORKER RECODE - JOB " NRDTCOW2 = "DETAILED CLASS OF WORKER RECODE - JOB " NRDTIND1 = "DETAILED INDUSTRY RECODE - JOB 1" NRDTIND2 = "DETAILED INDUSTRY RECODE - JOB 2" NRDTOCC1 = "DETAILED OCCUPATION RECODE - JOB 1" NRDTOCC2 = "DETAILED OCCUPATION RECODE" NREMP = "EMPLOYED PERSONS [NON-FARM" NRMJIND1 = "MAJOR INDUSTRY RECODE - JOB 1" NRMJIND2 = "MAJOR INDUSTRY RECODE - JOB 2" NRMJOCC1 = "MAJOR OCCUPATION RECODE-JOB 1" NRMJOCC2 = "MAJOR OCCUPATION RECODE-JOB 2" NRMJOCGR = "MAJOR OCCUPATION CATEGORIES" NRNAGPWS = "NON-AGRICULTURE, PRIVATE" NRNAGWS = "NON-AGRICULTURE WAGE AND" NRSJMJ = "SINGLE/MULTIPLE JOBHOLDER" NTIO1OCD = "OCCUPATION CODE FOR PRIMARY JOB." NTIO2OCD = "OCCUPATION CODE FOR SECOND JOB." NWCMPWGT = "Composited Final Weight. Used to creat" NWORWGT = "OUTGOING ROTATION WEIGHT" NWSSWGT = "FINAL WEIGHT" NXIO1COW = "ALLOCATION FLAG" NXIO1ICD = "ALLOCATION FLAG" NXIO1OCD = "ALLOCATION FLAG" NXIO2COW = "ALLOCATION FLAG" NXIO2ICD = "ALLOCATION FLAG" NXIO2OCD = "ALLOCATION FLAG" NEERNCOV = "ON THIS JOB ARE YOU COVERED BY A UNION" NEERNLAB = "ON THIS JOB, ARE YOU A MEMBER OF A" ; proc print data=library.rw0104 (obs=6); FORMAT NEIO1COW NEIO1COW. NEIO2COW NEIO2COW. NRAGNA NRAGNA. NRCOW1 NRCOW1L. NRCOW2 NRCOW2L. NRCOWPG NRCOWPG. NRDTCOW1 NRDTCOWA. NRDTCOW2 NRDTCOWB. NRDTIND1 NRDTINDA. NRDTIND2 NRDTINDB. NRDTOCC1 NRDTOCCA. NRDTOCC2 NRDTOCCB. NRMJIND1 NRMJINDA. NRMJIND2 NRMJINDB. NRMJOCC1 NRMJOCCA. NRMJOCC2 NRMJOCCB. NRMJOCGR NRMJOCGR. NRSJMJ NRSJMJ. NEERNCOV NEERNCOV. NEERNLAB NEERNLAB. ; proc contents data=library.rw0104; run; /* Copyright 2004 shared by the National Bureau of Economic Research and Jean Roth National Bureau of Economic Research. 1050 Massachusetts Avenue Cambridge, MA 02138 jroth@nber.org This program and all programs referenced in it are free software. You can redistribute the program or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */