Hi everyone
I have three variables: "B", "C", "D". From them, I would like to create a single variable "A", like this:
replace A = 0 if (B ==0)&(C ==0)&(D ==0)
replace A = 1 if B (excluding B+C and B+D)
replace A =2 if B+C
replace A = 3 if B+D
replace A = 4 if C (excluding B +C and C+D)
....
Thank you!
I have three variables: "B", "C", "D". From them, I would like to create a single variable "A", like this:
replace A = 0 if (B ==0)&(C ==0)&(D ==0)
replace A = 1 if B (excluding B+C and B+D)
replace A =2 if B+C
replace A = 3 if B+D
replace A = 4 if C (excluding B +C and C+D)
....
Thank you!

Comment