Hello.

I'm attempting to create a new variable (metabolic syndrome) based on meeting at least three of five conditions.

gen met=.


. replace met=1 if ((female==1 & waist>35 & waist<.) | (female==0 & waist >40 & waist <.)) ///
> | (a1c>5.7 & a1c<.) | (trigly>=150 & trigly<.) | ((female==1 & hdl<50) ///
> | (female==0 & hdl<40)) | ((sbp>130 & sbp<.) | dbp >85 & dbp<.))

Stata says:
too many ')' or ']'

I suppose I could create variables for each of the conditions and try again. But, the way I've written it would only classify metabolic syndrome if a person met all 5 of the criteria, when they only need to meet at least three.

Anyone have any ideas?
Thanks!