Hi there,
I'd like to create a grouping variable "category" from a combination of two other metric variables (let's say "var1" and "var2").
The categories shall be:
category 1 = var1<50 AND var2<25
category 2 = var1<50 AND var2>25
category 3 = var1>50 AND var2<25
category 4 = var1>50 AND var2>25
How do I do this in STATA?
I tried to use "egen" and "cut", but this works only with one source variable, doesn't?
Thanks in advance,
Philipp
I'd like to create a grouping variable "category" from a combination of two other metric variables (let's say "var1" and "var2").
The categories shall be:
category 1 = var1<50 AND var2<25
category 2 = var1<50 AND var2>25
category 3 = var1>50 AND var2<25
category 4 = var1>50 AND var2>25
How do I do this in STATA?
I tried to use "egen" and "cut", but this works only with one source variable, doesn't?
Thanks in advance,
Philipp
Comment