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!
Related Posts with Merging variables
Drop duplicate pairs (X,Y; Y,X)Unfortunately, I was not able to find out how to drop a pair of duplicates. Let's say we have variab…
Question about syntax optionsI am trying to write a program but am having difficulty with the syntax function Code: program de…
Reshape wide to long variable not foundI have been trying to reshape my data from wide to long This is an example of how it looks like: I…
Panel - Loop collapse or egen with conditionDear all, I googled and tried many command from yesterday and until now it's still unsuccessful. Co…
Difference-in-Differences Matching with Multiple Periods TreatmentHi Everyone, I would be so pleased to get some help concerning the following issue: I have done wi…
Subscribe to:
Post Comments (Atom)
0 Response to Merging variables
Post a Comment