*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Mon Jul 2 15:41:57 EDT 2007 This program reads the 1997 National Health Interview Survey 1997 injepsod 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/injepsod.exe "; * The following line should contain the name of the SAS dataset ; %let dataset = nhis1997_injepsod ; 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 px length=$2 label=""; attrib injepno length=$1 label="Injury episode number"; attrib ijdate_m length=3 label="Month of injury"; attrib day length=3 label="Day of week of injury"; attrib ijdate_y length=4 label="Year of injury"; attrib rpckdm length=3 label="Time between interview and injury dates"; attrib caus length=3 label="Cause of injury"; attrib ecaus length=3 label="Cause of injury based on E codes"; attrib mvwho length=3 label="Injured as a driver, pass, rider, or ped"; attrib mvtyp length=3 label="Type of vehicle injured person was in"; attrib sbelt length=3 label="Wearing sbelt/in cseat attot accident"; attrib helmt length=3 label="Wearing helmet at time of accident"; attrib mvhit length=3 label="Type of vehicle striking pedestrian"; attrib burn length=3 label="Cause of burn/scald"; attrib water length=3 label="Body of water involved in injury"; attrib fall1 length=3 label="Fell on or down escalator"; attrib fall2 length=3 label="Fell on or down stairs or steps"; attrib fall3 length=3 label="Fell on floor/ground level"; attrib fall4 length=3 label="Fell on or down from curb/sidewalk"; attrib fall5 length=3 label="Fell on or from ladder or scaffolding"; attrib fall6 length=3 label="Fell on or from playground equipment"; attrib fall7 length=3 label="Fell from building or other structure"; attrib fall8 length=3 label="Fell from chair/bed/other furniture"; attrib fall9 length=3 label="Fell from tree"; attrib fall10 length=3 label="Fell from toilet, commode"; attrib fall11 length=3 label="Fell in bathtub, shower"; attrib fall12 length=3 label="Fell into swimming pool"; attrib fall13 length=3 label="Fell into hole or other opening"; attrib fall14 length=3 label="Fell: other"; attrib fwhy length=3 label="Cause of fall"; attrib guntp length=3 label="Kind of gun causing injury"; attrib what1 length=3 label="Driving"; attrib what2 length=3 label="Working at paid job"; attrib what3 length=3 label="Working around the house or yard"; attrib what4 length=3 label="Attending school"; attrib what5 length=3 label="Unpaid work (housework, volunteer)"; attrib what6 length=3 label="Sports (organized team or individual)"; attrib what7 length=3 label="Leisure activity (excluding sports)"; attrib what8 length=3 label="Sleeping, resting, eating, drinking"; attrib what9 length=3 label="Cooking"; attrib what10 length=3 label="Hands on care from other person"; attrib what11 length=3 label="Other"; attrib wher1 length=3 label="Home (inside)"; attrib wher2 length=3 label="Home (outside)"; attrib wher3 length=3 label="School (not residential)"; attrib wher4 length=3 label="Child care center or preschool"; attrib wher5 length=3 label="Residential institution (excl. hospital)"; attrib wher6 length=3 label="Health care facility (incl. hospital)"; attrib wher7 length=3 label="Street/highway"; attrib wher8 length=3 label="Parking lot"; attrib wher9 length=3 label="Sport facility, athletic field, playgnd"; attrib wher10 length=3 label="Trade and service areas"; attrib wher11 length=3 label="Farm"; attrib wher12 length=3 label="Park/recreation area"; attrib wher13 length=3 label="River/lake/stream/ocean"; attrib wher14 length=3 label="Swimming pool"; attrib wher15 length=3 label="Industrial or construction area"; attrib wher16 length=3 label="Mine or quarry"; attrib wher17 length=3 label="Other public building"; attrib wher18 length=3 label="Other"; attrib ihosp length=3 label="Hospitalized for injury/injuries"; attrib ihno length=3 label="Number of nights hospitalized"; attrib wkls length=3 label="Days absent from work"; attrib scls length=3 label="Days absent from school"; attrib ijadl length=3 label="Need help with personal care needs"; attrib limtm length=3 label="Help with personal care needs for 6 mo+"; attrib ijiad length=3 label="Need help with routine needs"; attrib hlimt length=3 label="Need help with routine needs for 6 mo+"; attrib icd9_1 length=$5 label="ICD-9-CM diagnosis code"; attrib icd9_2 length=$5 label="ICD-9-CM diagnosis code"; attrib icd9_3 length=$5 label="ICD-9-CM diagnosis code"; attrib icd9_4 length=$5 label="ICD-9-CM diagnosis code"; attrib ecode_1 length=$5 label="ICD-9-CM External cause code"; attrib ecode_2 length=$5 label="ICD-9-CM External cause code"; attrib ecode_3 length=$5 label="ICD-9-CM External cause code"; attrib wtfa length=4 label="Weight - Final Annual"; INPUT @1 rectype 2. @3 srvy_yr 4. @7 hhx $6. @13 fmx $2. @15 px $2. @17 injepno $1. @18 ijdate_m 2. @20 day 2. @22 ijdate_y 4. @26 rpckdm 2. @28 caus 1. @29 ecaus 2. @31 mvwho 1. @32 mvtyp 2. @34 sbelt 1. @35 helmt 1. @36 mvhit 2. @38 burn 2. @40 water 1. @41 fall1 1. @42 fall2 1. @43 fall3 1. @44 fall4 1. @45 fall5 1. @46 fall6 1. @47 fall7 1. @48 fall8 1. @49 fall9 1. @50 fall10 1. @51 fall11 1. @52 fall12 1. @53 fall13 1. @54 fall14 1. @55 fwhy 1. @56 guntp 1. @57 what1 1. @58 what2 1. @59 what3 1. @60 what4 1. @61 what5 1. @62 what6 1. @63 what7 1. @64 what8 1. @65 what9 1. @66 what10 1. @67 what11 1. @68 wher1 1. @69 wher2 1. @70 wher3 1. @71 wher4 1. @72 wher5 1. @73 wher6 1. @74 wher7 1. @75 wher8 1. @76 wher9 1. @77 wher10 1. @78 wher11 1. @79 wher12 1. @80 wher13 1. @81 wher14 1. @82 wher15 1. @83 wher16 1. @84 wher17 1. @85 wher18 1. @86 ihosp 1. @87 ihno 2. @89 wkls 1. @90 scls 1. @91 ijadl 1. @92 limtm 1. @93 ijiad 1. @94 hlimt 1. @95 icd9_1 $5. @100 icd9_2 $5. @105 icd9_3 $5. @110 icd9_4 $5. @115 ecode_1 $5. @120 ecode_2 $5. @125 ecode_3 $5. @130 wtfa 6. ; /*------------------------------------------------ The PROC FORMAT statement will store the formats in a sas data set called finje97 To use the stored formats in a subsequent program, use code like the following: proc format cntlin=library.finje97; PROC freq; tables pesex ; format pesex P135L.; For more information, consult PROC FORMAT in the SAS Procedures Guide ----------------------------------------------- */ PROC FORMAT cntlout=library.finje97; ; VALUE rectype (default=32) 70 = "Injury Episode" ; VALUE srvy_yr (default=32) 1997 = "1997" ; VALUE $injepno (default=32) ""1"" = "First injury episode" ""2"" = "Second injury episode" ""3"" = "Third injury episode" ""4"" = "Fourth injury episode" ; VALUE ijdate_m (default=32) 01 = "January" 02 = "February" 03 = "March" 04 = "April" 05 = "May" 06 = "June" 07 = "July" 08 = "August" 09 = "September" 10 = "October" 11 = "November" 12 = "December" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE day (default=32) 01 = "Sunday" 02 = "Monday" 03 = "Tuesday" 04 = "Wednesday" 05 = "Thursday" 06 = "Friday" 07 = "Saturday" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE ijdate_y (default=32) 1996 = "1996" 1997 = "1997" 1998 = "1998" 9997 = "Refused" 9998 = "Not ascertained" 9999 = "Don't know" ; VALUE rpckdm (default=32) 92 = "92-99 days" 93 = "Same month as interview" 94 = "Month before month of interview" 95 = "2 months before month of interview" 96 = "3 or 4 months before month of interview" 98 = "Not ascertained" ; VALUE caus (default=32) 1 = "Vehicle as transportation (see Notes below)" 2 = "Gun/being shot" 3 = "Fire/burn/scald related" 4 = "Near drowning/water in lungs" 5 = "Fall" 6 = "Other" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE ecaus (default=32) 01 = "Transportation (see Notes below)" 02 = "Fire/burn/scald related" 03 = "Fall" 04 = "Overexertion/strenuous movements" 05 = "Struck by object or person" 06 = "Animal or insect bite" 07 = "Cut/pierce" 08 = "Machinery" 09 = "Other" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE mvwho (default=32) 1 = "Driver of a vehicle" 2 = "Passenger in a vehicle" 3 = "Bicycle rider" 4 = "Pedestrian" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE mvtyp (default=32) 01 = "Passenger car" 02 = "Light truck (pickups; vans; utility vehicles)" 03 = "Bus" 04 = "Large truck" 05 = "Motorcycles (including mopeds; minibikes)" 06 = "All terrain vehicle or ski/snow-mobile" 07 = "Farm equipment (tractor)" 08 = "Airplane" 09 = "Boat" 10 = "Train" 11 = "Other" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE sbelt (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE helmt (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE mvhit (default=32) 01 = "Passenger car" 02 = "Light truck (pickups; vans; utility vehicles)" 03 = "Bus" 04 = "Large truck" 05 = "Motorcycle (including mopeds; minibikes)" 06 = "All terrain vehicle or ski or snow-mobile" 07 = "Farm equipment (tractor)" 08 = "Bicycle" 09 = "Train" 10 = "Boat (includes all on water vehicles)" 11 = "Other" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE burn (default=32) 01 = "Cigarette; cigar; pipe" 02 = "Cooking unit" 03 = "Heater" 04 = "Wiring" 05 = "Motor vehicle battery caps; radiator caps" 06 = "Fireworks" 07 = "Other explosive" 08 = "Water or steam" 09 = "Food" 10 = "Chemicals" 11 = "Other" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE water (default=32) 1 = "Bathtub" 2 = "Swimming pool" 3 = "Lake; pond" 4 = "Bay; ocean; sea" 5 = "River; creek" 6 = "Other" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall1l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall2l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall3l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall4l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall5l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall6l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall7l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall8l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall9l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall10l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall11l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall12l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall13l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fall14l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE fwhy (default=32) 1 = "Slipping; tripping; or stumbling" 2 = "Jumping or diving" 3 = "Collision with/pushing; shoving by other person" 4 = "Loss of balance/dizziness/fainting/seizure" 5 = "Something else" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE guntp (default=32) 1 = "Firearm (handgun; shotgun; rifle)" 2 = "BB or pellet gun" 3 = "Dart gun" 4 = "Other" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what1l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what2l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what3l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what4l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what5l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what6l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what7l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what8l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what9l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what10l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE what11l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher1l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher2l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher3l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher4l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher5l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher6l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher7l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher8l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher9l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher10l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher11l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher12l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher13l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher14l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher15l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher16l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher17l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE wher18l (default=32) 1 = "Mentioned" 2 = "Not mentioned" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE ihosp (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE ihno (default=32) 95 = "95+ nights" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE wkls (default=32) 0 = "None" 1 = "Less than 1 day" 2 = "1 to 5 days" 3 = "Six or more days" 6 = "Not employed at the time of the injury" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE scls (default=32) 0 = "None" 1 = "Less than 1 day" 2 = "One to five days" 3 = "Six or more days" 6 = "Not in school at the time of the injury" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE ijadl (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE limtm (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE ijiad (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE hlimt (default=32) 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE $icd9_1l (default=32) ""99998"" = "Not ascertained" ; VALUE $icd9_2l (default=32) ""99998"" = "Not ascertained" """ = " Not in Universe" ; VALUE $icd9_3l (default=32) ""99998"" = "Not ascertained" """ = " Not in Universe" ; VALUE $icd9_4l (default=32) ""99998"" = "Not ascertained" """ = " Not in Universe" ; VALUE $ecode_1l (default=32) ""99998"" = "Not ascertained" ; VALUE $ecode_2l (default=32) ""99998"" = "Not ascertained" """ = " Not in Universe" ; VALUE $ecode_3l (default=32) ""99998"" = "Not ascertained" """ = " Not in Universe" ; proc print data=library.nhis1997_injepsod (obs=6); FORMAT rectype rectype. srvy_yr srvy_yr. injepno $injepno. ijdate_m ijdate_m. day day. ijdate_y ijdate_y. rpckdm rpckdm. caus caus. ecaus ecaus. mvwho mvwho. mvtyp mvtyp. sbelt sbelt. helmt helmt. mvhit mvhit. burn burn. water water. fall1 fall1l. fall2 fall2l. fall3 fall3l. fall4 fall4l. fall5 fall5l. fall6 fall6l. fall7 fall7l. fall8 fall8l. fall9 fall9l. fall10 fall10l. fall11 fall11l. fall12 fall12l. fall13 fall13l. fall14 fall14l. fwhy fwhy. guntp guntp. what1 what1l. what2 what2l. what3 what3l. what4 what4l. what5 what5l. what6 what6l. what7 what7l. what8 what8l. what9 what9l. what10 what10l. what11 what11l. wher1 wher1l. wher2 wher2l. wher3 wher3l. wher4 wher4l. wher5 wher5l. wher6 wher6l. wher7 wher7l. wher8 wher8l. wher9 wher9l. wher10 wher10l. wher11 wher11l. wher12 wher12l. wher13 wher13l. wher14 wher14l. wher15 wher15l. wher16 wher16l. wher17 wher17l. wher18 wher18l. ihosp ihosp. ihno ihno. wkls wkls. scls scls. ijadl ijadl. limtm limtm. ijiad ijiad. hlimt hlimt. icd9_1 $icd9_1l. icd9_2 $icd9_2l. icd9_3 $icd9_3l. icd9_4 $icd9_4l. ecode_1 $ecode_1l. ecode_2 $ecode_2l. ecode_3 $ecode_3l. ; proc contents data=library.nhis1997_injepsod; /* 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. */