********************************************************************* 14JUN2000:10:05:35 THIS IS AN EXAMPLE OF A SAS PROGRAM THAT CREATES A SAS FILE FROM THE NHIS 1998 PREVCHLD.DAT ASCII FILE NOTE: THE FORMAT DEFINITIONS GIVEN BELOW WILL RESULT IN PROCEDURE OUTPUT SHOWING VALUES THAT HAVE BEEN GROUPED AS THEY ARE SHOWN IN THE FILE LAYOUT DOCUMENTATION THIS IS STORED IN PREVCHLD.SAS *********************************************************************; * USER NOTE: PLACE NEXT TWO STATEMENTS IN SUBSEQUENT PROGRAMS; LIBNAME NHIS 'C:\NHIS1998\'; LIBNAME LIBRARY 'C:\NHIS1998\'; * DEFINE VARIABLE VALUES FOR REPORTS; PROC FORMAT LIBRARY=LIBRARY; VALUE PCP001X 45 = "Prevention Sample Child" ; VALUE PCP002X 1998 = "1998" ; VALUE $PCP004X "01" - "30" = "Family number 1-30" ; VALUE $PCP005X "01" - "30" = "Person number 1 thru 30" ; VALUE $PCP006X "01" - "30" = "Person number (of respondent)" "99" = "Unknown" ; VALUE PCP007X 01 = "Parent (Biological, adoptive, or step)" 02 = "Grandparent" 03 = "Aunt/Uncle" 04 = "Brother/Sister" 05 = "Other relative" 06 = "Legal guardian" 07 = "Foster parent" 08 = "Other non-relative" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE PCP008X 1 = "Quarter 1" 2 = "Quarter 2" 3 = "Quarter 3" 4 = "Quarter 4" ; VALUE PCP009X 1 = "Male" 2 = "Female" ; VALUE PCP010X 00 = "Under 1 year" 01 - 17 = "1-17 years" ; VALUE PCP011X 1 = "Under 5 years" 2 = "5-17 years" ; VALUE PCP012X 1 = "Under 6 years" 2 = "6-16 years" 3 = "17 years" ; VALUE PCP013X 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE PCP014X 00 = "Multiple Hispanic" 01 = "Puerto Rican" 03 = "Mexican-Mexicano" 04 = "Mexican-American (includes Chicano)" 05 = "Cuban/Cuban-American" 06 = "Other Latin American" 07 = "Other Spanish" 08 = "Hispanic/Spanish, non-specific type" 09 = "Hispanic/Spanish, type refused" 10 = "Hispanic/Spanish, type not ascertained" 11 = "Hispanic/Spanish, type don't know" 12 = "Not Hispanic/Spanish origin" ; VALUE PCP015X 01 = "White" 02 = "Black/African American" 03 = "Indian (American) (includes Eskimo, Aleut)" 06 = "Chinese" 07 = "Filipino" 12 = "Asian Indian" 15 = "Other API*" 16 = "Other race" 17 = "Multiple race" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE PCP016X 1 = "White" 2 = "Black" 3 = "Other" ; VALUE PCP017X 1 = "White" 2 = "Black" 3 = "AIAN*" 4 = "API*" 5 = "Other" 6 = "Multiple race" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE PCP018X 1 = "Hispanic" 2 = "Non-Hispanic White" 3 = "Non-Hispanic Black" 4 = "Non-Hispanic Other" ; VALUE PCP019X 01 = "Household reference person" 02 = "Spouse (husband/wife)" 03 = "Unmarried Partner" 04 = "Child (biological/adoptive/in-law/step/foster)" 05 = "Child of partner" 06 = "Grandchild" 07 = "Parent (bio./adoptive/in-law/step/foster)" 08 = "Brother/sister (bio./adop./in-law/step/foster)" 09 = "Grandparent (Grandmother/Grandfather)" 10 = "Aunt/Uncle" 11 = "Niece/Nephew" 12 = "Other relative" 13 = "Housemate/roommate" 14 = "Roomer/Boarder" 15 = "Other nonrelative" 16 = "Legal guardian" 17 = "Ward" 97 = "Refused" 99 = "Don't know" ; VALUE $PCP020X "01" - "30" = "Person number 1 thru 30" "98" = "Not ascertained" ; VALUE PCP021X 01 = "Family reference person" 02 = "Spouse (husband/wife)" 03 = "Unmarried Partner" 04 = "Child (biological/adoptive/in-law/step/foster)" 05 = "Child of partner" 06 = "Grandchild" 07 = "Parent (bio./adoptive/in-law/step/foster)" 08 = "Brother/sister (bio./adop./in-law/step/foster)" 09 = "Grandparent (Grandmother/Grandfather)" 10 = "Aunt/Uncle" 11 = "Niece/Nephew" 12 = "Other relative" 13 = "Housemate/roommate" 14 = "Roomer/Boarder" 15 = "Other nonrelative" 16 = "Legal guardian" 17 = "Ward" 97 = "Refused" 99 = "Don't know" ; VALUE $PCP023X "00" = "No mother in household" "01" - "30" = "Person number (of mother)" "96" = "Has legal guardian" "97" = "Refused" "98" = "Not ascertained" "99" = "Don't know" ; VALUE PCP024X 1 = "Biological" 2 = "Step" 3 = "Adoptive" 4 = "Foster" 5 = "In-law" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE $PCP025X "00" = "No father in household" "01" - "30" = "Person number (of father )" "96" = "Has legal guardian" "97" = "Refused" "98" = "Not ascertained" "99" = "Don't know" ; VALUE PCP027X 1 = "Mother, no father" 2 = "Father, no mother" 3 = "Mother and father" 4 = "Neither mother nor father" 9 = "Unknown" ; VALUE $PCP028X "00" = "Guardian is not a household member" "01" - "30" = "Person number of guardian" "97" = "Refused" "98" = "Not ascertained" "99" = "Don't know" " " = "" ; VALUE PCP029X 01 - 30 = "01-30 persons" ; VALUE PCP030X 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 PCP032X 00 = "Never attended/ kindergarten only" 01 - 11 = "Grades 1 - 11" 12 = "12th grade, no diploma" 13 = "HIGH SCHOOL GRADUATE" 14 = "GED or equivalent" 15 = "Some college, no degree" 16 = "AA degree: technical or vocational" 17 = "AA degree: academic program" 18 = "Bachelor's degree (BA, AB, BS, BBA)" 19 = "Master's degree (MA, MS, MEng, MEd, MBA)" 20 = "Professional degree (MD, DDS, DVM, JD)" 21 = "Doctoral degree (PhD, EdD)" 96 = "Child under 5 years old" 97 = "Refused" 98 = "Not Ascertained" 99 = "Don't know" ; VALUE PCP033X 01 = "Less/equal to 8th grade" 02 = "9-12th grade, no high school diploma" 03 = "High school graduate/GED recipient" 04 = "Some college, no degree" 05 = "AA degree, technical or vocational" 06 = "AA degree, academic program" 07 = "Bachelor's degree" 08 = "Master's, professional, or doctoral degree" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PCP035X 01 = "$20,000 or more" 02 = "Less than $20,000" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE PCP036X 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 PCP037X 1 = "Northeast" 2 = "Midwest" 3 = "South" 4 = "West" ; VALUE PCP038X 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 PCP043X 1 = "Dummy record" 0 = "Not a dummy record" ; VALUE PCP044X 00 = "At birth" 01 = "Less than or equal to 1 year old" 02 - 17 = "2-17 years old" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PCP045X 1 = "Before" 2 = "After" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PCP046X 01 - 94 = "01-94" 95 = "95+" 96 = "Since birth" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PCP047X 1 = "Day(s)" 2 = "Week(s)" 3 = "Month(s)" 4 = "Year(s)" 6 = "Since birth" 7 = "Refused" 8 = "Not Ascertained" 9 = "Don't Know" . = "" ; VALUE PCP048X 00 = "Less than 1 year" 01 - 17 = "01-17" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PCP049X 00 = "None" 01 - 95 = "01-95 Times" 97 = "Refused" 98 = "Not Ascertained" 99 = "Don't know" . = "" ; VALUE PCP050X 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PCP051X 00 = "Less than one full month" 01 - 12 = "01-12 months" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PCP054X 00 = "None" 01 - 14 = "01-14 days" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PCP057X 0 = "Fluoride prescription" 1 = "Fluoride non-prescription" 2 = "Prescription non-fluoride/DK fluoride" 3 = "Non-fluoride non-prescription brand name" 4 = "Non-fluoride non-prescription generic store bra" 5 = "Non-fluoride homemade rinse" 6 = "Other" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PCP062X 1 = "All or most of the time" 2 = "Some of the time" 3 = "Once in a while" 4 = "Never" 5 = "Doesn't ride in a car" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PCP075X 1 = "All or most or the time" 2 = "Some of the time" 3 = "Once in a while" 4 = "Never" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; DATA NHIS.PREVCHLD; * CREATE A SAS DATA SET STORED IN DIR 'C:\NHIS1998\'; INFILE 'C:\NHIS1998\PREVCHLD.DAT' MISSOVER TRUNCOVER LRECL=140; * DEFINE LENGTH OF NUMERIC VARIABLES; LENGTH RECTYPE 3 SRVY_YR 4 CSRELTIV 3 INTV_QRT 3 SEX 3 AGE_P 3 R_AGE1 3 R_AGE2 3 ORIGIN 3 HISPAN_P 3 MRACE_P 3 RACEREC 3 RACE 3 HISPCODE 3 RRP 3 FRRP 3 MOM_DEG 3 DAD_DEG 3 PARENTS 3 FM_SIZE 3 FM_TYPE 3 FM_STRCP 3 EDUC 3 MOM_ED 3 DAD_ED 3 AB_BL20K 3 RAT_CAT 3 REGION 3 MSASIZEP 3 WTIA_CP 8 WTFA_CP 8 STRATUM 4 PSU 3 DUMMY_CP 3 CKHEAR 3 BIR03 3 DIAG_NUM 3 DIAG_TP 3 DIAG_YR 3 DIAR 3 CARE 3 CCAREMON 3 BTLFD1 3 BTLFD2 3 BTLFD2W 3 DENSL 3 CORW 3 CORWB_R1 3 CORWFL 3 CORWPG 3 CORVTM 3 SEAT 3 BUC1 3 BUC2 3 BUC3 3 PLAY 3 SPRT_FTB 3 SPRT_BAS 3 SPRT_SOC 3 SPRT_RUG 3 SPRT_HOC 3 SPRT_LAC 3 SPRT_WRE 3 SPRT_BOX 3 SPRT_KAR 3 FOOT_M 3 FOOT_H 3 BASE_M 3 BASE_H 3 SOCC_M 3 SOCC_H 3 RUGB_M 3 RUGB_H 3 HOCK_M 3 HOCK_H 3 LACR_M 3 LACR_H 3 WRES_M 3 WRES_H 3 BOX_M 3 BOX_H 3 KAR_M 3 KAR_H 3 ; * INPUT ALL VARIABLES; INPUT RECTYPE 1 - 2 SRVY_YR 3 - 6 HHX $ 7 - 12 FMX $ 13 - 14 PX $ 15 - 16 CSRESPNO $ 17 - 18 CSRELTIV 19 - 20 INTV_QRT 21 - 21 SEX 22 - 22 AGE_P 23 - 24 R_AGE1 25 - 25 R_AGE2 26 - 26 ORIGIN 27 - 27 HISPAN_P 28 - 29 MRACE_P 30 - 31 RACEREC 32 - 32 RACE 33 - 33 HISPCODE 34 - 34 RRP 35 - 36 HH_REF $ 37 - 38 FRRP 39 - 40 FM_REF $ 41 - 42 MOTHER $ 43 - 44 MOM_DEG 45 - 45 FATHER $ 46 - 47 DAD_DEG 48 - 48 PARENTS 49 - 49 GUARD $ 50 - 51 FM_SIZE 52 - 53 FM_TYPE 54 - 54 FM_STRCP 55 - 56 EDUC 57 - 58 MOM_ED 59 - 60 DAD_ED 61 - 62 AB_BL20K 63 - 64 RAT_CAT 65 - 66 REGION 67 - 67 MSASIZEP 68 - 68 WTIA_CP 69 - 74 .1 WTFA_CP 75 - 80 STRATUM 81 - 83 PSU 84 - 84 DUMMY_CP 85 - 85 CKHEAR 86 - 87 BIR03 88 - 88 DIAG_NUM 89 - 90 DIAG_TP 91 - 91 DIAG_YR 92 - 93 DIAR 94 - 95 CARE 96 - 96 CCAREMON 97 - 98 BTLFD1 99 - 99 BTLFD2 100 - 100 BTLFD2W 101 - 102 DENSL 103 - 103 CORW 104 - 104 CORWB_R1 105 - 105 CORWFL 106 - 106 CORWPG 107 - 107 CORVTM 108 - 108 SEAT 109 - 109 BUC1 110 - 110 BUC2 111 - 111 BUC3 112 - 112 PLAY 113 - 113 SPRT_FTB 114 - 114 SPRT_BAS 115 - 115 SPRT_SOC 116 - 116 SPRT_RUG 117 - 117 SPRT_HOC 118 - 118 SPRT_LAC 119 - 119 SPRT_WRE 120 - 120 SPRT_BOX 121 - 121 SPRT_KAR 122 - 122 FOOT_M 123 - 123 FOOT_H 124 - 124 BASE_M 125 - 125 BASE_H 126 - 126 SOCC_M 127 - 127 SOCC_H 128 - 128 RUGB_M 129 - 129 RUGB_H 130 - 130 HOCK_M 131 - 131 HOCK_H 132 - 132 LACR_M 133 - 133 LACR_H 134 - 134 WRES_M 135 - 135 WRES_H 136 - 136 BOX_M 137 - 137 BOX_H 138 - 138 KAR_M 139 - 139 KAR_H 140 - 140; * DEFINE VARIABLE LABELS; LABEL RECTYPE ="Record Type" SRVY_YR ="Survey Year" HHX ="Household Serial Number" FMX ="Family Serial Number" PX ="Person Number" CSRESPNO ="Sample child respondent's person number" CSRELTIV ="Person's relationship to child" INTV_QRT ="Interview Quarter" SEX ="Sex" AGE_P ="Age" R_AGE1 ="Age Recode #1" R_AGE2 ="Age Recode #2" ORIGIN ="Hispanic Ethnicity" HISPAN_P ="Hispanic subgroup detail" MRACE_P ="Race coded to a single race group" RACEREC ="Race Recode" RACE ="OMB groups w/multiple race" HISPCODE ="Combined race/ethnicity recode" RRP ="Relationship to HH reference person" HH_REF ="Person # of HH reference person" FRRP ="Rel to family ref person" FM_REF ="Person # of family reference person" MOTHER ="Mother's person number" MOM_DEG ="Type of relationship with Mother" FATHER ="Father's person number" DAD_DEG ="Type of relationship with Father" PARENTS ="Parent(s) present in the family" GUARD ="Person number of guardian" FM_SIZE ="Number of persons in family" FM_TYPE ="Family Type (on the person-level)" FM_STRCP ="Family Structure (at the person-level)" EDUC ="Highest level of school completed" MOM_ED ="Education of Mother" DAD_ED ="Education of Father" AB_BL20K ="Fam inc at/above vs. below $20,000" RAT_CAT ="Ratio of fam inc to poverty threshold" REGION ="Region" MSASIZEP ="Geographic Distribution - MSA size" WTIA_CP ="Weight - Interim Annual" WTFA_CP ="Weight - Final Annual" STRATUM ="Stratum for variance estimation" PSU ="PSU for variance estimation" DUMMY_CP ="Dummy Record Flag for Prevention Child" CKHEAR ="Age when began having hearing prob" BIR03 ="Hearing prob start before/after 3rd birt" DIAG_NUM ="Age hearing prob diag by Dr: # units" DIAG_TP ="Age hearing prob diag by Dr: Time units" DIAG_YR ="Age hearing prob diag by Dr: # units" DIAR ="Times cut act due to diarrhea, past 12 m" CARE ="Had child care w/GT 6 kids, past 12 m" CCAREMON ="Length of child care" BTLFD1 ="Ever been bottle fed" BTLFD2 ="Still use a bottle" BTLFD2W ="# days put to bed w/bottle, past 2 wks" DENSL ="Had dental sealants painted on teeth" CORW ="Used mouthwash/rinse, past 2 wks" CORWB_R1 ="Type of mouthwash/rinse past 2 wks" CORWFL ="Respondent report mouthwash w/fluoride" CORWPG ="In fluoride mouthrinse pgm at school" CORVTM ="Take Fluoride supplements" SEAT ="Have child safety seat now" BUC1 ="How often secured in safety seat/belt" BUC2 ="How often wear seat belt" BUC3 ="How often wear seat belt" PLAY ="Play any organized sports, past 12 m" SPRT_FTB ="Played football" SPRT_BAS ="Played baseball" SPRT_SOC ="Played soccer" SPRT_RUG ="Played rugby" SPRT_HOC ="Played hockey" SPRT_LAC ="Played lacrosse" SPRT_WRE ="Played wrestling" SPRT_BOX ="Played boxing" SPRT_KAR ="Played karate/judo" FOOT_M ="How often wore mouth guard, past 12 m" FOOT_H ="How often wore head gear, past 12 m" BASE_M ="How often wore mouth guard, past 12 m" BASE_H ="How often wore head gear, past 12 m" SOCC_M ="How often wore mouth guard, past 12 m" SOCC_H ="How often wore head gear, past 12 m" RUGB_M ="How often wore mouth guard, past 12 m" RUGB_H ="How often wore head gear, past 12 m" HOCK_M ="How often wore mouth guard, past 12 m" HOCK_H ="How often wore head gear, past 12 m" LACR_M ="How often wore mouth guard, past 12 m" LACR_H ="How often wore head gear, past 12 m" WRES_M ="How often wore mouth guard, past 12 m" WRES_H ="How often wore head gear, past 12 m" BOX_M ="How often wore mouth guard, past 12 m" BOX_H ="How often wore head gear, past 12 m" KAR_M ="How often wore mouth guard, past 12 m" KAR_H ="How often wore head gear, past 12 m" ; * ASSOCIATE VARIABLES WITH FORMAT VALUES; FORMAT RECTYPE PCP001X. SRVY_YR PCP002X. FMX $PCP004X. PX $PCP005X. CSRESPNO $PCP006X. CSRELTIV PCP007X. INTV_QRT PCP008X. SEX PCP009X. AGE_P PCP010X. R_AGE1 PCP011X. R_AGE2 PCP012X. ORIGIN PCP013X. HISPAN_P PCP014X. MRACE_P PCP015X. RACEREC PCP016X. RACE PCP017X. HISPCODE PCP018X. RRP PCP019X. HH_REF $PCP020X. FRRP PCP021X. FM_REF $PCP020X. MOTHER $PCP023X. MOM_DEG PCP024X. FATHER $PCP025X. DAD_DEG PCP024X. PARENTS PCP027X. GUARD $PCP028X. FM_SIZE PCP029X. FM_TYPE PCP030X. EDUC PCP032X. MOM_ED PCP033X. DAD_ED PCP033X. AB_BL20K PCP035X. RAT_CAT PCP036X. REGION PCP037X. MSASIZEP PCP038X. DUMMY_CP PCP043X. CKHEAR PCP044X. BIR03 PCP045X. DIAG_NUM PCP046X. DIAG_TP PCP047X. DIAG_YR PCP048X. DIAR PCP049X. CARE PCP050X. CCAREMON PCP051X. BTLFD1 PCP050X. BTLFD2 PCP050X. BTLFD2W PCP054X. DENSL PCP013X. CORW PCP013X. CORWB_R1 PCP057X. CORWFL PCP050X. CORWPG PCP050X. CORVTM PCP013X. SEAT PCP050X. BUC1 PCP062X. BUC2 PCP062X. BUC3 PCP062X. PLAY PCP050X. SPRT_FTB PCP050X. SPRT_BAS PCP050X. SPRT_SOC PCP050X. SPRT_RUG PCP050X. SPRT_HOC PCP050X. SPRT_LAC PCP050X. SPRT_WRE PCP050X. SPRT_BOX PCP050X. SPRT_KAR PCP050X. FOOT_M PCP075X. FOOT_H PCP075X. BASE_M PCP075X. BASE_H PCP075X. SOCC_M PCP075X. SOCC_H PCP075X. RUGB_M PCP075X. RUGB_H PCP075X. HOCK_M PCP075X. HOCK_H PCP075X. LACR_M PCP075X. LACR_H PCP075X. WRES_M PCP075X. WRES_H PCP075X. BOX_M PCP075X. BOX_H PCP075X. KAR_M PCP075X. KAR_H PCP075X.; PROC CONTENTS DATA=NHIS.PREVCHLD; PROC FREQ DATA=NHIS.PREVCHLD; TITLE1 'FREQUENCY REPORT FOR 1998 NHIS PREVCHLD FILE'; TITLE2 '(WEIGHTED)'; TABLES RACEREC * SEX/LIST MISSING; WEIGHT WTFA_CP ; PROC FREQ DATA=NHIS.PREVCHLD; TITLE1 'FREQUENCY REPORT FOR 1998 NHIS PREVCHLD FILE'; TITLE2 '(UNWEIGHTED)'; TABLES RACEREC * SEX/LIST MISSING; * USER NOTE: TO SEE UNFORMATTED VALUES IN PROCEDURES, ADD THE STATEMENT: FORMAT _ALL_; RUN;