/************************************************************************************************/ /* Stata User File for HC16CF1 Data */ /* */ /* This file contains information and a sample Stata program to create a permanent */ /* Stata dataset for users who want to use Stata in processing the MEPS data provided */ /* in this PUF release. Stata (StataCorp) has the capability to produce */ /* appropriate standard errors for estimates from a survey with a complex sample */ /* design such as the Medical Expenditure Panel Survey (MEPS). */ /* The input file for creating a permanent Stata dataset is the ASCII data file */ /* (HC16CF1.DAT) supplied in this PUF release, which in turn can be extracted from the */ /* .EXE file. After entering the Stata interactive environment access the Stata DO-File */ /* editor by clicking on the appropriate icon in the command line at the top of the */ /* screen. Copy and paste the following Stata commands into the editor and save as a */ /* DO file. A DO file is a Stata program which may then be executed using the DO command. */ /* For example, if the DO file is named HC16CF1.DO and is located in the directory */ /* C:\MEPS\PROG, then the file may be executed by typing the following command into */ /* the Stata command line: */ /* do C:\MEPS\PROG\HC16CF1.DO */ /* The program below will output the Stata dataset HC16CF1.DTA */ /************************************************************************************************/ #delimit ; cd C:\MEPS\DATA; log using HC16CF1.log, replace; clear; * INPUT ALL VARIABLES; infix long DUID 1-5 int PID 6-8 str DUPERSID 9-16 str EVNTIDX 17-28 byte EVENTRN 29-29 str FFEEIDX 30-41 byte OMTYPEX 42-43 byte OMTYPE 44-45 str OMOTHOX 46-70 str OMOTHOS 71-95 byte FFOMTYPE 96-97 byte FFBEF97 98-99 byte FFTOT98 100-101 double OMSF97X 102-109 double OMMR97X 110-116 double OMMD97X 117-123 double OMPV97X 124-131 double OMVA97X 132-139 double OMCH97X 140-145 double OMOF97X 146-151 double OMSL97X 152-158 double OMWC97X 159-165 double OMOR97X 166-172 double OMOU97X 173-178 double OMOT97X 179-186 double OMXP97X 187-194 double OMTC97X 195-202 byte IMPOMSLF 203-204 byte IMPOMMCR 205-206 byte IMPOMMCD 207-208 byte IMPOMPRV 209-210 byte IMPOMVA 211-212 byte IMPOMCHM 213-214 byte IMPOMOFD 215-216 byte IMPOMSTL 217-218 byte IMPOMWCP 219-220 byte IMPOMOPR 221-222 byte IMPOMOPU 223-224 byte IMPOMOTH 225-226 byte IMPOMCHG 227-228 double WTDPER97 229-240 int VARSTR97 241-243 byte VARPSU97 244-245 using HC16CF1.dat; *DEFINE VARIABLE LABELS; label variable DUID "DWELLING UNIT ID"; label variable PID "PERSON NUMBER"; label variable DUPERSID "PERSON ID (DUID+PID)"; label variable EVNTIDX "EVENT ID"; label variable EVENTRN "EVENT ROUND NUMBER"; label variable FFEEIDX "FLAT FEE ID"; label variable OMTYPEX "OTHER MEDICAL EXPENSE TYPE - EDITED"; label variable OMTYPE "OTHER MEDICAL EXPENSE TYPE"; label variable OMOTHOX "OMTYPE OTHER SPECIFY - EDITED"; label variable OMOTHOS "OMTYPE OTHER SPECIFY"; label variable FFOMTYPE "FLAT FEE BUNDLE"; label variable FFBEF97 "TOTAL # OF VISITS IN FF BEFORE 1997"; label variable FFTOT98 "TOTAL # OF VISITS IN FF AFTER 1997"; label variable OMSF97X "AMOUNT PAID,FAMILY (IMPUTED)"; label variable OMMR97X "AMOUNT PAID,MEDICARE(IMPUTED)"; label variable OMMD97X "AMOUNT PAID,MEDICAID (IMPUTED)"; label variable OMPV97X "AMOUNT PAID,PRIVATE INSURANCE (IMPUTED)"; label variable OMVA97X "AMOUNT PAID,VETERANS(IMPUTED)"; label variable OMCH97X "AMOUNT PAID,CHAMPUS/CHAMPVA (IMPUTED)"; label variable OMOF97X "AMOUNT PAID,OTHER FEDERAL (IMPUTED)"; label variable OMSL97X "AMOUNT PAID,STATE & LOCAL GOV (IMPUTED)"; label variable OMWC97X "AMOUNT PAID,WORKERS COMP (IMPUTED)"; label variable OMOR97X "AMOUNT PAID,OTHER PRIVATE (IMPUTED)"; label variable OMOU97X "AMOUNT PAID,OTHER PUBLIC (IMPUTED)"; label variable OMOT97X "AMOUNT PAID,OTHER INSURANCE (IMPUTED)"; label variable OMXP97X "SUM OF PAYMENTS OMSF97X-OMOT97X(IMPUTED)"; label variable OMTC97X "HHLD REPORTED TOTAL CHARGE (IMPUTED)"; label variable IMPOMSLF "IMPUTATION FLAG FOR OMSF97X"; label variable IMPOMMCR "IMPUTATION FLAG FOR OMMR97X"; label variable IMPOMMCD "IMPUTATION FLAG FOR OMMD97X"; label variable IMPOMPRV "IMPUTATION FLAG FOR OMPV97X"; label variable IMPOMVA "IMPUTATION FLAG FOR OMVA97X"; label variable IMPOMCHM "IMPUTATION FLAG FOR OMCH97X"; label variable IMPOMOFD "IMPUTATION FLAG FOR OMOF97X"; label variable IMPOMSTL "IMPUTATION FLAG FOR OMSL97X"; label variable IMPOMWCP "IMPUTATION FLAG FOR OMWC97X"; label variable IMPOMOPR "IMPUTATION FLAG FOR OMOR97X"; label variable IMPOMOPU "IMPUTATION FLAG FOR OMOU97X"; label variable IMPOMOTH "IMPUTATION FLAG FOR OMOT97X"; label variable IMPOMCHG "IMPUTATION STATUS OF OMTC97X"; label variable WTDPER97 "POVERTY/MORTALITY ADJ PERSON LEVL WGT-97"; label variable VARSTR97 "VARIANCE ESTIMATION STRATUM"; label variable VARPSU97 "VARIANCE ESTIMATION PSU 1997"; *DEFINE VALUE LABELS FOR REPORTS; label define HC16CF10001X 1 "1" 2 "2" 3 "3" 4 "4" 5 "5"; ; label define HC16CF10002X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10003X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 1 " 1 FLAT FEE STEM" 2 " 2 FLAT FEE LEAF" ; label define HC16CF10004X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10005X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED TLCHRG" 1 " 1 FAC IMP DONOR'S TLCHRG" 2 " 2 IMPUTED TLCHRG" 3 " 3 BOTH-RECIPIENTS AND DONORS" ; label define HC16CF10006X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10007X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10008X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10009X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10010X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10011X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10012X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED"; ; label define HC16CF10013X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10014X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10015X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10016X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10017X -1 "-1 INAPPLICABLE" 0 " 0 UNIMPUTED" 1 " 1 IMPUTED" ; label define HC16CF10018X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10019X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10020X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10021X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10022X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10023X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10024X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10025X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10026X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10027X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10028X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10029X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 1 " 1 GLASSES OR CONTACT LENSES" 10 "10 DISPOSABLE SUPPLIES" 11 "11 ALTERATIONS/MODIFICATIONS" 2 " 2 INSULIN" 3 " 3 DIABETIC EQUIPMENT/SUPPLIES" 4 " 4 AMBULANCE SERVICES" 5 " 5 ORTHOPEDIC ITEMS" 6 " 6 HEARING DEVICES" 7 " 7 PROSTHESIS" 8 " 8 BATHROOM AIDS" 9 " 9 MEDICAL EQUIPMENT" 91 "91 OTHER" ; label define HC16CF10030X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 1 " 1 GLASSES OR CONTACT LENSES" 10 "10 DISPOSABLE SUPPLIES" 11 "11 ALTERATIONS/MODIFICATIONS" 2 " 2 INSULIN" 3 " 3 DIABETIC EQUIPMENT/SUPPLIES" 4 " 4 AMBULANCE SERVICES" 5 " 5 ORTHOPEDIC ITEMS" 6 " 6 HEARING DEVICES" 7 " 7 PROSTHESIS" 8 " 8 BATHROOM AIDS" 9 " 9 MEDICAL EQUIPMENT" 91 "91 OTHER" ; label define HC16CF10031X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10032X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; label define HC16CF10033X -1 "-1 INAPPLICABLE" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 " 0" ; * ASSOCIATE VARIABLES WITH VALUE LABEL DEFINITIONS; label value EVENTRN HC16CF10001X; label value FFBEF97 HC16CF10002X; label value FFOMTYPE HC16CF10003X; label value FFTOT98 HC16CF10004X; label value IMPOMCHG HC16CF10005X; label value IMPOMCHM HC16CF10006X; label value IMPOMMCD HC16CF10007X; label value IMPOMMCR HC16CF10008X; label value IMPOMOFD HC16CF10009X; label value IMPOMOPR HC16CF10010X; label value IMPOMOPU HC16CF10011X; label value IMPOMOTH HC16CF10012X; label value IMPOMPRV HC16CF10013X; label value IMPOMSLF HC16CF10014X; label value IMPOMSTL HC16CF10015X; label value IMPOMVA HC16CF10016X; label value IMPOMWCP HC16CF10017X; label value OMCH97X HC16CF10018X; label value OMMD97X HC16CF10019X; label value OMMR97X HC16CF10020X; label value OMOF97X HC16CF10021X; label value OMOR97X HC16CF10022X; label value OMOT97X HC16CF10023X; label value OMOU97X HC16CF10024X; label value OMPV97X HC16CF10025X; label value OMSF97X HC16CF10026X; label value OMSL97X HC16CF10027X; label value OMTC97X HC16CF10028X; label value OMTYPE HC16CF10029X; label value OMTYPEX HC16CF10030X; label value OMVA97X HC16CF10031X; label value OMWC97X HC16CF10032X; label value OMXP97X HC16CF10033X; *DISPLAY A DESCRIPTION OF STATA FILE; describe; *LIST FIRST 20 OBSERVATIONS IN THE FILE; list in 1/20; save HC16CF1, replace; #delimit cr * data file is stored in HC16CF1.dta * log file is stored in HC16CF1.log log close /************************************************************************************************ NOTES: 1. This program has been tested on Stata Version 10 (for Windows). 2. This program will create a permanent Stata dataset. All additional analyses can be run using this dataset. In addition to the dataset, this program creates a log file named HC16CF1.LOG and a data file named HC16CF1.DTA. If these files (HC16CF1.DTA and HC16CF1.LOG) already exist in the working directory, they will be replaced when this program is executed. 3. If the program ends prematurely, the log file will remain open. Before running this program again, the user should enter the following Stata command: log close 4. The cd command assigns C:\MEPS\DATA as the working directory and location of the input ASCII and output .DTA and .LOG files and can be modified by the user as necessary. 5. Stata commands end with a carriage return by default. The command #delimit ; temporarily changes the command ending delimiter from a carriage return to a semicolon. 6. The infix command assumes that the input variables are numeric unless the variable name is prefaced by str. For example, DUPERSID is the a string (or character) variable. ************************************************************************************************/