/*stata formats*/

/*Assign labels to each of the 39 variables*/
/*copy and paste formats from stata formats document*/
label variable phseq "Household Sequence Number"
label variable hnumper "Number of Persons in Household"
label variable alineno "Person Line Number"
label variable esiph "ESI policy holder?"
label variable esidep "ESI dependent?"
label variable ophiph "Other private health insurance policy holder?"
label variable ophidep "Other private health insurance dependent?"
label variable nmcaid "Covered by Medicaid?"
label variable nmcare "Covered by Medicare?"
label variable champ "Covered by Military?"
label variable other "Covered by Other?"
label variable chipp "Covered by Childrens Health Insurance?"
label variable marsupwt "March Supplement Weight"
label variable offer "Does your employer offer Health Insurance?"
label variable prior "Do you have ESI through a Prior Employer?"
label variable newsector "What sector is providing coverage?"
label variable newsize "What size employer provided the coverage?"
label variable eeprior "Coverage through a prior employer (dependents only, attribute of policyholder)"
label variable phline "Line# (A-LINENO) of first PH (deps who aren't ESI PH only)"
label variable siflag "Was coverage fully-insured or self-insured?"
label variable hmoflag "What type of plan are you covered by?"
label variable retflag "Is prior coverage retiree or COBRA? (universe is PRIOR=1 or EEPRIOR=1)"
label variable ph2line "Line number (A-LINENO) of second policy holder"
label variable newsector2 "Sector of coverage through second policy holder (if PH2LINE > 0)"
label variable newsize2 "Size of employer covering through second policy holder (if PH2LINE > 0)"
label variable union "Coverage through union? (for ESI Policy holders only, non-self-employed)"
label variable eeunion "Coverage through a union? (for ESI deps only, based on PH attribute)"
label variable unionwork "Union? (for non-self-employed workers only, current employment status)"
label variable av "Actuarial Value  (active ESI policy holder records only)"
label variable avcellavg "Cell based average actuarial value (active ESI policy holder records only)"
label variable avplantype "Plan type used for AVs?"
label variable mspflag "Medicare Secondary Payer variable (all Medicare)"
label variable oopexp "OOP expenditures on OTC purchases and medical equipment (POTC-VAL + PMED-VAL)"
label variable now_anycov "Current health insurance coverage?"
label variable outtyp "Coverage from outside of household?"
label variable oldstate "Old State Variable"
label variable exchange "Enrolled in health exchange? (for people with OPHI coverage)"
label variable mcdexpan "Is person in a Medicaid expansion state (for all persons)"
label variable nowesi "Is person currently enrolled in ESI (non-self-employed only)"

/*Create value labels to label the values of each variable - 2 step process - first define the label, and then assign the label to the variable*/

label define esiph1 0 "no"  1 "yes"
label values esiph esiph1  

label define esidep1 0 "no" 1 "yes"
label values esidep esidep1

label define ophiph1 0 "no" 1 "yes"
label values ophiph ophiph1

label define ophidep1 0 "no" 1 "yes"
label values ophidep ophidep1

label define nmcaid1 0 "no" 1 "yes"
label values nmcaid nmcaid1

label define nmcare1 0 "no" 1 "yes"
label values nmcare nmcare1

label define champ1 0 "no" 1 "yes"
label values champ champ1

label define other1 0 "no" 1 "yes"
label values other other1

label define chipp1 0 "no" 1 "yes"
label values chipp chipp1

label define offer1 0 "n/a" 1 "coverage through current employer" 2 "offered, eligible, not enrolled" 3 "offered, not enrolled, not eligible" 4 "not offered"
label values offer offer1

label define prior1 0 "n/a" 1 "yes" 2 "no, current employer"
label values prior prior1

label define newsector1 0 "n/a" 1 "Private" 2 "Public, Federal" 3 "Public, State" 4 "Public, Local" 5 "Self-Employed, inc" 6 "Self-Employed, uninc"
label values newsector newsector1

label define newsize1 0 "n/a" 1 "less than 10" 2 "10 - 49" 3 "50 - 99" 4 "100 - 499" 5 "500 - 999" 6 "1000 or more"
label values newsize newsize1

label define eeprior1 0 "n/a" 1 "yes, prior" 2 "no, current employer"
label values eeprior eeprior1

label define siflag1 0 "n/a" 1 "self-insured" 2 "fully-insured"
label values siflag siflag1

label define hmoflag1 0 "n/a" 1 "HMO" 2 "PPO" 3 "POS" 4 "HDED"
label values hmoflag hmoflag1

label define retflag1 0 "n/a" 1 "retiree" 2 "COBRA"
label values retflag retflag1

label define newsector21 0 "n/a" 1 "Private" 2 "Public, Federal" 3 "Public, State" 4 "Public, Local" 5 "Self-Employed, inc" 6 "Self-Employed, uninc"
label values newsector2 newsector21

label define newsize21 0 "n/a" 1 "less than 10" 2 "10 - 49" 3 "50 - 99" 4 "100 - 499" 5 "500 - 999" 6 "1000 or more"
label values newsize2 newsize21

label define union1 0 "n/a" 1 "yes, union" 2 "no, not union"
label values union union1

label define eeunion1 0 "n/a" 1 "yes, union" 2 "no, not union"
label values eeunion eeunion1

label define unionwork1 0 "n/a" 1 "yes, union" 2 "no, not union"
label values unionwork unionwork1

label define avplantype1 -9 "n/a" 1 "HMO" 2 "PPO" 3 "POS" 5 "HRA" 6 "HSA"
label values avplantype avplantype1

label define mspflag1 0 "Person does not have Medicare" 1 "Medicare is secondary (ESI Primary)" 2 "Medicare is primary (may or may not have ESI)"
label values mspflag mspflag1

label define now_anycov1 1 "yes" 2 "no"
label values now_anycov now_anycov1

label define outtyp1 0 "no" 1 "yes, ESI" 2 "yes, OPHI" 3 "yes, other"
label values outtyp outtyp1

label define exchange1 0 "no" 1 "yes"
label values exchange exchange1

label define mcdexpan1 0 "no" 1 "yes"
label values mcdexpan mcdexpan1

label define nowesi1 0 "no" 1 "yes"
label values nowesi nowesi1