*options obs=100 ; options nocenter ; **------------------------------------------------ ; ** by Jean Roth Tue Jun 24 09:49:34 EDT 2014 ** This program reads the 1983 NCHS Natality Detail 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 "/homes/data/natality/1983/"; * 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/natality/ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/DVS/natality/Nat1983.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = library.natl1983; DATA &dataset ; INFILE datafile LRECL = 20000 ; attrib datayear length=3 label="Data year"; attrib stresexp length=3 label="Expanded State of Residence"; attrib reparea length=$1 label="Reporting Area"; attrib rectype length=3 label="Record type"; attrib restatus length=3 label="Resident status"; attrib stateres length=$2 label="NCHS State of Residence"; attrib cntyres length=$5 label="NCHS County of Residence"; attrib cityres length=$3 label="NCHS City of Residence"; attrib citrspop length=$1 label="Population size - place of residence"; attrib smsares length=$3 label="Standard Metropolitan Statistical Area SMSA of residence"; attrib metrores length=$1 label="Met/Nonmet county of residence"; attrib divres length=3 label="Division of residence"; attrib stsubres length=3 label="State Subcode of Residence"; attrib statenat length=$2 label="NCHS State of Occurence"; attrib cntynat length=$5 label="NCHS County of Occurence"; attrib divocc length=3 label="Division of occurrence"; attrib stsubocc length=3 label="State Subcode of occurrence"; attrib csex length=3 label="Sex of Child"; attrib birattnd length=3 label="Attendant at birth"; attrib frace length=3 label="Race of Father"; attrib mrace length=3 label="Race of Mother"; attrib crace length=3 label="Race of Child"; attrib crace3 length=3 label="Race of Child Recode"; attrib dmage length=3 label="Age of Mother"; attrib mage36 length=3 label="Age of Mother recode 36"; attrib mage15 length=3 label="Age of Mother recode 15"; attrib mage12 length=3 label="Age of Mother recode 12"; attrib mage8 length=3 label="Age of Mother recode 8"; attrib mage7 length=3 label="Age of Mother recode 7"; attrib mage6 length=3 label="Age of Mother recode 6"; attrib nlbnl length=3 label="Born alive - now living"; attrib nlbnd length=3 label="Born alive - now dead"; attrib nlbd length=3 label="Number of children born dead ( fetal deaths )"; attrib dtotord length=3 label="Total birth order"; attrib totord9 length=3 label="Total birth order recode"; attrib dlivord length=3 label="Detail Live birth order"; attrib livord9 length=3 label="Live birth order Recode 9"; attrib livord8 length=3 label="Live birth order Recode 8"; attrib livord7 length=3 label="Live birth order Recode 7"; attrib livord6 length=3 label="Live birth order Recode 6"; attrib livord3 length=3 label="Live birth order Recode 3"; attrib dfage length=3 label="Age of Father"; attrib fage11 length=3 label="Age of Father Recode"; attrib dbirwt length=4 label="Birthweight"; attrib birwt12 length=3 label="Birthweight Recode 12"; attrib birwt3 length=3 label="Birthweight Recode 3"; attrib pldel length=3 label="Place of Delivery"; attrib dplural length=3 label="Plurality"; attrib plural3 length=3 label="Plurality recode 3"; attrib plural2 length=3 label="Plurality recode 2"; attrib birmon length=3 label="Month of birth"; attrib birday length=3 label="Birth Date - Day"; attrib lmpmon length=3 label="Month Last Normal Menses Began"; attrib lmpday length=3 label="Day Last Normal Menses Began"; attrib lmpyr length=$1 label="Year Last Normal Menses Began"; attrib dgestat length=3 label="Gestation"; attrib gestat10 length=3 label="Gestation Recode 10"; attrib gestat3 length=3 label="Gestation Recode 3"; attrib dmeduc length=3 label="Education of Mother Detail"; attrib meduc14 length=3 label="Education of Mother Recode 14"; attrib meduc6 length=3 label="Education of Mother Recode 6"; attrib dfeduc length=3 label="Education of Father"; attrib feduc14 length=3 label="Education of Father Recode 14"; attrib dmar length=3 label="Marital Status"; attrib mar2 length=3 label="Marital Status Recode 2"; attrib monprec length=$1 label="Detail Month Prenatal Care began"; attrib mpre10 length=3 label="Month Prenatal Care began Recode 10"; attrib mpre6 length=3 label="Month Prenatal Care began Recode 6"; attrib llbmon length=3 label="Month of Last Live Birth"; attrib llbyr length=3 label="Year of Last Live Birth"; attrib disllb length=3 label="Interval since last live birth"; attrib isllb17 length=3 label="Interval since last live birth Recode 17"; attrib isllb10 length=3 label="Interval since last live birth Recode 10"; attrib isllb8 length=3 label="Interval since last live birth Recode 8"; attrib lfdmon length=3 label="Date of Last Fetal Death - Month"; attrib lfdyr length=3 label="Date of Last Fetal Death - Year"; attrib lfdflg length=3 label="Flag Last Fetal Death Valid Date Flag"; attrib dlfd length=3 label="Detail Interval Since Last Fetal Death"; attrib dterm length=3 label="Detail Interval Since Termination of Last Pregnancy"; attrib term9 length=3 label="Interval Since Termination of Last Pregnancy Recode 9"; attrib outcome length=3 label="Outcome of Last Pregnancy"; attrib mplbir length=3 label="Mother's Place of Birth"; attrib nprevis length=3 label="Total Number of Prenatal Visits"; attrib congen length=3 label="Congenital Malformation"; attrib marstrflg length=3 label="Marital Status (by state) flag"; attrib educstrflg length=3 label="Education of Parents (By State) flag"; attrib lmprflg length=3 label="Date of Last Normal Menses (by state) flag"; attrib monprerflg length=3 label="Month prenatal care began (by state) flag"; attrib llbrflg length=3 label="Date of Last Live Birth (by State) flag"; attrib lfdrflg length=3 label="Date of Last Fetal Death (by State) flag"; attrib marsmsarflg length=3 label="Marital Status (by SMSA) flag"; attrib educsmsarflg length=3 label="Education of Parents (By State) flag"; attrib congenrflg length=3 label="Congenital Malformations (by state) flag"; attrib nprevisrflg length=3 label="Total Number of Prenatal Visits (by state) flag"; attrib ethnicrflg length=3 label="Ethnicity (by state) flag"; attrib omapsrflg length=3 label="One Minute Apgar Score (by state) flag"; attrib fmapsrflg length=3 label="Five Minute Apgar Score (by state) flag"; attrib marstoflg length=3 label="Marital Status (by state) flag"; attrib educstoflg length=3 label="Education of Parents (by state) flag"; attrib lmpoflg length=3 label="Date of last normal menses (by state) flg"; attrib monpreoflg length=3 label="Month prenatal care began (by state)"; attrib llboflg length=3 label="Date of last live birth (by state) flag"; attrib lfdoflg length=3 label="Date of last fetal death (by state) flag"; attrib congenflg length=3 label="Congenital Malformations (by state) flag"; attrib nprevisoflg length=3 label="Total Number of Prenatal Visits (by state) flag"; attrib ethnicoflg length=3 label="Ethnicity (by state) flag"; attrib omapsoflg length=3 label="One Minute Apgar Score (by state) flag"; attrib fmapsoflg length=3 label="Five Minute Apgar Score (by state) flag"; attrib attend length=3 label="Person in Attendance"; attrib oterml20 length=3 label="Number of Other Terminations Before 20 Weeks"; attrib otermm20 length=3 label="Number of Other Terminations After 20 Weeks"; attrib omaps length=3 label="One Minute Apgar Score"; attrib omapsr length=3 label="One Minute Apgar Score Recode"; attrib fmaps length=3 label="Five Minute Apgar Score"; attrib fmapsr length=3 label="Five Minute Apgar Score Recode"; attrib origm length=3 label="Origin or Descent of Mother"; attrib origf length=3 label="Origin or Descent of Father"; attrib gestimp length=3 label="Gestation Imputation Flag"; attrib regnres length=3 label="Region of Residence"; attrib regnocc length=3 label="Region of Occurrence"; attrib stoccfip length=$2 label="State of Occurrence (FIPS)"; attrib cntocfip length=$5 label="County of Occurrence (FIPS)"; attrib stresfip length=$2 label="State of Residence (FIPS)"; attrib cntyrfip length=$5 label="County of Residence (FIPS)"; attrib smsarfip length=$4 label="FIPS SMSA of Residence"; attrib recwt length=3 label="Record Weight"; attrib nprev28 length=3 label="Number of Prenatal Visits Recode"; attrib nprev12 length=3 label="Number of Prenatal Visits Recode"; attrib stnatexp length=3 label="Expanded State of Occurrence"; INPUT @1 datayear 1. @2 stresexp 2. @4 reparea $1. @11 rectype 1. @12 restatus 1. @13 stateres $2. @13 cntyres $5. @18 cityres $3. @21 citrspop $1. @22 smsares $3. @25 metrores $1. @26 divres 1. @26 stsubres 2. @28 statenat $2. @28 cntynat $5. @33 divocc 1. @33 stsubocc 2. @35 csex 1. @36 birattnd 1. @37 frace 1. @38 mrace 1. @39 crace 1. @40 crace3 1. @41 dmage 2. @43 mage36 2. @45 mage15 2. @47 mage12 2. @49 mage8 1. @50 mage7 1. @51 mage6 1. @52 nlbnl 2. @54 nlbnd 2. @56 nlbd 2. @58 dtotord 2. @60 totord9 1. @61 dlivord 2. @63 livord9 1. @64 livord8 1. @65 livord7 1. @66 livord6 1. @67 livord3 1. @69 dfage 2. @71 fage11 2. @73 dbirwt 4. @77 birwt12 2. @79 birwt3 1. @80 pldel 1. @81 dplural 1. @82 plural3 1. @83 plural2 1. @84 birmon 2. @86 birday 2. @88 lmpmon 2. @90 lmpday 2. @92 lmpyr $1. @93 dgestat 2. @95 gestat10 2. @97 gestat3 1. @98 dmeduc 2. @100 meduc14 2. @102 meduc6 1. @103 dfeduc 2. @105 feduc14 2. @107 dmar 1. @108 mar2 1. @109 monprec $1. @110 mpre10 2. @112 mpre6 1. @113 llbmon 2. @115 llbyr 2. @117 disllb 3. @120 isllb17 2. @122 isllb10 2. @124 isllb8 1. @125 lfdmon 2. @127 lfdyr 2. @129 lfdflg 1. @130 dlfd 3. @133 dterm 3. @136 term9 1. @137 outcome 1. @138 mplbir 2. @140 nprevis 2. @142 congen 1. @146 marstrflg 1. @147 educstrflg 1. @148 lmprflg 1. @149 monprerflg 1. @150 llbrflg 1. @151 lfdrflg 1. @152 marsmsarflg 1. @153 educsmsarflg 1. @154 congenrflg 1. @155 nprevisrflg 1. @157 ethnicrflg 1. @158 omapsrflg 1. @159 fmapsrflg 1. @161 marstoflg 1. @162 educstoflg 1. @163 lmpoflg 1. @164 monpreoflg 1. @165 llboflg 1. @166 lfdoflg 1. @167 congenflg 1. @168 nprevisoflg 1. @170 ethnicoflg 1. @171 omapsoflg 1. @172 fmapsoflg 1. @176 attend 1. @177 oterml20 2. @179 otermm20 2. @181 omaps 2. @183 omapsr 1. @184 fmaps 2. @186 fmapsr 1. @187 origm 2. @189 origf 2. @191 gestimp 1. @192 regnres 1. @193 regnocc 1. @194 stoccfip $2. @194 cntocfip $5. @199 stresfip $2. @199 cntyrfip $5. @204 smsarfip $4. @208 recwt 1. @209 nprev28 2. @211 nprev12 2. @214 stnatexp 2. ; proc print data=&dataset. (obs=6); proc contents data=&dataset.; ** Copyright 2014 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. ;