Hi everyone,

I have 4 binary variables:
#1. Tested for HIV during antenatal care (coded as 0/1)
#2. Got results of HIV test done during antenatal care (coded as 0/1)
#3. Tested for HIV at the time of delivery (coded as 0/1)

#4. Got results of HIV test done at the time of delivery (coded as 0/1)

I would like to combine these 4 variables into a single binary outcome variable, which is defined as "Got tested for HIV during antenatal care AND/OR at the time of delivery AND knew the test results". I have tried using "replace var =...... if)", but I didn't work as desired. May anyone here help me please? Thank you!