********************************************************************* JUNE 3, 2014 11:05 AM This is an example of a SAS program that creates a SAS file from the 2013 NHIS Public Use PARADATA.DAT ASCII file This is stored in PARADATA.SAS *********************************************************************; * USER NOTE: PLACE NEXT STATEMENT IN SUBSEQUENT PROGRAMS; LIBNAME NHIS "C:\NHIS2013"; * USER NOTE: PLACE NEXT STATEMENT IN SUBSEQUENT PROGRAMS IF YOU ALLOW PROGRAM TO PERMANENTLY STORE FORMATS; LIBNAME LIBRARY "C:\NHIS2013"; FILENAME ASCIIDAT 'C:\NHIS2013\PARADATA.dat'; * DEFINE VARIABLE VALUES FOR REPORTS; * USE THE STATEMENT "PROC FORMAT LIBRARY=LIBRARY" TO PERMANENTLY STORE THE FORMAT DEFINITIONS; * USE THE STATEMENT "PROC FORMAT" IF YOU DO NOT WISH TO PERMANENTLY STORE THE FORMATS; PROC FORMAT LIBRARY=LIBRARY; *PROC FORMAT; VALUE $GROUPC ' '< - HIGH = "Range of Values" ; VALUE GROUPN LOW - HIGH = "Range of Values" ; VALUE PAP001X 10 = "10 Household" 20 = "20 Person" 25 = "25 Income Imputation" 30 = "30 Sample Adult" 38 = "38 Functioning and Disability" 40 = "40 Sample Child" 60 = "60 Family" 63 = "63 Family Disability Questions" 65 = "65 Paradata" 70 = "70 Injury/Poisoning Episode" 75 = "75 Injury/Poisoning Verbatim" ; VALUE PAP002X . = '.' OTHER = "Survey Year" ; VALUE PAP004X 1 = "1 Quarter 1" 2 = "2 Quarter 2" 3 = "3 Quarter 3" 4 = "4 Quarter 4" ; VALUE PAP005X 01 = "01 January" 02 = "02 February" 03 = "03 March" 04 = "04 April" 05 = "05 May" 06 = "06 June" 07 = "07 July" 08 = "08 August" 09 = "09 September" 10 = "10 October" 11 = "11 November" 12 = "12 December" ; VALUE PAP007X 201 = "201 Completed interview" 203 = "203 Sufficient partial interview, no follow-up" 213 = "213 Language problem" 215 = "215 Insufficient partial" 216 = "216 No one home, repeated calls" 217 = "217 Temporarily absent, no follow-up" 218 = "218 Refused" 219 = "219 Other Type A" 299 = "299 Occupied entirely by Armed Forces members or by persons with usual residenc e elsewhere, Screened out by Race/Ethnicity" ; VALUE PAP009X 1 = "1 No Sample Adult record in a family due to quality reasons" 2 = "2 No Sample Child record in a family due to quality reasons" 3 = "3 No Sample Adult and Sample Child records in a family due to quality reasons" ; VALUE PAP010X 1 = "1 Family record removed due to quality reasons" ; VALUE PAP017X 0 = "0 None" 1 = "1 1 or more times" ; VALUE PAP067X 0 = "0 Case not reassigned" 1 = "1 Case reassigned" ; VALUE PAP068X 1 = "1 English" 2 = "2 Spanish" 3 = "3 English and Spanish" 4 = "4 Other" 8 = "8 Not ascertained" ; VALUE PAP069X 1 = "1 Yes" 2 = "2 No" ; VALUE PAP071X 1 = "1 Relative" 2 = "2 Neighbor" 3 = "3 Nurse" 4 = "4 Other health care worker" 5 = "5 Other" ; VALUE PAP073X 1 = "1 Definitely agree" 2 = "2 Probably agree" 3 = "3 Probably refuse" 4 = "4 Definitely refuse" ; VALUE PAP074X 1 = "1 Very good" 2 = "2 Good" 3 = "3 Fair" 4 = "4 Poor" 5 = "5 Very poor" 8 = "8 Not ascertained" ; VALUE PAP075X 1 = "1 Interview stopped in progress/Break-off" 2 = "2 Completion before closeout not possible (Other than Break-off)" 8 = "8 Not ascertained" ; VALUE PAP076X 1 = "1 Household Composition Section" 2 = "2 Family Section" 3 = "3 Sample Child Section" 4 = "4 Sample Adult Section" 8 = "8 Not ascertained" ; VALUE PAP077X 01 = "01 Respondent too busy" 02 = "02 Respondent had to leave" 03 = "03 Respondent felt questions were too personal" 04 = "04 Respondent felt interview was too long" 05 = "05 Respondent physically/mentally unable to participate" 06 = "06 Respondent does not like/trust government" 07 = "07 Respondent's relative (spouse/child) did not want him/her to participate" 08 = "08 Language problem" 09 = "09 Computer error" 10 = "10 Phone technology issues (battery died, lost signal, etc.)" 11 = "11 Other" 98 = "98 Not ascertained" ; VALUE PAP078X 01 = "01 Respondent out of town" 02 = "02 Unable to contact Respondent before closeout" 03 = "03 Respondent too busy" 04 = "04 Respondent had to leave" 05 = "05 Respondent felt questions were too personal" 06 = "06 Respondent felt interview was too long" 07 = "07 Respondent physically/mentally unable to participate" 08 = "08 Respondent does not like/trust government" 09 = "09 Respondent's relative (spouse/child) did not want him/her to participate" 10 = "10 Language problem" 11 = "11 Computer error" 12 = "12 Other" ; VALUE PAP079X 1 = "1 Type A" 2 = "2 Type B" 3 = "3 Type C" ; VALUE PAP080X 1 = "1 Refused" 2 = "2 No one home, repeated calls" 3 = "3 Temporarily absent" 4 = "4 Language problem" 5 = "5 Other" 8 = "8 Not ascertained" ; VALUE PAP081X 1 = "1 Yes" 2 = "2 No" 8 = "8 Not ascertained" ; VALUE PAP082X 1 = "1 Gave telephone number" 2 = "2 No telephone" 7 = "7 Refused" 8 = "8 Not ascertained" 9 = "9 Don't know" ; VALUE PAP083X 1 = "1 Yes" 2 = "2 No" 7 = "7 Refused" 8 = "8 Not ascertained" 9 = "9 Don't know" ; VALUE PAP085X 000 = "000 Less than 1 week" 997 = "997 Refused" 998 = "998 Not ascertained" 999 = "999 Don't know" ; VALUE PAP087X 97 = "97 Refused" 98 = "98 Not ascertained" 99 = "99 Don't know" ; VALUE PAP089X 1 = "1 All or almost all calls received on cell phones" 2 = "2 Some received on cell phones and some on regular phones" 3 = "3 Very few or none on cell phones" 7 = "7 Refused" 8 = "8 Not ascertained" 9 = "9 Don't know" ; VALUE PAP090X 1 = "1 Early" 2 = "2 Middle" 3 = "3 Late" ; VALUE PAP092X 1 = "1 Morning" 2 = "2 Afternoon" 3 = "3 Evening" ; VALUE PAP101X 1 = "1 Northeast" 2 = "2 Midwest" 3 = "3 South" 4 = "4 West" ; DATA NHIS.PARADATA; * CREATE A SAS DATA SET; INFILE ASCIIDAT PAD LRECL=135; * DEFINE LENGTH OF ALL VARIABLES; LENGTH /* IDN LENGTHS */ RECTYPE 3 SRVY_YR 4 HHX $ 6 INTV_QRT 3 INTV_MON 3 FMX $ 2 OUTCOME1 4 WTIA_PD 8 QCSASCFM 3 QCFAM 3 /* CHI LENGTHS */ TOTCOUNT 3 MODE_P 3 MODE_T 3 CTSTAT1 3 CTSTAT2 3 CTSTAT3 3 UNABLE1R 3 UNABLE2R 3 UNABLE3R 3 UNABLE4R 3 UNABLE5R 3 UNABLE6R 3 UNABLE8R 3 LANG1R 3 LANG2R 3 LANG3R 3 LANG4R 3 LANG5R 3 RELUC01R 3 RELUC02R 3 RELUC03R 3 RELUC04R 3 RELUC05R 3 RELUC06R 3 RELUC07R 3 RELUC08R 3 RELUC09R 3 RELUC10R 3 RELUC11R 3 RELUC12R 3 RELUC13R 3 RELUC14R 3 RELUC15R 3 RELUC22R 3 RELUC23R 3 STRAT01R 3 STRAT02R 3 STRAT03R 3 STRAT04R 3 STRAT05R 3 STRAT06R 3 STRAT07R 3 STRAT08R 3 STRAT09R 3 STRAT10R 3 STRAT11R 3 STRAT12R 3 STRAT13R 3 STRAT14R 3 STRAT15R 3 STRAT16R 3 STRAT17R 3 STRAT18R 3 STRAT21R 3 STRAT22R 3 STRAT23R 3 REASSIGN 3 /* BCK LENGTHS */ FLNGINTV 3 INTRPT 3 NONRES 3 NONRES2 3 INTMODE 3 RESPOND 3 COOPFAM 3 PARWHY 3 BRKWHER 3 BRKRES1 3 NCOMRES 3 /* FRT LENGTHS */ TYPEABC 3 TYPEA1 3 TYPEB2 3 /* COV LENGTHS */ TELN_FLG 3 CURWRKN 3 RNOSERVN 3 RHLNGDY 4 TELCELN 3 WRKCELN 3 CELLOUT 3 PHONEUSE 3 /* HHC LENGTHS */ ENDPNT 3 STRTPNT 3 HHC_TOD 3 /* FHS LENGTHS */ FMSTRPNT 3 FAM_TOD 3 /* AID LENGTHS */ SASTRPNT 3 SA_TOD 3 /* CID LENGTHS */ SCSTRPNT 3 SC_TOD 3 /* UCF LENGTHS */ STRAT_P 4 PSU_P 3 CENREG 3 ; * INPUT ALL VARIABLES; INPUT /* IDN LOCATIONS */ RECTYPE 1 - 2 SRVY_YR 3 - 6 HHX $ 7 - 12 INTV_QRT 13 - 13 INTV_MON 14 - 15 FMX $ 16 - 17 OUTCOME1 18 - 20 WTIA_PD 21 - 28 .1 QCSASCFM 29 - 29 QCFAM 30 - 30 /* CHI LOCATIONS */ TOTCOUNT 31 - 32 MODE_P 33 - 34 MODE_T 35 - 36 CTSTAT1 37 - 38 CTSTAT2 39 - 40 CTSTAT3 41 - 42 UNABLE1R 43 - 43 UNABLE2R 44 - 44 UNABLE3R 45 - 45 UNABLE4R 46 - 46 UNABLE5R 47 - 47 UNABLE6R 48 - 48 UNABLE8R 49 - 49 LANG1R 50 - 50 LANG2R 51 - 51 LANG3R 52 - 52 LANG4R 53 - 53 LANG5R 54 - 54 RELUC01R 55 - 55 RELUC02R 56 - 56 RELUC03R 57 - 57 RELUC04R 58 - 58 RELUC05R 59 - 59 RELUC06R 60 - 60 RELUC07R 61 - 61 RELUC08R 62 - 62 RELUC09R 63 - 63 RELUC10R 64 - 64 RELUC11R 65 - 65 RELUC12R 66 - 66 RELUC13R 67 - 67 RELUC14R 68 - 68 RELUC15R 69 - 69 RELUC22R 70 - 70 RELUC23R 71 - 71 STRAT01R 72 - 72 STRAT02R 73 - 73 STRAT03R 74 - 74 STRAT04R 75 - 75 STRAT05R 76 - 76 STRAT06R 77 - 77 STRAT07R 78 - 78 STRAT08R 79 - 79 STRAT09R 80 - 80 STRAT10R 81 - 81 STRAT11R 82 - 82 STRAT12R 83 - 83 STRAT13R 84 - 84 STRAT14R 85 - 85 STRAT15R 86 - 86 STRAT16R 87 - 87 STRAT17R 88 - 88 STRAT18R 89 - 89 STRAT21R 90 - 90 STRAT22R 91 - 91 STRAT23R 92 - 92 REASSIGN 93 - 93 /* BCK LOCATIONS */ FLNGINTV 94 - 94 INTRPT 95 - 95 NONRES 96 - 96 NONRES2 97 - 97 INTMODE 98 - 98 RESPOND 99 - 99 COOPFAM 100 - 100 PARWHY 101 - 101 BRKWHER 102 - 102 BRKRES1 103 - 104 NCOMRES 105 - 106 /* FRT LOCATIONS */ TYPEABC 107 - 107 TYPEA1 108 - 108 TYPEB2 109 - 109 /* COV LOCATIONS */ TELN_FLG 110 - 110 CURWRKN 111 - 111 RNOSERVN 112 - 112 RHLNGDY 113 - 115 TELCELN 116 - 116 WRKCELN 117 - 118 CELLOUT 119 - 119 PHONEUSE 120 - 120 /* HHC LOCATIONS */ ENDPNT 121 - 121 STRTPNT 122 - 122 HHC_TOD 123 - 123 /* FHS LOCATIONS */ FMSTRPNT 124 - 124 FAM_TOD 125 - 125 /* AID LOCATIONS */ SASTRPNT 126 - 126 SA_TOD 127 - 127 /* CID LOCATIONS */ SCSTRPNT 128 - 128 SC_TOD 129 - 129 /* UCF LOCATIONS */ STRAT_P 130 - 132 PSU_P 133 - 134 CENREG 135 - 135; * DEFINE VARIABLE LABELS; LABEL /* IDN LABELS */ RECTYPE ="File type identifier" SRVY_YR ="Year of National Health Interview Survey" HHX ="Household identifier" INTV_QRT ="Interview Quarter" INTV_MON ="Interview Month" FMX ="Family number" OUTCOME1 = "Outcome code--restricted to 201, 203, Type A, select Type B codes" WTIA_PD ="Paradata file weight" QCSASCFM = "Sample Adult/Sample Child record removal due to quality reasons" QCFAM ="Family record removed for quality reasons" /* CHI LABELS */ TOTCOUNT ="Total count of CHI records for this case" MODE_P ="Number of personal visit attempts for this case" MODE_T ="Number of telephone attempts for this case" CTSTAT1 ="Number of contacts with sample unit members" CTSTAT2 ="Number of contacts with non-sample unit members" CTSTAT3 ="Number of noncontacts" UNABLE1R ='Number of times "Eligible person not available" was entered' UNABLE2R ='Number of times "Inconvenient time" was entered' UNABLE3R ='Number of times "Respondent is reluctant" was entered' UNABLE4R ='Number of times "Language problem--specify" was entered' UNABLE5R ='Number of times "Health problem" was entered' UNABLE6R ='Number of times "Specify whom you talk with" was entered' UNABLE8R ='Number of times "Other--specify" was entered' LANG1R ='Number of times "Specify language or dialect" was entered' LANG2R = 'Number of times "No household member able to translate" was entered' LANG3R = 'Number of times "Contact RO about language problem" was entered' LANG4R ='Number of times "Unable to find translator" was entered' LANG5R ='Number of times "No time left to find translator" was entered ' RELUC01R = 'Number of times "Not interested/Does not want to be bothered" was entered' RELUC02R ='Number of times "Too busy" was entered' RELUC03R ='Number of times "Interview takes too much time" was entered' RELUC04R = 'Number of times "Breaks appointments (puts FR off indefinitely)" was entered' RELUC05R ='Number of times "Scheduling difficulties" was entered' RELUC06R ='Number of times "Survey is voluntary" was entered' RELUC07R ='Number of times "Privacy concerns" was entered' RELUC08R ='Number of times "Anti-government concerns" was entered' RELUC09R = 'Number of times "Does not understand survey/Asks questions about the survey" wa s entered' RELUC10R ='Number of times "Survey content does not apply" was entered' RELUC11R ='Number of times "Hang-up/slams door on FR" was entered' RELUC12R ='Number of times "Hostile or threatens FR" was entered' RELUC13R = 'Number of times "Other household members tell respondent not to participate" wa s entered' RELUC14R = 'Number of times "Talk only to specific household member" was entered' RELUC15R ='Number of times "Family issues" was entered' RELUC22R ='Number of times "No concerns" was entered' RELUC23R ='Number of times "Other--specify" was entered' STRAT01R ='Number of times "Advance letter given" was entered' STRAT02R ='Number of times "Scheduled appointment" was entered' STRAT03R ='Number of times "Left note/appointment card" was entered' STRAT04R = 'Number of times "Left promotional packet/informational brochure" was entered' STRAT05R ='Number of times "Called household" was entered' STRAT06R = 'Number of times "Left message on answering machine" was entered' STRAT07R = 'Number of times "FR will request No One Home Letter" was entered' STRAT08R ='Number of times "FR will request Refusal Letter" was entered' STRAT09R = 'Number of times "FR will request Better Understanding Letter" was entered' STRAT10R ='Number of times "Called contact persons" was entered' STRAT11R ='Number of times "Stake-out" was entered' STRAT12R ='Number of times "Checked with neighbors" was entered' STRAT13R ='Number of times "Contacted other family members" was entered' STRAT14R ='Number of times "Contacted property manager" was entered' STRAT15R = 'Number of times "Visited county assessor/post office/permit office" was entered ' STRAT16R ='Number of times "On-line tracking database" was entered' STRAT17R ='Number of times "Sought help from SFR/RO" was entered' STRAT18R ='Number of times "Reassignment" was entered' STRAT21R ='Number of times "Used MAF or ALMI" was entered' STRAT22R ='Number of times "None" was entered' STRAT23R ='Number of times "Other--specify" was entered' REASSIGN ="Case reassignment to another interviewer (FR)" /* BCK LABELS */ FLNGINTV ="Language of interview" INTRPT ="Interpreter used" NONRES ="Non-household member respondent" NONRES2 ="Non-household member relationship" INTMODE ="Any sections conducted primarily by telephone" RESPOND ="How likely to respond to later linked survey" COOPFAM ="Assessment of household cooperativeness" PARWHY ="Reason interview not complete" BRKWHER ="Section where break-off occurred" BRKRES1 ="Main reason interview terminated" NCOMRES ="Main reason case not complete" /* FRT LABELS */ TYPEABC ="Type of non-interview initiated from the front section" TYPEA1 ="All Type A non-interviews" TYPEB2 ="Determined to be Type B non-interview by observation only." /* COV LABELS */ TELN_FLG ="Supplied telephone number" CURWRKN ="Working phone inside home" RNOSERVN ="Without telephone service in the past 12 months" RHLNGDY ="Number of days without telephone service" TELCELN ="Working cell phone in family" WRKCELN ="Number of working cell phones" CELLOUT ="Working cell during land-line outage" PHONEUSE ="Received calls cell/landline/both" /* HHC LABELS */ ENDPNT ="Point in the interview period when the case was finished" STRTPNT = "Point in the interview period when the Household Composition section was starte d" HHC_TOD = "Time of day that the Household Composition section was started" /* FHS LABELS */ FMSTRPNT = "Point in the interview period when the Family section was started" FAM_TOD ="Time of day that the Family section was started" /* AID LABELS */ SASTRPNT = "Point in the interview period when the Sample Adult section was started" SA_TOD ="Time of day that the Sample Adult section was started" /* CID LABELS */ SCSTRPNT = "Point in the interview period when the Sample Child section was started" SC_TOD ="Time of day that the Sample Child section was started" /* UCF LABELS */ STRAT_P ="Stratum for variance estimation" PSU_P ="PSU for variance estimation" CENREG ="Census region of residence" ; * ASSOCIATE VARIABLES WITH FORMAT VALUES; * (PUT ASTERISK (*) BEFORE WORD "FORMAT" IN NEXT STATEMENT TO PREVENT FORMAT ASSOCIATIONS BEING STORED WITH DATA SET); FORMAT /* IDN FORMAT ASSOCIATIONS */ RECTYPE PAP001X. SRVY_YR PAP002X. HHX $GROUPC. INTV_QRT PAP004X. INTV_MON PAP005X. OUTCOME1 PAP007X. WTIA_PD GROUPN. QCSASCFM PAP009X. QCFAM PAP010X. /* CHI FORMAT ASSOCIATIONS */ UNABLE1R PAP017X. UNABLE2R PAP017X. UNABLE3R PAP017X. UNABLE4R PAP017X. UNABLE5R PAP017X. UNABLE6R PAP017X. UNABLE8R PAP017X. LANG1R PAP017X. LANG2R PAP017X. LANG3R PAP017X. LANG4R PAP017X. LANG5R PAP017X. RELUC01R PAP017X. RELUC02R PAP017X. RELUC03R PAP017X. RELUC04R PAP017X. RELUC05R PAP017X. RELUC06R PAP017X. RELUC07R PAP017X. RELUC08R PAP017X. RELUC09R PAP017X. RELUC10R PAP017X. RELUC11R PAP017X. RELUC12R PAP017X. RELUC13R PAP017X. RELUC14R PAP017X. RELUC15R PAP017X. RELUC22R PAP017X. RELUC23R PAP017X. STRAT01R PAP017X. STRAT02R PAP017X. STRAT03R PAP017X. STRAT04R PAP017X. STRAT05R PAP017X. STRAT06R PAP017X. STRAT07R PAP017X. STRAT08R PAP017X. STRAT09R PAP017X. STRAT10R PAP017X. STRAT11R PAP017X. STRAT12R PAP017X. STRAT13R PAP017X. STRAT14R PAP017X. STRAT15R PAP017X. STRAT16R PAP017X. STRAT17R PAP017X. STRAT18R PAP017X. STRAT21R PAP017X. STRAT22R PAP017X. STRAT23R PAP017X. REASSIGN PAP067X. /* BCK FORMAT ASSOCIATIONS */ FLNGINTV PAP068X. INTRPT PAP069X. NONRES PAP069X. NONRES2 PAP071X. INTMODE PAP069X. RESPOND PAP073X. COOPFAM PAP074X. PARWHY PAP075X. BRKWHER PAP076X. BRKRES1 PAP077X. NCOMRES PAP078X. /* FRT FORMAT ASSOCIATIONS */ TYPEABC PAP079X. TYPEA1 PAP080X. TYPEB2 PAP081X. /* COV FORMAT ASSOCIATIONS */ TELN_FLG PAP082X. CURWRKN PAP083X. RNOSERVN PAP083X. RHLNGDY PAP085X. TELCELN PAP083X. WRKCELN PAP087X. CELLOUT PAP083X. PHONEUSE PAP089X. /* HHC FORMAT ASSOCIATIONS */ ENDPNT PAP090X. STRTPNT PAP090X. HHC_TOD PAP092X. /* FHS FORMAT ASSOCIATIONS */ FMSTRPNT PAP090X. FAM_TOD PAP092X. /* AID FORMAT ASSOCIATIONS */ SASTRPNT PAP090X. SA_TOD PAP092X. /* CID FORMAT ASSOCIATIONS */ SCSTRPNT PAP090X. SC_TOD PAP092X. /* UCF FORMAT ASSOCIATIONS */ CENREG PAP101X.; RUN; PROC CONTENTS DATA=NHIS.PARADATA; TITLE1 'CONTENTS OF THE 2013 NHIS PARADATA FILE'; PROC FREQ DATA=NHIS.PARADATA NOTITLE; TABLES RECTYPE/LIST MISSING; TITLE1 'FREQUENCY REPORT FOR 2013 NHIS PARADATA FILE'; TITLE2 '(UNWEIGHTED)'; * USER NOTE: TO SEE UNFORMATTED VALUES IN PROCEDURES, ADD THE STATEMENT: FORMAT _ALL_; RUN;