NOTES: THIS PROGRAM ASSUMES THAT THE ASCII DATA FILE IS IN STATA"S WORKING DIRECTORY. AN EXAMPLE OF HOW TO CHANGE THE WORKING DIRECTORY WITHIN STATA IS THE FOLLOWING COMMAND: cd "C:\Feasibility Study Data\" *IMPORTANT INFORMATION REGARDING THE SURVEY ID VARIABLE: FOR WFL USE PUBLICID AS THE ID VARIABLE FOR RUEC USE SEQN AS THE ID VARIABLE FOR RUWC USE RESNUM AS THE ID VARIABLE *********************************************************************/ # delimit ; clear; /* CHANGE WORKING DIRECTORY TO FIND FILE */ cd "C:\Feasibility Study Data\"; /*READ IN THE LINKED NCHS-SSA (FINAL) FEASIBILITY STUDY ASCII FILE */ /* INPUT ALL NEW VARIABLES */ infix str PUBLICID 1-14 SEQN 1-5 RESNUM 1-7 /* FOR WFL 1985 RESNUM SHOULD BE CREATED USING POSITIONS 1 - 7 */ RESNUM 1-6 /* FOR DUL 1995 1997 AND 2004 RESNUM SHOULD BE CREATED USING POSITIONS 1 - 6 */ SSA_MATCH 15 ON_MBR_FLAG 16 ON_SSR_FLAG 17 ON_PHUS_FLAG 18 ON_831_FLAG 19 ON_QOC_FLAG 20 using MEDICAID_FEASIBILITY_[survey name].dat ; /* DEFINE VARIABLE LABELS */ label variable publicid "NCHS SURVEY ID NUMBER"; label variable seqn "SAMPLE SEQUENCE NUMBER (PUBLIC ID)"; label variable resnum "WILDFIRE SURVEY IDENTIFIER - RESIDENT RECORD NUMBER"; label variable SSA_MATCH "SSA MATCH STATUS"; label variable ON_MBR_FLAG "ON MBR FILE INDICATOR"; label variable ON_SSR_FLAG "ON SSR FILE INDICATOR"; label variable ON_PHUS_FLAG "ON PHUS FILE INDICATOR"; label variable ON_831_FLAG "ON 831 FILE INDICATOR"; label variable ON_QOC_FLAG "ON QOC FILE INDICATOR"; /* FORMAT ZERO FILL ID VARIABLES */ /*format SEQN %05.0f */ /*format RESNUM %06.0f */ /*format RESNUM %07.0f */ /* DISPLAY OVERALL DESCRIPTION OF FILE */ describe; codebook,all; /* DATA FILE IS STORED IN FEASIBILITY.DTA */ save feasibilty.dta, replace; #delimit cr