/************************************************************************************************/ /* Stata User File for H242 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 */ /* (H242.DAT) supplied in this PUF release. */ /* 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 H242.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\H242.DO */ /* The program below will output the Stata dataset H242.DTA */ /************************************************************************************************/ #delimit ; cd C:\MEPS\DATA; log using H242.log, replace; clear; * INPUT ALL VARIABLES; infix str EPCPIDX 1-35 str DUPERSID 36-45 str PHLDRIDX 46-55 str ESTBIDX 56-66 str EPRSIDX 67-91 str InsurPrivIDEX 92-105 byte PANEL 106-107 byte RN 108-108 str JOBSIDX 109-122 byte JOBSINFR 123-124 int JOBSFILE 125-127 byte FYFLG 128-128 byte CMJINS 129-130 int EMPLSTAT 131-133 byte PHOLDER 134-134 byte DEPNDNT 135-135 byte EVALCOVR 136-137 byte STAT1 138-139 byte STAT2 140-141 byte STAT3 142-143 byte STAT4 144-145 byte STAT5 146-147 byte STAT6 148-149 byte STAT7 150-151 byte STAT8 152-153 byte STAT9 154-155 byte STAT10 156-157 byte STAT11 158-159 byte STAT12 160-161 byte DECPHLDR 162-162 byte OUTPHLDR 163-163 byte NOPUFLG 164-164 byte COVROUT_M18 165-166 byte TYPEFLAG_M23 167-168 byte STEXCH 169-170 byte PrivateCat_M23 171-172 byte HOSPINSX 173-174 byte MSUPINSX 175-176 byte DENTLINS 177-178 byte DENTLINX 179-180 byte VISIONIN 181-182 byte PMEDINS 183-184 int COBRA 185-187 byte PLANMETL 188-189 byte COVTYPIN 190-190 byte OOPELIG 191-191 double OOPPREM 192-199 double OOPPREMX 200-206 double OOPX12X 207-214 byte OOPFLAG 215-216 int PREMLEVX 217-219 byte PREMSUBZ 220-221 byte ANNDEDCTP 222-223 byte HSAACCT 224-225 int UPRHMO_M23 226-228 byte NAMECHNG 229-230 using H242.dat; *DEFINE VARIABLE LABELS; label variable EPCPIDX "Insurance source-phldr-dependent identifier"; label variable DUPERSID "Person identifier"; label variable PHLDRIDX "Policyholder person identifier"; label variable ESTBIDX "Insurance source identifier"; label variable EPRSIDX "Unique insurance policy-source"; label variable InsurPrivIDEX "Unique insurance plcy source-insurance identifier"; label variable PANEL "Panel number"; label variable RN "Round number"; label variable JOBSIDX "Policyholder job-round identifier"; label variable JOBSINFR "Job identifier inferred not reported"; label variable JOBSFILE "Jobs file containing job information"; label variable FYFLG "Person in full year file"; label variable CMJINS "Current main job is the source of plan"; label variable EMPLSTAT "Policyholder employment status"; label variable PHOLDER "Policy holder flag"; label variable DEPNDNT "Dependent of policy holder flag"; label variable EVALCOVR "Covered at interview or December 31st"; label variable STAT1 "Insurance active in January"; label variable STAT2 "Insurance active in February"; label variable STAT3 "Insurance active in March"; label variable STAT4 "Insurance active in April"; label variable STAT5 "Insurance active in May"; label variable STAT6 "Insurance active in June"; label variable STAT7 "Insurance active in July"; label variable STAT8 "Insurance active in August"; label variable STAT9 "Insurance active in September"; label variable STAT10 "Insurance active in October"; label variable STAT11 "Insurance active in November"; label variable STAT12 "Insurance active in December"; label variable DECPHLDR "Deceased policyholder flag"; label variable OUTPHLDR "Out-of-RU policyholder flag"; label variable NOPUFLG "Policyholder not in full year file"; label variable COVROUT_M18 "Policy covers person not in RU"; label variable TYPEFLAG_M23 "Type of insurance source"; label variable STEXCH "State exchange coverage"; label variable PrivateCat_M23 "Category of private coverage"; label variable HOSPINSX "Type health insurance received: hosp phys/HMO (ed)"; label variable MSUPINSX "Type health insurance received: Medigap (edited)"; label variable DENTLINS "Type health insurance received: dental"; label variable DENTLINX "Type health insurance received: dental (edited)"; label variable VISIONIN "Type health insurance received: vision"; label variable PMEDINS "Type health insurance received: prescription drug"; label variable COBRA "COBRA coverage"; label variable PLANMETL "Plan metal level"; label variable COVTYPIN "Single or family health insurance coverage plan"; label variable OOPELIG "Policyholder-insurance source has premium"; label variable OOPPREM "Monthly out-of-pocket premium"; label variable OOPPREMX "Monthly out-of-pocket premium (edited/imputed)"; label variable OOPX12X "Annual out-of-pocket premium (edited/imputed)"; label variable OOPFLAG "OOPPREMX edit/imputation flag"; label variable PREMLEVX "Portion of premium paid by family (edited)"; label variable PREMSUBZ "Cost of the premium subsidized"; label variable ANNDEDCTP "Plan deductible range estimate"; label variable HSAACCT "HSA with this plan"; label variable UPRHMO_M23 "HMO coverage (edited)"; label variable NAMECHNG "Plan name change"; *DEFINE VALUE LABELS FOR REPORTS; label define H2420001X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 5 "5 NO ANNUAL DEDUCTIBLE" ; label define H2420002X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" 1 "1 YES" 2 "2 NO" ; label define H2420003X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420004X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420005X 1 "1 SINGLE" 2 "2 FAMILY" ; label define H2420006X 1 "1 YES" 2 "2 NO" ; label define H2420007X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420008X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420009X 0 "0 POLICYHOLDER" 1 "1 DEPENDENT" ; label define H2420010X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 CURRENTLY EMPLOYED" 2 "2 RETIRED" 3 "3 PREVIOUSLY EMPLOYED" 4 "4 DECEASED" 91 "91 OTHER" ; label define H2420011X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420012X 0 "0 NO" 1 "1 YES" ; label define H2420013X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420014X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420015X -1 "-1 INAPPLICABLE" 211 "HC211 2019 JOBSFILE" 218 "HC218 2020 JOBSFILE" 227 "HC227 2021 JOBSFILE" 237 "HC237 2022 JOBSFILE" ; label define H2420016X -1 "-1 INAPPLICABLE" 0 "0 NO" 1 "1 YES" ; label define H2420017X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420018X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420019X 1 "1 YES" 2 "2 NO" ; label define H2420020X 1 "1 YES" 2 "2 NO" ; label define H2420021X -1 "-1 INAPPLICABLE" 0 "0 NO" 1 "1 YES" ; label define H2420022X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2420023X -1 "-1 INAPPLICABLE" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2420024X -1 "-1 INAPPLICABLE" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2420025X 1 "1 YES" 2 "2 NO" ; label define H2420026X 24 "24 PANEL 24" 26 "26 PANEL 26" 27 "27 PANEL 27" ; label define H2420027X 0 "0 DEPENDENT" 1 "1 POLICYHOLDER" ; label define H2420028X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 PLATINUM PLAN" 2 "2 GOLD PLAN" 3 "3 SILVER PLAN" 4 "4 BRONZE PLAN" 5 "5 CATASTROPHIC PLAN" 6 "6 IF VOLUNTEERED: SOMETHING ELSE" ; label define H2420029X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420030X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 FAMILY PAYS ALL PREMIUM COST" 2 "2 FAMILY PAYS SOME PREMIUM COST" 3 "3 FAMILY DOES NOT KNOW" 4 "4 FAMILY DOES NOT PAY PREMIUM COST" ; label define H2420031X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2420032X 0 "0 NOT HOSP/PHYS OR MEDIGAP COVERAGE" 1 "1 EMPLOYER/UNION" 2 "2 NONGROUP" 3 "3 OTHER GROUP" 4 "4 ESI, PHOLDER OUTSIDE RU" 5 "5 NON-ESI, OUT OF RU PHOLDER" 6 "6 STATE EXCHANGE" 99 "99 DK TYPE OF PRIV COV" ; label define H2420033X 1 "1" 2 "2" 3 "3" 4 "4" 5 "5" 7 "7" 8 "8" 9 "9" ; label define H2420034X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420035X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420036X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420037X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420038X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420039X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420040X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420041X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420042X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420043X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420044X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420045X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2420046X -1 "-1 INAPPLICABLE" 1 "1 YES, EXCHANGE COVERAGE" 2 "2 NO, NOT EXCHANGE COVERAGE" ; label define H2420047X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 EMPLOYER (THRU CURR/PREV JOB)" 10 "10 MILITARY" 11 "11 GHP" 12 "12 INDIAN HEALTH SVC" 13 "13 OTHER" 2 "2 UNION (THRU CURR/PREV JOB)" 3 "3 EMPLOYER/UNION COVG NOT REPORTED IN EMPL SECTION" 4 "4 STATE EXCH/MARKETPLACE" 5 "5 INS CO-FR AGNT/BROKER" 6 "6 GROUP/ASSOC" 7 "7 PLAN OF SOMEONE NOT LVNG HERE" 8 "8 MEDICARE" 9 "9 MEDICAID" ; label define H2420048X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 PRIVATE PLAN IS HMO" 2 "2 PRIVATE PLAN IS NOT HMO" ; label define H2420049X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; * ASSOCIATE VARIABLES WITH VALUE LABEL DEFINITIONS; label value ANNDEDCTP H2420001X; label value CMJINS H2420002X; label value COBRA H2420003X; label value COVROUT_M18 H2420004X; label value COVTYPIN H2420005X; label value DECPHLDR H2420006X; label value DENTLINS H2420007X; label value DENTLINX H2420008X; label value DEPNDNT H2420009X; label value EMPLSTAT H2420010X; label value EVALCOVR H2420011X; label value FYFLG H2420012X; label value HOSPINSX H2420013X; label value HSAACCT H2420014X; label value JOBSFILE H2420015X; label value JOBSINFR H2420016X; label value MSUPINSX H2420017X; label value NAMECHNG H2420018X; label value NOPUFLG H2420019X; label value OOPELIG H2420020X; label value OOPFLAG H2420021X; label value OOPPREM H2420022X; label value OOPPREMX H2420023X; label value OOPX12X H2420024X; label value OUTPHLDR H2420025X; label value PANEL H2420026X; label value PHOLDER H2420027X; label value PLANMETL H2420028X; label value PMEDINS H2420029X; label value PREMLEVX H2420030X; label value PREMSUBZ H2420031X; label value PrivateCat_M23 H2420032X; label value RN H2420033X; label value STAT1 H2420034X; label value STAT10 H2420035X; label value STAT11 H2420036X; label value STAT12 H2420037X; label value STAT2 H2420038X; label value STAT3 H2420039X; label value STAT4 H2420040X; label value STAT5 H2420041X; label value STAT6 H2420042X; label value STAT7 H2420043X; label value STAT8 H2420044X; label value STAT9 H2420045X; label value STEXCH H2420046X; label value TYPEFLAG_M23 H2420047X; label value UPRHMO_M23 H2420048X; label value VISIONIN H2420049X; *DISPLAY A DESCRIPTION OF STATA FILE; describe; *LIST FIRST 20 OBSERVATIONS IN THE FILE; list in 1/20; save H242, replace; #delimit cr * data file is stored in H242.dta * log file is stored in H242.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 H242.LOG and a data file named H242.DTA. If these files (H242.DTA and H242.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. ************************************************************************************************/