/************************************************************************************************/ /* Stata User File for H223 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 */ /* (H223.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 H223.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\H223.DO */ /* The program below will output the Stata dataset H223.DTA */ /************************************************************************************************/ #delimit ; cd C:\MEPS\DATA; log using H223.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 PHLDRCHNG 137-138 byte EVALCOVR 139-140 byte EVALCOV5 141-142 byte STAT1 143-144 byte STAT2 145-146 byte STAT3 147-148 byte STAT4 149-150 byte STAT5 151-152 byte STAT6 153-154 byte STAT7 155-156 byte STAT8 157-158 byte STAT9 159-160 byte STAT10 161-162 byte STAT11 163-164 byte STAT12 165-166 byte DECPHLDR 167-167 byte OUTPHLDR 168-168 byte NOPUFLG 169-169 byte COVROUT_M18 170-171 int TYPEFLAG 172-174 byte STEXCH 175-176 byte PrivateCat 177-178 byte HOSPINSX 179-180 byte MSUPINSX 181-182 byte DENTLINS 183-184 byte VISIONIN 185-186 byte PMEDINS 187-188 int COBRA 189-191 byte PLANMETL 192-193 byte COVTYPIN 194-194 byte OOPELIG 195-195 double OOPPREM 196-202 double OOPPREMX 203-209 double OOPX12X 210-217 byte OOPFLAG 218-219 int PREMLEVX 220-222 byte PREMSUBZ 223-224 byte ANNDEDCT 225-226 byte HSAACCT 227-228 int UPRHMO 229-231 byte NAMECHNG 232-233 using H223.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 PHLDRCHNG "Change to PHLDRIDX on reviewed coverage"; label variable EVALCOVR "Covered at interview or December 31st"; label variable EVALCOV5 "Covered at Round 5 interview"; 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 H2230001X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 LESS THAN $1350/$2700" 2 "2 $1350/$2700 OR MORE" 3 "3 NO ANNUAL DEDUCTIBLE" ; label define H2230002X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" 1 "1 YES" 2 "2 NO" ; label define H2230003X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230004X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230005X 1 "1 SINGLE" 2 "2 FAMILY" ; label define H2230006X 1 "1 YES" 2 "2 NO" ; label define H2230007X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230008X 0 "0 POLICYHOLDER" 1 "1 DEPENDENT" ; label define H2230009X -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 H2230010X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230011X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230012X 0 "0 NO" 1 "1 YES" ; label define H2230013X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230014X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230015X -1 "-1 INAPPLICABLE" 203 "HC203 2018 JOBSFILE" 211 "HC211 2019 JOBSFILE" 218 "HC218 2020 JOBSFILE" ; label define H2230016X -1 "-1 INAPPLICABLE" 0 "0 NO" 1 "1 YES" ; label define H2230017X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230018X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230019X 1 "1 YES" 2 "2 NO" ; label define H2230020X 1 "1 YES" 2 "2 NO" ; label define H2230021X -1 "-1 INAPPLICABLE" 0 "0 NO" 1 "1 YES" ; label define H2230022X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2230023X -1 "-1 INAPPLICABLE" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2230024X -1 "-1 INAPPLICABLE" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2230025X 1 "1 YES" 2 "2 NO" ; label define H2230026X 23 "23 PANEL 23" 24 "24 PANEL 24" 25 "25 PANEL 25" ; label define H2230027X -1 "-1 INAPPLICABLE" 1 "1 CHANGED FROM 902 TO NON 902" 2 "2 CHANGED FROM NON 902 TO 902" 3 "3 CHANGED FROM 902 TO 901" 4 "4 CHANGED FROM NON 902 TO NON 902" 5 "5 MULTIPLE POLICYHOLDERS ARE REPORTED" ; label define H2230028X 0 "0 DEPENDENT" 1 "1 POLICYHOLDER" ; label define H2230029X -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 H2230030X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230031X -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 H2230032X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2230033X 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 H2230034X 1 "1" 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" ; label define H2230035X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230036X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230037X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230038X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230039X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230040X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230041X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230042X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230043X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230044X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230045X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230046X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2230047X -1 "-1 INAPPLICABLE" 1 "1 YES, EXCHANGE COVERAGE" 2 "2 NO, NOT EXCHANGE COVERAGE" ; label define H2230048X -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 H2230049X -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 H2230050X -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 H2230001X; label value CMJINS H2230002X; label value COBRA H2230003X; label value COVROUT_M18 H2230004X; label value COVTYPIN H2230005X; label value DECPHLDR H2230006X; label value DENTLINS H2230007X; label value DEPNDNT H2230008X; label value EMPLSTAT H2230009X; label value EVALCOV5 H2230010X; label value EVALCOVR H2230011X; label value FYFLG H2230012X; label value HOSPINSX H2230013X; label value HSAACCT H2230014X; label value JOBSFILE H2230015X; label value JOBSINFR H2230016X; label value MSUPINSX H2230017X; label value NAMECHNG H2230018X; label value NOPUFLG H2230019X; label value OOPELIG H2230020X; label value OOPFLAG H2230021X; label value OOPPREM H2230022X; label value OOPPREMX H2230023X; label value OOPX12X H2230024X; label value OUTPHLDR H2230025X; label value PANEL H2230026X; label value PHLDRCHNG H2230027X; label value PHOLDER H2230028X; label value PLANMETL H2230029X; label value PMEDINS H2230030X; label value PREMLEVX H2230031X; label value PREMSUBZ H2230032X; label value PrivateCat H2230033X; label value RN H2230034X; label value STAT1 H2230035X; label value STAT10 H2230036X; label value STAT11 H2230037X; label value STAT12 H2230038X; label value STAT2 H2230039X; label value STAT3 H2230040X; label value STAT4 H2230041X; label value STAT5 H2230042X; label value STAT6 H2230043X; label value STAT7 H2230044X; label value STAT8 H2230045X; label value STAT9 H2230046X; label value STEXCH H2230047X; label value TYPEFLAG H2230048X; label value UPRHMO H2230049X; label value VISIONIN H2230050X; *DISPLAY A DESCRIPTION OF STATA FILE; describe; *LIST FIRST 20 OBSERVATIONS IN THE FILE; list in 1/20; save H223, replace; #delimit cr * data file is stored in H223.dta * log file is stored in H223.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 H223.LOG and a data file named H223.DTA. If these files (H223.DTA and H223.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. ************************************************************************************************/