/***************************************************************************** * Stataload_NIS_1995_HOSPITAL_AltWt.Do * This program will load the 1995 NIS ASCII HOSPITAL_AltWt File into Stata. * Because Stata loads the entire file into memory, it may not be possible * to load every data element for large files. If necessary, edit this * program to change the memory size or to load only selected data elements. *****************************************************************************/ *** Set available memory size *** set mem 500m *** Read data elements from the ASCII file *** infix long HOSPID 1- 5 /// double DISCWT 6- 16 /// double HOSPWT 17- 27 /// using "NIS_1995_HOSPITAL_AltWt.ASC" *** Assign labels to the data elements *** label var HOSPID "HCUP hospital identification number" label var DISCWT "Post-1997 weight to discharges in AHA universe" label var HOSPWT "Post-1997 weight to hospitals in AHA universe" *** Convert special values to missing values *** recode DISCWT (-99.99999 -88.88888 -66.66666=.) recode HOSPWT (-99.99999 -88.88888 -66.66666=.) save "NIS_1995_HOSPITAL_AltWt.dta", replace