I am using the British Household Panel Survey Data in order to find the effect of BMI on wages. I will run a probit model and an OLS model with an IV. I will have to generate the BMI variable but I am not sure if I am doing wrong. Also for descriptive statistics, I want to generate a table where underweight, normal weight and obese individuals are showed but I will have to generate these. My problem is I don't know how to properly generate by BMI so it will be correct and inclusive for summary statistics and also correct when running my models. I am using waves 14,16,18. This is my commands for BMI. Can you advise me on how to correctly derive what I prostated?


**Generate BMI

gen hlwtp_org=hlwtp
destring hlwtp, replace
replace hlwtp=. if hlwtp_org==-8 | hlwtp_org==-7

gen pounds_to_stone=hlwtp*0.07142857

gen hlwts_org=hlwts
destring hlwts, replace
replace hlwts=. if hlwts_org==-8 | hlwts_org==-7

gen total_stone = pounds_to_stone + hlwts

gen weight_kg_convert = total_stone*6.35029318


**height

gen hlhtf_org= hlhtf
destring hlhtf, replace
replace hlhtf= abs(hlhtf)
replace hlhtf=. if hlhtf_org==-8 | hlhtf_org==-7| hlhtf_org==-9

gen hlhtc_org= hlhtc
destring hlhtc, replace
replace hlhtc=. if hlhtc_org==-8 | hlhtc_org==-7| hlhtc_org==-9

gen hlhti_org= hlhti
destring hlhti, replace
replace hlhti=. if hlhti_org==-8 | hlhti_org==-7| hlhti_org==-9



gen feet_in_inch= hlhtf*12
gen feet_inch= feet_in_inch + hlhti
gen inches_in_cm= 2.54*feet_inch

gen height=.
replace height= inches_in_cm if inches_in_cm!=.
replace height= hlhtc if hlhtc!=.

gen height_m = height/100

**BMI**

drop if height_m <1
gen BMI = weight_kg/ ((height_m)^2)

bys hid: egen BMI_miss= count(BMI)
bys hid: egen house_BMI = sum(BMI) if BMI_miss==2
gen partner_BMI = house_BMI - BMI if BMI_miss==2


**BMI 2 **
gen BMI2=weight_kg_convert/ (height_m^2)