/************************************************************************************************/ /* Stata User File for H26C 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 */ /* (H26C.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 H26C.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\H26C.DO */ /* The program below will output the Stata dataset H26C.DTA */ /************************************************************************************************/ #delimit ; cd C:\MEPS\DATA; log using H26CF1.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 FFBEF98 98-99 byte FFTOT99 100-101 double OMSF98X 102-109 double OMMR98X 110-117 double OMMD98X 118-124 double OMPV98X 125-132 double OMVA98X 133-140 double OMCH98X 141-146 double OMOF98X 147-152 double OMSL98X 153-159 double OMWC98X 160-165 double OMOR98X 166-172 double OMOU98X 173-178 double OMOT98X 179-184 double OMXP98X 185-192 double OMTC98X 193-200 double WTDPER98 201-212 int VARSTR98 213-215 byte VARPSU98 216-217 using H26CF1.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 FFBEF98 "TOTAL # OF VISITS IN FF BEFORE 1998"; label variable FFTOT99 "TOTAL # OF VISITS IN FF AFTER 1998"; label variable OMSF98X "AMOUNT PAID, FAMILY (IMPUTED)"; label variable OMMR98X "AMOUNT PAID, MEDICARE (IMPUTED)"; label variable OMMD98X "AMOUNT PAID, MEDICAID (IMPUTED)"; label variable OMPV98X "AMOUNT PAID, PRIVATE INSURANCE (IMPUTED)"; label variable OMVA98X "AMOUNT PAID, VETERANS (IMPUTED)"; label variable OMCH98X "AMOUNT PAID, CHAMPUS/CHAMPVA (IMPUTED)"; label variable OMOF98X "AMOUNT PAID, OTHER FEDERAL (IMPUTED)"; label variable OMSL98X "AMOUNT PAID, STATE & LOCAL GOV (IMPUTED)"; label variable OMWC98X "AMOUNT PAID, WORKERS COMP (IMPUTED)"; label variable OMOR98X "AMOUNT PAID, OTHER PRIVATE (IMPUTED)"; label variable OMOU98X "AMOUNT PAID, OTHER PUBLIC (IMPUTED)"; label variable OMOT98X "AMOUNT PAID, OTHER INSURANCE (IMPUTED)"; label variable OMXP98X "SUM OF OMSF98X-OMOT98X (IMPUTED)"; label variable OMTC98X "HHLD REPORTED TOTAL CHARGE (IMPUTED)"; label variable WTDPER98 "POVERTY/MORTALITY/NH ADJ PERS LVL WGT 98"; label variable VARSTR98 "VARIANCE ESTIMATION STRATUM,1998"; label variable VARPSU98 "VARIANCE ESTIMATION PSU,1998"; *DEFINE VALUE LABELS FOR REPORTS; label define H26CF10001X -1 "-1 INAPPLICABLE" -2 "-2 DETERMINED IN PREVIOUS ROUND" -3 "-3 NO DATA IN ROUND" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" ; label define H26CF10002X -1 "-1 INAPPLICABLE" -2 "-2 DETERMINED IN PREVIOUS ROUND" -3 "-3 NO DATA IN ROUND" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 1 "1" 2 "2" 3 "3" 4 "4" 5 "5" ; label define H26CF10003X -1 "-1 INAPPLICABLE" -2 "-2 DETERMINED IN PREVIOUS ROUND" -3 "-3 NO DATA IN ROUND" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 "0" 1 "1" ; label define H26CF10004X -1 "-1 INAPPLICABLE" -2 "-2 DETERMINED IN PREVIOUS ROUND" -3 "-3 NO DATA IN ROUND" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 1 "1 FLAT FEE STEM" 2 "2 FLAT FEE LEAF" ; label define H26CF10005X -1 "-1 INAPPLICABLE" -2 "-2 DETERMINED IN PREVIOUS ROUND" -3 "-3 NO DATA IN ROUND" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10006X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10007X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10008X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10009X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10010X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10011X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10012X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10013X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10014X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10015X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10016X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10017X -1 "-1 INAPPLICABLE" -2 "-2 DETERMINED IN PREVIOUS ROUND" -3 "-3 NO DATA IN ROUND" -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 H26CF10018X -1 "-1 INAPPLICABLE" -2 "-2 DETERMINED IN PREVIOUS ROUND" -3 "-3 NO DATA IN ROUND" -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 H26CF10019X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10020X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10021X -1 "-1 INAPPLICABLE" -9 "-9 NOT ASCERTAINED" 0 "0" ; label define H26CF10022X -1 "-1 INAPPLICABLE" -2 "-2 DETERMINED IN PREVIOUS ROUND" -3 "-3 NO DATA IN ROUND" -7 "-7 REFUSED" -8 "-8 DK" -9 "-9 NOT ASCERTAINED" ; * ASSOCIATE VARIABLES WITH VALUE LABEL DEFINITIONS; label value DUID H26CF10001X; label value EVENTRN H26CF10002X; label value FFBEF98 H26CF10003X; label value FFOMTYPE H26CF10004X; label value FFTOT99 H26CF10005X; label value OMCH98X H26CF10006X; label value OMMD98X H26CF10007X; label value OMMR98X H26CF10008X; label value OMOF98X H26CF10009X; label value OMOR98X H26CF10010X; label value OMOT98X H26CF10011X; label value OMOU98X H26CF10012X; label value OMPV98X H26CF10013X; label value OMSF98X H26CF10014X; label value OMSL98X H26CF10015X; label value OMTC98X H26CF10016X; label value OMTYPE H26CF10017X; label value OMTYPEX H26CF10018X; label value OMVA98X H26CF10019X; label value OMWC98X H26CF10020X; label value OMXP98X H26CF10021X; label value PID H26CF10022X; *DISPLAY A DESCRIPTION OF STATA FILE; describe; *LIST FIRST 20 OBSERVATIONS IN THE FILE; list in 1/20; save H26CF1, replace; #delimit cr * data file is stored in H26CF1.dta * log file is stored in H26CF1.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 H26C.LOG and a data file named H26C.DTA. If these files (H26C.DTA and H26C.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. ************************************************************************************************/