1 The SAS System 14:12 Friday, April 9, 2004 NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to HARVARD SCHOOL OF PUBLIC HEALTH-INSTRUCTIONAL COMP, Site 0001177014. NOTE: This session is executing on the SunOS 5.9 platform. This message is contained in the SAS news file, and is presented upon initialization. Edit the files "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: SAS initialization used: real time 0.19 seconds cpu time 0.14 seconds 1 *options obs = 100 ; 2 ** by Jean Roth , jroth@nber.org , 2004-04-09 ; 3 ** Note: This program is distributed under the GNU GPL. See end of 4 ** this file and http://www.gnu.org/licenses/ for details. ; 5 options nocenter ; 6 options formdlim = " " ; 7 libname in './' ; NOTE: Libref IN was successfully assigned as follows: Engine: V8 Physical Name: /disk/nber10/SCCS/natality/pop 8 9 filename raw pipe "unzip -p ./stintasr.zip" ; 10 DATA stintasr ; 11 infile raw ; 12 ATTRIB 13 stresfip length = 3 label = "FIPS State Code" 14 year length = 3 label = "Year (Last digit, 1,2,...9)" 15 rachis length = 3 label = "Race/Hispanic Origin Code" 16 sex length = 3 label = "Sex" 17 age0_4 length = 5 label = "Age 0-4" 18 age5_9 length = 5 label = "Age 5-9" 19 age10_14 length = 5 label = "Age 10-14" 20 age15_19 length = 5 label = "Age 15-19" 21 age20_24 length = 5 label = "Age 20-24" 22 age25_29 length = 5 label = "Age 25-29" 23 age30_34 length = 5 label = "Age 30-34" 24 age35_39 length = 5 label = "Age 35-39" 25 age40_44 length = 5 label = "Age 40-44" 26 age45_49 length = 5 label = "Age 45-49" 27 age50_54 length = 5 label = "Age 50-54" 28 age55_59 length = 5 label = "Age 55-59" 29 age60_64 length = 5 label = "Age 60-64" 30 age65_69 length = 5 label = "Age 65-69" 31 age70_74 length = 5 label = "Age 70-74" 32 age75_79 length = 5 label = "Age 75-79" 33 age80_84 length = 5 label = "Age 80-84" 34 age85p length = 5 label = "Age 85+" 35 ; 36 INPUT 2 The SAS System 14:12 Friday, April 9, 2004 37 @1 stresfip 2. 38 @3 year 1. 39 @4 rachis 1. 40 @5 sex 1. 41 @6 age0_4 7. 42 @13 age5_9 7. 43 @20 age10_14 7. 44 @27 age15_19 7. 45 @34 age20_24 7. 46 @41 age25_29 7. 47 @48 age30_34 7. 48 @55 age35_39 7. 49 @62 age40_44 7. 50 @69 age45_49 7. 51 @76 age50_54 7. 52 @83 age55_59 7. 53 @90 age60_64 7. 54 @97 age65_69 7. 55 @104 age70_74 7. 56 @111 age75_79 7. 57 @118 age80_84 7. 58 @125 age85p 7. 59 ; 60 year = year + 1980 ; 61 if rachis in ( 1 , 5 ) then do ; mrace5 = 1 ; end ; 62 else if rachis in ( 2 , 6 ) then do ; mrace5 = 2 ; end ; 63 else if rachis in ( 3 , 7 ) then do ; mrace5 = 3 ; end ; 64 else if rachis in ( 4 , 8 ) then do ; mrace5 = 4 ; end ; 65 else do ; mrace5 = 5 ; end ; 66 hispr2 = 1 ; 67 if rachis >= 5 and rachis <= 8 then do ; 68 hispr2 = 2 ; 69 end ; 70 ** keep "childbearing age" variables for females only ; NOTE: The infile RAW is: Pipe command="unzip -p ./stintasr.zip" NOTE: 7344 records were read from the infile RAW. The minimum record length was 132. The maximum record length was 132. NOTE: The data set WORK.STINTASR has 7344 observations and 24 variables. NOTE: DATA statement used: real time 1.17 seconds cpu time 0.98 seconds 71 data stintasr ( drop = sex age45_49 -- age85p ) ; 72 set stintasr ; 73 if sex = 2 ; 74 NOTE: There were 7344 observations read from the data set WORK.STINTASR. NOTE: The data set WORK.STINTASR has 3672 observations and 14 variables. NOTE: DATA statement used: real time 0.07 seconds cpu time 0.07 seconds 3 The SAS System 14:12 Friday, April 9, 2004 75 proc print data = stintasr ( obs = 12 ) ; 76 title "Raw data" ; 77 run; NOTE: There were 12 observations read from the data set WORK.STINTASR. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used: real time 0.15 seconds cpu time 0.03 seconds 78 79 data stintasr ( drop = i rachis age0_4 -- age10_14 age15_19 -- age40_44 source ) ; 80 set stintasr ; 81 array age age15_19 -- age40_44 ; 82 do i = 1 to dim(age) ; 83 pop4 = age(i) ; 84 source = vname(age(i)) ; 85 if i = 1 then do ; mage8 = 2 ; end ; 86 else if i = 2 then do ; mage8 = 3 ; end ; 87 else if i = 3 then do ; mage8 = 4 ; end ; 88 else if i = 4 then do ; mage8 = 5 ; end ; 89 else if i = 5 then do ; mage8 = 6 ; end ; 90 else if i = 6 then do ; mage8 = 7 ; end ; 91 output ; 92 end ; NOTE: There were 3672 observations read from the data set WORK.STINTASR. NOTE: The data set WORK.STINTASR has 22032 observations and 6 variables. NOTE: DATA statement used: real time 0.15 seconds cpu time 0.16 seconds 93 proc sort data = stintasr ; 94 by year stresfip mage8 hispr2 mrace5 ; NOTE: There were 22032 observations read from the data set WORK.STINTASR. NOTE: The data set WORK.STINTASR has 22032 observations and 6 variables. NOTE: PROCEDURE SORT used: real time 0.24 seconds cpu time 0.25 seconds 95 proc print data = stintasr ( obs = 12 ) ; 96 var year stresfip mage8 hispr2 mrace5 pop4 ; 97 title "Transposed, sorted data" ; 98 run ; NOTE: There were 12 observations read from the data set WORK.STINTASR. NOTE: The PROCEDURE PRINT printed page 2. NOTE: PROCEDURE PRINT used: real time 0.00 seconds cpu time 0.01 seconds 99 4 The SAS System 14:12 Friday, April 9, 2004 100 data in.pop81 in.pop82 in.pop83 in.pop84 in.pop85 in.pop86 in.pop87 in.pop88 in.pop89 in.popoth ; 101 set stintasr ; 102 if year = 1981 then output in.pop81 ; 103 else if year = 1982 then output in.pop82 ; 104 else if year = 1983 then output in.pop83 ; 105 else if year = 1984 then output in.pop84 ; 106 else if year = 1985 then output in.pop85 ; 107 else if year = 1986 then output in.pop86 ; 108 else if year = 1987 then output in.pop87 ; 109 else if year = 1988 then output in.pop88 ; 110 else if year = 1989 then output in.pop89 ; 111 else output in.popoth ; 112 113 /* 114 Copyright 2004 shared by the National Bureau of Economic Research and Jean Roth 115 116 National Bureau of Economic Research. 117 1050 Massachusetts Avenue 118 Cambridge, MA 02138 119 jroth@nber.org 120 121 This program and all programs referenced in it are free software. You 122 can redistribute the program or modify it under the terms of the GNU 123 General Public License as published by the Free Software Foundation; 124 either version 2 of the License, or (at your option) any later version. 125 126 This program is distributed in the hope that it will be useful, 127 but WITHOUT ANY WARRANTY; without even the implied warranty of 128 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 129 GNU General Public License for more details. 130 131 You should have received a copy of the GNU General Public License 132 along with this program; if not, write to the Free Software 133 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 134 USA. 135 */ 136 NOTE: There were 22032 observations read from the data set WORK.STINTASR. NOTE: The data set IN.POP81 has 2448 observations and 6 variables. NOTE: The data set IN.POP82 has 2448 observations and 6 variables. NOTE: The data set IN.POP83 has 2448 observations and 6 variables. NOTE: The data set IN.POP84 has 2448 observations and 6 variables. NOTE: The data set IN.POP85 has 2448 observations and 6 variables. NOTE: The data set IN.POP86 has 2448 observations and 6 variables. NOTE: The data set IN.POP87 has 2448 observations and 6 variables. NOTE: The data set IN.POP88 has 2448 observations and 6 variables. NOTE: The data set IN.POP89 has 2448 observations and 6 variables. NOTE: The data set IN.POPOTH has 0 observations and 6 variables. NOTE: DATA statement used: real time 1.33 seconds cpu time 0.73 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 3.68 seconds cpu time 2.44 seconds 5 The SAS System 14:12 Friday, April 9, 2004