Dear forum,

I have a dataset of 407 participants, i am trying to categorise them by their hip to waist ratio. This is a continuous variable which I would like to ceate a new categorical variable with.

I am trying to categorise my continuous hip:waist ratio into a new categorical variable of three categories 1 "low" 2 "average" 3 "high".

However, the cutoffs for low average high are different for male and female.

Is there a way to do this with egen cut() function or is something more complex?

My variables: sex
waisthip


Grateful for any help,