/************************************************************************************************/ /* Stata User File for H215 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 */ /* (H215.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 H215.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\H215.DO */ /* The program below will output the Stata dataset H215.DTA */ /************************************************************************************************/ #delimit ; cd C:\MEPS\DATA; log using H215.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 PITFLG 128-128 byte FYFLG 129-129 byte CMJINS 130-131 int EMPLSTAT 132-134 byte PHOLDER 135-135 byte DEPNDNT 136-136 byte PHLDRCHNG 137-138 byte EVALCOVR 139-140 byte STATUS1 141-142 byte STATUS2 143-144 byte STATUS3 145-146 byte STATUS4 147-148 byte STATUS5 149-150 byte STATUS6 151-152 byte STATUS7 153-154 byte STATUS8 155-156 byte STATUS9 157-158 byte STATUS10 159-160 byte STATUS11 161-162 byte STATUS12 163-164 byte STATUS13 165-166 byte STATUS14 167-168 byte STATUS15 169-170 byte STATUS16 171-172 byte STATUS17 173-174 byte STATUS18 175-176 byte STATUS19 177-178 byte STATUS20 179-180 byte STATUS21 181-182 byte STATUS22 183-184 byte STATUS23 185-186 byte STATUS24 187-188 byte DECPHLDR 189-189 byte OUTPHLDR 190-190 byte NOPUFLG 191-191 byte COVROUT_M18 192-193 byte TYPEFLAG 194-195 byte STEXCH 196-197 byte PrivateCat 198-199 byte HOSPINSX 200-201 byte MSUPINSX 202-203 byte DENTLINS 204-205 byte VISIONIN 206-207 byte PMEDINS 208-209 int COBRA 210-212 byte PLANMETL 213-214 byte COVTYPIN 215-215 byte OOPELIG 216-216 double OOPPREM 217-223 double OOPPREMX 224-230 double OOPX12X 231-238 byte OOPFLAG 239-240 int PREMLEVX 241-243 byte PREMSUBZ 244-245 byte ANNDEDCT 246-247 byte HSAACCT 248-249 int UPRHMO 250-252 byte NAMECHNG 253-254 using H215.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 policy 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 PITFLG "Person in point-in-time file"; 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 STATUS1 "Insurance active in month 1"; label variable STATUS2 "Insurance active in month 2"; label variable STATUS3 "Insurance active in month 3"; label variable STATUS4 "Insurance active in month 4"; label variable STATUS5 "Insurance active in month 5"; label variable STATUS6 "Insurance active in month 6"; label variable STATUS7 "Insurance active in month 7"; label variable STATUS8 "Insurance active in month 8"; label variable STATUS9 "Insurance active in month 9"; label variable STATUS10 "Insurance active in month 10"; label variable STATUS11 "Insurance active in month 11"; label variable STATUS12 "Insurance active in month 12"; label variable STATUS13 "Insurance active in month 13"; label variable STATUS14 "Insurance active in month 14"; label variable STATUS15 "Insurance active in month 15"; label variable STATUS16 "Insurance active in month 16"; label variable STATUS17 "Insurance active in month 17"; label variable STATUS18 "Insurance active in month 18"; label variable STATUS19 "Insurance active in month 19"; label variable STATUS20 "Insurance active in month 20"; label variable STATUS21 "Insurance active in month 21"; label variable STATUS22 "Insurance active in month 22"; label variable STATUS23 "Insurance active in month 23"; label variable STATUS24 "Insurance active in month 24"; label variable DECPHLDR "Deceased policyholder flag"; label variable OUTPHLDR "Out-of-RU policyholder flag"; label variable NOPUFLG "Policyholder not in full year or point-in-time files"; 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: hospital phys/HMO (edited)"; 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 H2150001X -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 H2150002X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150003X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150004X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150005X 1 "1 SINGLE" 2 "2 FAMILY" ; label define H2150006X 1 "1 YES" 2 "2 NO" ; label define H2150007X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150008X 0 "0 POLICYHOLDER" 1 "1 DEPENDENT" ; label define H2150009X -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 H2150010X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150011X 0 "0 NO" 1 "1 YES" ; label define H2150012X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150013X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150014X -1 "-1 INAPPLICABLE" 203 "HC203 2018 JOBSFILE" 211 "HC211 2019 JOBSFILE" ; label define H2150015X -1 "-1 INAPPLICABLE" 0 "0 NO" 1 "1 YES" ; label define H2150016X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150017X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150018X 1 "1 YES" 2 "2 NO" ; label define H2150019X 1 "1 YES" 2 "2 NO" ; label define H2150020X -1 "-1 INAPPLICABLE" 0 "0 NO" 1 "1 YES" ; label define H2150021X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2150022X -1 "-1 INAPPLICABLE" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2150023X -1 "-1 INAPPLICABLE" 0 "0 NO PREMIUM CONTRIBUTION" ; label define H2150024X 1 "1 YES" 2 "2 NO" ; label define H2150025X 23 "23" 24 "24" ; label define H2150026X -1 "-1 INAPPLICABLE" 1 "1 CHANGED FROM 902 TO NON 902" 2 "2 CHANGED FROM NON 902 TO 902" 3 "3 CHANGED FROM NON 902 TO 901" 4 "4 CHANGED FROM NON 902 TO NON 902" 5 "5 MULTIPLE POLICYHOLDERS ARE REPORTED" ; label define H2150027X 0 "0 DEPENDENT" 1 "1 POLICYHOLDER" ; label define H2150028X 0 "0 NO" 1 "1 YES" ; label define H2150029X -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 H2150030X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150031X -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 H2150032X -1 "-1 INAPPLICABLE" -15 "-15 CANNOT BE COMPUTED" -7 "-7 REFUSED" -8 "-8 DK" 1 "1 YES" 2 "2 NO" ; label define H2150033X 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 H2150034X 1 "1" 2 "2" 3 "3" 4 "4" 5 "5" ; label define H2150035X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150036X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150037X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150038X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150039X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150040X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150041X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150042X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150043X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150044X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150045X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150046X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150047X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150048X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150049X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150050X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150051X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150052X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150053X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150054X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150055X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150056X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150057X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150058X -1 "-1 INAPPLICABLE" 1 "1 YES" 2 "2 NO" ; label define H2150059X -1 "-1 INAPPLICABLE" 1 "1 YES, EXCHANGE COVERAGE" 2 "2 NO, NOT EXCHANGE COVERAGE" ; label define H2150060X -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 H2150061X -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 H2150062X -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 H2150001X; label value CMJINS H2150002X; label value COBRA H2150003X; label value COVROUT_M18 H2150004X; label value COVTYPIN H2150005X; label value DECPHLDR H2150006X; label value DENTLINS H2150007X; label value DEPNDNT H2150008X; label value EMPLSTAT H2150009X; label value EVALCOVR H2150010X; label value FYFLG H2150011X; label value HOSPINSX H2150012X; label value HSAACCT H2150013X; label value JOBSFILE H2150014X; label value JOBSINFR H2150015X; label value MSUPINSX H2150016X; label value NAMECHNG H2150017X; label value NOPUFLG H2150018X; label value OOPELIG H2150019X; label value OOPFLAG H2150020X; label value OOPPREM H2150021X; label value OOPPREMX H2150022X; label value OOPX12X H2150023X; label value OUTPHLDR H2150024X; label value PANEL H2150025X; label value PHLDRCHNG H2150026X; label value PHOLDER H2150027X; label value PITFLG H2150028X; label value PLANMETL H2150029X; label value PMEDINS H2150030X; label value PREMLEVX H2150031X; label value PREMSUBZ H2150032X; label value PrivateCat H2150033X; label value RN H2150034X; label value STATUS1 H2150035X; label value STATUS10 H2150036X; label value STATUS11 H2150037X; label value STATUS12 H2150038X; label value STATUS13 H2150039X; label value STATUS14 H2150040X; label value STATUS15 H2150041X; label value STATUS16 H2150042X; label value STATUS17 H2150043X; label value STATUS18 H2150044X; label value STATUS19 H2150045X; label value STATUS2 H2150046X; label value STATUS20 H2150047X; label value STATUS21 H2150048X; label value STATUS22 H2150049X; label value STATUS23 H2150050X; label value STATUS24 H2150051X; label value STATUS3 H2150052X; label value STATUS4 H2150053X; label value STATUS5 H2150054X; label value STATUS6 H2150055X; label value STATUS7 H2150056X; label value STATUS8 H2150057X; label value STATUS9 H2150058X; label value STEXCH H2150059X; label value TYPEFLAG H2150060X; label value UPRHMO H2150061X; label value VISIONIN H2150062X; *DISPLAY A DESCRIPTION OF STATA FILE; describe; *LIST FIRST 20 OBSERVATIONS IN THE FILE; list in 1/20; save H215, replace; #delimit cr * data file is stored in H215.dta * log file is stored in H215.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 H215.LOG and a data file named H215.DTA. If these files (H215.DTA and H215.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. ************************************************************************************************/