Hi,

I am trying to classify all the participants in my sample who have metabolic syndrome and I was hoping someone could help with the code for this.

Any participants who meet three of the following five criterions should be classified as having metabolic syndrome:

● Abdominal obesity, defined as a waist circumference ≥40 inches in men and ≥35 inches in women

● Serum triglycerides ≥150 mg/dL (1.7 mmol/L) or drug treatment for elevated triglycerides

● Serum high-density lipoprotein (HDL) cholesterol <40 mg/dL (1 mmol/L) in men and <50 mg/dL (1.3 mmol/L) in women or drug treatment for low HDL cholesterol

● Blood pressure ≥130/85 mmHg or drug treatment for elevated blood pressure

● Fasting plasma glucose ≥100 mg/dL (5.6 mmol/L) or drug treatment for elevated blood glucose

Here is a small sample of my dataset with the relevant variables for metabolic syndrome. BTW, there may not actually be anyone who has metabolic syndrome among this set participants.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long pid float(sex_r avg_waist_in1) int trigs1 byte hdlc1 int(avgsbp1 avgdbp1) float bp_135_85 int glucose1 byte(lipid_meds bp_meds glucose_meds)
10002 0 42.20472 256 24 134 71 0 104 0 1 0
10005 0 33.85827 117 87 121 66 0  96 1 0 0
10008 0 41.53543 238 42 128 76 0 105 1 1 0
10011 1 37.34252  98 33 142 82 0 110 0 1 1
10012 0  48.8189 135 53 139 83 0  95 0 0 0
10013 0 50.07874 161 80 147 75 0  90 1 1 0
10015 0 43.74016  66 50 123 75 0 114 0 0 0
10017 1 42.02756  75 51 151 83 0  85 1 1 0
10024 0 52.12598  94 51 127 78 0  90 0 0 0
10025 1 48.48425 183 38 144 79 0 104 0 1 0
end
label values sex_r Sex
label def Sex 0 "Female", modify
label def Sex 1 "Male", modify
label values bp_135_85 BP_135_85
label def BP_135_85 0 "No", modify
label values lipid_meds Medications
label values bp_meds Medications
label values glucose_meds Medications
label def Medications 0 "No", modify
label def Medications 1 "Yes", modify
Variables:
pid - participant
sex_r - sex (0 = female, 1 = male)
trigs1- triglyceride level
hdlc1 - HDL cholesterol level
avgsbp1 = average systolic blood pressure
avgdbp1 = average diastolic blood pressure
bp_135_85 = BP >=135/85 (0 = no, 1 = yes)
glucose1 = fasting glucose level
lipid_meds = taking lipid lowering medications (0 = no, 1 = yes)
bp_meds = taking blood pressure medications (0 = no, 1 = yes)
glucose_meds = taking glucose lowering medications (0 = no, 1 = yes)

For the triglyceride and HDL criterions above, if a participant is coded as "yes (1)" for taking lipid lowering medications, then they are a "yes" for both of those criterions.

I would greatly appreciate any help with the code for this.

Thank you.