Hi there,

I would like to categorize participants in a dataset that I am using by whether or not they have metabolic syndrome. However, I am having trouble with this because you need 3/5 criteria below to meet metabolic syndrome:
  • Abdominal obesity (Waist circumference of greater than 40 inches in men, and greater than 35 inches in women)
  • Triglyceride level of 150 milligrams per deciliter of blood (mg/dL) or greater
  • HDL cholesterol of less than 40 mg/dL in men or less than 50 mg/dL in women
  • Systolic blood pressure (top number) of 130 millimeters of mercury (mm Hg) or greater, or diastolic blood pressure (bottom number) of 85 mm Hg or greater
  • Fasting glucose of 100 mg/dL or greater
So, I am wondering how I can use if statements or some other command in Stata to code a variable called met_syn with 0 = does not have metabolic syndrome and 1 = has metabolic syndrome. Anyone with any 3 of the 5 criteria above should be classified as having metabolic syndrome.

Here is a small part of the dataset I am working with:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long pid float(sex_r waist_in) int trigs1 byte hdlc1 int(avgsbp1 avgdbp1 glucose1)
10002 0  42.20475 256 24 134 71 104
10005 0 33.858288 117 87 121 66  96
10008 0  41.53545 238 42 128 76 105
10011 1  37.34254  98 33 142 82 110
10012 0  48.81892 135 53 139 83  95
10013 0  50.07877 161 80 147 75  90
10015 0  43.74018  66 50 123 75 114
10017 1  42.02758  75 51 151 83  85
10024 0  52.12601  94 51 127 78  90
10025 1  48.48428 183 38 144 79 104
end
label values sex_r Sex
label def Sex 0 "Female", modify
label def Sex 1 "Male", modify
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
glucose1 = fasting glucose level

I am not sure if any of these 10 participants will actually have metabolic syndrome, but any code I could use in my larger dataset would be greatly appreciated.

Thank you.