/************************************************************************************************/ /* Stata User File for H232 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 */ /* (H232.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 H232.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\H232.DO */ /* The program below will output the Stata dataset H232.DTA */ /************************************************************************************************/ #delimit ; cd C:\MEPS\DATA; log using H232.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 int CMJINS 129-131 int EMPLSTAT 132-134 byte PHOLDER 135-135 byte DEPNDNT 136-136 byte EVALCOVR 137-138 byte STAT1 139-140 byte STAT2 141-142 byte STAT3 143-144 byte STAT4 145-146 byte STAT5 147-148 byte STAT6 149-150 byte STAT7 151-152 byte STAT8 153-154 byte STAT9 155-156 byte STAT10 157-158 byte STAT11 159-160 byte STAT12 161-162 byte DECPHLDR 163-163 byte OUTPHLDR 164-164 byte NOPUFLG 165-165 byte COVROUT_M18 166-167 byte TYPEFLAG 168-169 byte STEXCH 170-171 byte PrivateCat 172-173 byte HOSPINSX 174-175 byte MSUPINSX 176-177 byte DENTLINS 178-179 byte VISIONIN 180-181 byte PMEDINS 182-183 int COBRA 184-186 byte PLANMETL 187-188 byte COVTYPIN 189-189 byte OOPELIG 190-190 double OOPPREM 191-197 double OOPPREMX 198-204 double OOPX12X 205-212 byte OOPFLAG 213-214 int PREMLEVX 215-217 byte PREMSUBZ 218-219 byte ANNDEDCT 220-221 byte HSAACCT 222-223 int UPRHMO 224-226 byte NAMECHNG 227-228 using H232.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 "Type of insurance source"; label variable STEXCH "State exchange coverage"; label variable PrivateCat "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 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 ANNDEDCT "Annual deductible"; label variable HSAACCT "HSA with this plan"; label variable UPRHMO "HMO coverage (edited)"; label variable NAMECHNG "Plan name change"; *DEFINE VALUE LABELS FOR REPORTS; label define H2320001X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 LESS THAN $1400/$2800" 2 "2 $1400/$2800 OR MORE" 3 "3 NO ANNUAL DEDUCTIBLE" ; label define H2320002X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" 1 "1 YES" 2 "2 NO" ; label define H2320003X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320004X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320005X 1 "1 SINGLE" 2 "2 FAMILY" ; label define H2320006X 1 "1 YES" 2 "2 NO" ; label define H2320007X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320008X 0 "0 POLICYHOLDER" 1 "1 DEPENDENT" ; label define H2320009X -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 H2320010X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320011X 0 "0 NO" 1 "1 YES" ; label define H2320012X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320013X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320014X -1 "-1 INAPPLICABLE" 203 "HC203 2018 JOBSFILE" 211 "HC211 2019 JOBSFILE" 218 "HC218 2020 JOBSFILE" 227 "HC227 2021 JOBSFILE" ; label define H2320015X -1 "-1 INAPPLICABLE" 0 "0 NO" 1 "1 YES" ; label define H2320016X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320017X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320018X 1 "1 YES" 2 "2 NO" ; label define H2320019X 1 "1 YES" 2 "2 NO" ; label define H2320020X -1 "-1 INAPPLICABLE" 0 "0 NO" 1 "1 YES" ; label define H2320021X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2320022X -1 "-1 INAPPLICABLE" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2320023X -1 "-1 INAPPLICABLE" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2320024X 1 "1 YES" 2 "2 NO" ; label define H2320025X 23 "23 PANEL 23" 24 "24 PANEL 24" 25 "25 PANEL 25" 26 "26 PANEL 26" ; label define H2320026X 0 "0 DEPENDENT" 1 "1 POLICYHOLDER" ; label define H2320027X -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 H2320028X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320029X -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 H2320030X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2320031X 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, PHOLDER OUTSIDE RU" 6 "6 STATE EXCHANGE" 99 "99 DONT KNOW WHAT KIND PRIV COV" ; label define H2320032X 1 "1" 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" 8 "8" 9 "9" ; label define H2320033X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320034X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320035X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320036X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320037X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320038X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320039X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320040X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320041X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320042X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320043X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320044X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2320045X -1 "-1 INAPPLICABLE" 1 "1 YES, EXCHANGE COVERAGE" 2 "2 NO, NOT EXCHANGE COVERAGE" ; label define H2320046X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 EMPLOYER" 10 "10 SPOUSE PREVIOUS EMPLOYER" 11 "11 SCHOOL" 12 "12 UNKNOWN TYPE-OUTSIDE RU" 13 "13 UNKNOWN TYPE-COLLECTED AT OTHER" 2 "2 UNION" 21 "21 STATE EXCHANGE NAME" 3 "3 GROUP" 5 "5 INSURANCE COMPANY-FROM AN AGENT" 6 "6 INSURANCE COMPANY" 7 "7 HMO" 8 "8 PREVIOUS EMPLOYER" ; label define H2320047X -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 H2320048X -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 ANNDEDCT H2320001X; label value CMJINS H2320002X; label value COBRA H2320003X; label value COVROUT_M18 H2320004X; label value COVTYPIN H2320005X; label value DECPHLDR H2320006X; label value DENTLINS H2320007X; label value DEPNDNT H2320008X; label value EMPLSTAT H2320009X; label value EVALCOVR H2320010X; label value FYFLG H2320011X; label value HOSPINSX H2320012X; label value HSAACCT H2320013X; label value JOBSFILE H2320014X; label value JOBSINFR H2320015X; label value MSUPINSX H2320016X; label value NAMECHNG H2320017X; label value NOPUFLG H2320018X; label value OOPELIG H2320019X; label value OOPFLAG H2320020X; label value OOPPREM H2320021X; label value OOPPREMX H2320022X; label value OOPX12X H2320023X; label value OUTPHLDR H2320024X; label value PANEL H2320025X; label value PHOLDER H2320026X; label value PLANMETL H2320027X; label value PMEDINS H2320028X; label value PREMLEVX H2320029X; label value PREMSUBZ H2320030X; label value PrivateCat H2320031X; label value RN H2320032X; label value STAT1 H2320033X; label value STAT10 H2320034X; label value STAT11 H2320035X; label value STAT12 H2320036X; label value STAT2 H2320037X; label value STAT3 H2320038X; label value STAT4 H2320039X; label value STAT5 H2320040X; label value STAT6 H2320041X; label value STAT7 H2320042X; label value STAT8 H2320043X; label value STAT9 H2320044X; label value STEXCH H2320045X; label value TYPEFLAG H2320046X; label value UPRHMO H2320047X; label value VISIONIN H2320048X; *DISPLAY A DESCRIPTION OF STATA FILE; describe; *LIST FIRST 20 OBSERVATIONS IN THE FILE; list in 1/20; save H232, replace; #delimit cr * data file is stored in H232.dta * log file is stored in H232.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 H232.LOG and a data file named H232.DTA. If these files (H232.DTA and H232.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. ************************************************************************************************/