*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Mon Jul 2 15:41:13 EDT 2007 This program reads the 1997 National Health Interview Survey 1997 familyxx Data File Report errors to jroth@nber.org This program is distributed under the GNU GPL. See end of this file and http://www.gnu.org/licenses/ for details. ----------------------------------------------- */ * The following line should contain the directory where the SAS file is to be stored ; libname library "./"; * The following line should contain the complete path and name of the raw data file. On a PC, use backslashes in paths as in C:\ ; FILENAME datafile pipe "unzip -p /homes/data/nhis/ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NHIS/1997/familyxx.exe "; * The following line should contain the name of the SAS dataset ; %let dataset = nhis1997_familyxx ; DATA library.&dataset ; INFILE datafile LRECL = 20000 ; attrib rectype length=3 label="Record Type"; attrib srvy_yr length=4 label="Survey Year"; attrib hhx length=$6 label="Household Serial Number"; attrib fmx length=$2 label="Family Serial Number"; attrib intv_qrt length=3 label="Interview Quarter"; attrib assignwk length=3 label="Assignment week"; attrib livqrt length=3 label="Type of living quarters"; attrib telenum length=3 label="Supplied telephone number"; attrib inside length=3 label="Working phone inside home"; attrib fm_size length=3 label="Size of family"; attrib lng_intv length=3 label="Language of interview"; attrib region length=3 label="Region"; attrib msasizep length=3 label="Geographic Distribution - MSA size"; attrib wtfa_fam length=4 label="Weight - Final Annual"; attrib stratum length=3 label="Stratum for variance estimation"; attrib psu length=3 label="PSU for variance estimation"; attrib fchlmyn length=3 label="Any child < 5 in fam w/ play lim?"; attrib fchlmct length=3 label="# children < 5 in fam w/ play lim"; attrib fspedyn length=3 label="Any child < 18 in fam rec Spec Ed/EIS?"; attrib fspedct length=3 label="# children < 18 in fam rec Spec Ed/EIS"; attrib flaadlyn length=3 label="Anyone need help w/ADL?"; attrib flaadlct length=3 label="# fam members needing help w/ADL"; attrib fliadlyn length=3 label="Anyone need help w/ chores, shop?"; attrib fliadlct length=3 label="# fam members need help w/chores, shop"; attrib fwklimyn length=3 label="Anyone with work lim due to hlth prob?"; attrib fwklimct length=3 label="# fam members w/ work lim (hlth)"; attrib fwalkyn length=3 label="Anyone have dif walking w/o equip?"; attrib fwalkct length=3 label="# fam members dif walk w/o equip"; attrib frememyn length=3 label="Anyone limited by dif remembering?"; attrib frememct length=3 label="# fam members w/ dif remembering"; attrib fanylyn length=3 label="Anyone limited in any way?"; attrib fanylct length=3 label="# fam members w/ any limitation"; attrib fhstatex length=3 label="# fam members in excellent health"; attrib fhstatvg length=3 label="# fam members in very good health"; attrib fhstatg length=3 label="# fam members in good health"; attrib fhstatfr length=3 label="# fam members in fair health"; attrib fhstatpr length=3 label="# fam members in poor health"; attrib finjyn length=3 label="Anyone w/ a serious injury (last 3 m)?"; attrib finjct1 length=3 label="# fam members w/ injury (last 3 m)"; attrib finjct2 length=3 label="# injury episodes/family (last 3 m)"; attrib fpoisyn length=3 label="Anyone w/ serious poisoning (last 3 m)?"; attrib fpoisct1 length=3 label="# fam members poisoned (last 3 m)"; attrib fpoisct2 length=3 label="# poisonings/family (last 3 m)"; attrib fdmedyn length=3 label="Anyone delay med care (cost), 12m?"; attrib fdmedct length=3 label="# fam members delay med care (cost)"; attrib fnmedyn length=3 label="Anyone not get med care (cost), 12m?"; attrib fnmedct length=3 label="# fam members not get med care (cost)"; attrib fhospyn length=3 label="Anyone in hosp OVERNIGHT, 12m?"; attrib fhospct length=3 label="# fam members in hosp OVERNIGHT, 12m"; attrib fhchmyn length=3 label="Anyone rec home care by hlth prof, 2 wk?"; attrib fhchmct length=3 label="# fam members rec home care, 2 wk"; attrib fhcphyn length=3 label="Anyone phone a hlth prof, 2 wk?"; attrib fhcphct length=3 label="# fam members phone hlth care prof, 2 wk"; attrib fhcdvyn length=3 label="Anyone see hlth prof in office, 2 wk?"; attrib fhcdvct length=3 label="# fam members see hlth prof in office"; attrib f10dvyn length=3 label="Anyone rec care 10+ times, 12m?"; attrib f10dvct length=3 label="# fam members rec care 10+ times, 12m"; attrib fhicovyn length=3 label="Anyone have hlth ins coverage?"; attrib fhicovct length=3 label="# fam members with hlth ins coverage"; attrib fhiprvct length=3 label="# fam members w/ private hlth ins"; attrib fhicarct length=3 label="# fam members w/ medicare hlth ins"; attrib fhicadct length=3 label="# fam members w/ medicaid hlth ins"; attrib fhimilct length=3 label="# fam members w/ military hlth ins"; attrib fhiihsct length=3 label="# fam members w/ IHS hlth ins"; attrib fhipubct length=3 label="# fam members w/ otr state-spon hlth ins"; attrib fhiogvct length=3 label="# fam members w/ otr govt hlth ins"; attrib fhicost length=3 label="Cost of fam med/dental care, past 12m"; attrib fhdstct length=3 label="# children < 6 in Head Start"; attrib fdglwct1 length=3 label="# fam members working last week"; attrib fdglwct2 length=3 label="# fam members look for work last week"; attrib fwrklwct length=3 label="# fam members work full time last week"; attrib fsalyn length=3 label="Anyone rec inc from wages/sal (last CY)?"; attrib fsalct length=3 label="# fam members rec inc from wage/sal"; attrib fseincyn length=3 label="Anyone rec inc from self-emp?"; attrib fseincct length=3 label="# fam members rec inc from self-emp"; attrib fssrryn length=3 label="Anyone rec Soc Sec or RR ret (last CY)?"; attrib fssrrct length=3 label="# fam members rec Soc Sec or RR ret"; attrib fpensyn length=3 label="Anyone rec inc from otr pensions?"; attrib fpensct length=3 label="# fam members rec inc from otr pensions"; attrib fssiyn length=3 label="Anyone rec inc from SSI?"; attrib fssict length=3 label="# fam members rec inc from SSI"; attrib fssdiyn length=3 label="Anyone rec inc from SSDI?"; attrib fssdict length=3 label="# fam members rec inc from SSDI"; attrib fafdcyn length=3 label="Anyone rec Wel/AFDC/Gen Assist?"; attrib fafdcct length=3 label="# fam members rec Wel/AFDC/Gen Assist"; attrib fintrsyn length=3 label="Anyone rec int from sav/bank accts?"; attrib fintrsct length=3 label="# fam members rec int from sav/bank acct"; attrib fdivdyn length=3 label="Anyone rec div from stocks, funds?"; attrib fdivdct length=3 label="# fam members rec div from stocks, funds"; attrib fchspyn length=3 label="Anyone rec inc from child support?"; attrib fchspct length=3 label="# fam members rec inc from child support"; attrib fincotyn length=3 label="Anyone rec inc from any otr source?"; attrib fincotct length=3 label="# fam members rec inc from any otr sourc"; attrib fincgrp length=3 label="Total combined family income (grouped)"; attrib frat_cat length=3 label="Ratio of fam inc to poverty threshold"; attrib fhouse length=3 label="Family's home tenure status"; attrib ffdstyn length=3 label="Anyone auth to rec fd stmps last yr?"; attrib ffdstct length=3 label="# fam members rec fd stmps (last yr)"; attrib fm_kids length=3 label="# fam members aged 17 and younger"; attrib fm_eldr length=3 label="# fam members aged 65 and older"; attrib fmtype length=3 label="Family Type"; attrib fm_educ length=3 label="Educ of adult with highest educ in fam"; INPUT @1 rectype 2. @3 srvy_yr 4. @7 hhx $6. @13 fmx $2. @15 intv_qrt 1. @16 assignwk 2. @18 livqrt 2. @20 telenum 1. @21 inside 1. @22 fm_size 2. @24 lng_intv 1. @25 region 1. @26 msasizep 1. @27 wtfa_fam 6. @33 stratum 3. @36 psu 1. @37 fchlmyn 1. @38 fchlmct 2. @40 fspedyn 1. @41 fspedct 2. @43 flaadlyn 1. @44 flaadlct 2. @46 fliadlyn 1. @47 fliadlct 2. @49 fwklimyn 1. @50 fwklimct 2. @52 fwalkyn 1. @53 fwalkct 2. @55 frememyn 1. @56 frememct 2. @58 fanylyn 1. @59 fanylct 2. @61 fhstatex 2. @63 fhstatvg 2. @65 fhstatg 2. @67 fhstatfr 2. @69 fhstatpr 2. @71 finjyn 1. @72 finjct1 2. @74 finjct2 2. @76 fpoisyn 1. @77 fpoisct1 2. @79 fpoisct2 2. @81 fdmedyn 1. @82 fdmedct 2. @84 fnmedyn 1. @85 fnmedct 2. @87 fhospyn 1. @88 fhospct 2. @90 fhchmyn 1. @91 fhchmct 2. @93 fhcphyn 1. @94 fhcphct 2. @96 fhcdvyn 1. @97 fhcdvct 2. @99 f10dvyn 1. @100 f10dvct 2. @102 fhicovyn 1. @103 fhicovct 2. @105 fhiprvct 2. @107 fhicarct 2. @109 fhicadct 2. @111 fhimilct 2. @113 fhiihsct 2. @115 fhipubct 2. @117 fhiogvct 2. @119 fhicost 1. @120 fhdstct 2. @122 fdglwct1 2. @124 fdglwct2 2. @126 fwrklwct 2. @128 fsalyn 1. @129 fsalct 2. @131 fseincyn 1. @132 fseincct 2. @134 fssrryn 1. @135 fssrrct 2. @137 fpensyn 1. @138 fpensct 2. @140 fssiyn 1. @141 fssict 2. @143 fssdiyn 1. @144 fssdict 2. @146 fafdcyn 1. @147 fafdcct 2. @149 fintrsyn 1. @150 fintrsct 2. @152 fdivdyn 1. @153 fdivdct 2. @155 fchspyn 1. @156 fchspct 2. @158 fincotyn 1. @159 fincotct 2. @161 fincgrp 2. @163 frat_cat 2. @165 fhouse 1. @166 ffdstyn 1. @167 ffdstct 2. @169 fm_kids 2. @171 fm_eldr 2. @173 fmtype 1. @174 fm_educ 2. ; /*------------------------------------------------ The PROC FORMAT statement will store the formats in a sas data set called ffami97 To use the stored formats in a subsequent program, use code like the following: proc format cntlin=library.ffami97; PROC freq; tables pesex ; format pesex P135L.; For more information, consult PROC FORMAT in the SAS Procedures Guide ----------------------------------------------- */ PROC FORMAT cntlout=library.ffami97; ; VALUE rectype (default=32) 60 = "Family" ; VALUE srvy_yr (default=32) 1997 = "1997" ; VALUE intv_qrt (default=32) 1 = "Quarter 1" 2 = "Quarter 2" 3 = "Quarter 3" 4 = "Quarter 4" ; VALUE assignwk (default=32) 01 = "Week 1" 02 = "Week 2" 03 = "Week 3" 04 = "Week 4" 05 = "Week 5" 06 = "Week 6" 07 = "Week 7" 08 = "Week 8" 09 = "Week 9" 10 = "Week 10" 11 = "Week 11" 12 = "Week 12" 13 = "Week 13" ; VALUE livqrt (default=32) 01 = "House; apartment; flat; condo" 02 = "HU in nontransient hotel; motel" 03 = "HU-permanent in transient hotel; motel" 04 = "HU in rooming house" 05 = "Mobile home/trailer w/no permanent rooms added" 06 = "Mobile home/trailer w/ 1+ permanent rooms adde" 07 = "HU not specified above" 08 = "Quarters not HU in room or board house" 09 = "Unit not permanent-transient hotel; motel" 10 = "Unoccupied site for mobile home/trailer/tent" 11 = "Student quarters in college dormitory" 12 = "Group quarter unit not specified above" 98 = "Not ascertained" ; VALUE telenum (default=32) 1 = "Yes (gave phone number)" 2 = "No (no phone service)" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE inside (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE lng_intv (default=32) 1 = "English" 2 = "Spanish" 3 = "English and Spanish" 4 = "Other" 8 = "Not ascertained" ; VALUE region (default=32) 1 = "Northeast" 2 = "Midwest" 3 = "South" 4 = "West" ; VALUE msasizep (default=32) 1 = "5;000;000 or more" 2 = "2;500;000 - 4;999;999" 3 = "1;000;000 - 2;499;999" 4 = "500;000 - 999;999" 5 = "250;000 - 499;999" 6 = "Under 250;000" 7 = "Non-MSA" ; VALUE fchlmyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fspedyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE flaadlyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fliadlyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fwklimyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fwalkyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE frememyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fanylyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE finjyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fpoisyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fdmedyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fnmedyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fhospyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fhchmyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fhcphyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fhcdvyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE f10dvyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fhicovyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fhicost (default=32) 0 = "Zero" 1 = "Less than $500" 2 = "$500-$1;999" 3 = "$2;000-$2;999" 4 = "$3;000-$4;999" 5 = "$5;000 or more" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't Know" ; VALUE fsalyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fseincyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fssrryn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fpensyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fssiyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fssdiyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fafdcyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fintrsyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fdivdyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fchspyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fincotyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fincgrp (default=32) 01 = "0-$4999" 02 = "$5000-$9999" 03 = "$10000-$14999" 04 = "$15000-$19999" 05 = "$20000-$24999" 06 = "$25000-$34999" 07 = "$35000-$44999" 08 = "$45000-$54999" 09 = "$55000-$64999" 10 = "$65000-$74999" 11 = "$75000 and over" 12 = "$20000 or more (no detail)" 13 = "Less than $20000 (no detail)" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE frat_cat (default=32) 01 = "Under .50" 02 = ".50 to .74" 03 = ".75 to .99" 04 = "1.00 to 1.24" 05 = "1.25 to 1.49" 06 = "1.50 to 1.74" 07 = "1.75 to 1.99" 08 = "2.00 to 2.49" 09 = "2.50 to 2.99" 10 = "3.00 to 3.49" 11 = "3.50 to 3.99" 12 = "4.00 to 4.49" 13 = "4.50 to 4.99" 14 = "5.00 and over" 96 = "Undefinable" 99 = "Unknown" ; VALUE fhouse (default=32) 1 = "Owned" 2 = "Being bought" 3 = "Rented" 4 = "Other arrangement" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE ffdstyn (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fmtype (default=32) 1 = "One adult; no child(ren) under 18" 2 = "Multiple adults; no child(ren) under 18" 3 = "One adult; 1+ child(ren) under 18" 4 = "Multiple adults; 1+ child(ren) under 18" 9 = "Unknown" ; VALUE fm_educ (default=32) 01 = "Less/equal to 8th grade" 02 = "9-12th grade; no high school diploma" 03 = "High school graduate" 04 = "GED recipient" 05 = "Some college; no degree" 06 = "AA degree; technical or vocational" 07 = "AA degree; academic program" 08 = "Bachelor's degree (BA; BS; AB; BBA)" 09 = "Master's; professional; or doctoral degree" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; proc print data=library.nhis1997_familyxx (obs=6); FORMAT rectype rectype. srvy_yr srvy_yr. intv_qrt intv_qrt. assignwk assignwk. livqrt livqrt. telenum telenum. inside inside. lng_intv lng_intv. region region. msasizep msasizep. fchlmyn fchlmyn. fspedyn fspedyn. flaadlyn flaadlyn. fliadlyn fliadlyn. fwklimyn fwklimyn. fwalkyn fwalkyn. frememyn frememyn. fanylyn fanylyn. finjyn finjyn. fpoisyn fpoisyn. fdmedyn fdmedyn. fnmedyn fnmedyn. fhospyn fhospyn. fhchmyn fhchmyn. fhcphyn fhcphyn. fhcdvyn fhcdvyn. f10dvyn f10dvyn. fhicovyn fhicovyn. fhicost fhicost. fsalyn fsalyn. fseincyn fseincyn. fssrryn fssrryn. fpensyn fpensyn. fssiyn fssiyn. fssdiyn fssdiyn. fafdcyn fafdcyn. fintrsyn fintrsyn. fdivdyn fdivdyn. fchspyn fchspyn. fincotyn fincotyn. fincgrp fincgrp. frat_cat frat_cat. fhouse fhouse. ffdstyn ffdstyn. fmtype fmtype. fm_educ fm_educ. ; proc contents data=library.nhis1997_familyxx; /* Copyright 2007 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. */