id group a b c
1 1 1 0 1
2 1 0 1 1
3 1 1 0 1
4 2 1 0 0
5 2 1 0 0
6 3 0 1 1
7 3 1 0 1
Dear statalisters,
How do I create a variable "c" which takes a value of one only when the "group" includes both a=1 and b=1?
"a" and "b" are binary variables that are mutually exclusive.
Nobuya Fukugawa