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
svyset to produce national estimatesHi!! I'm a STATA newbie and confused about what may be a very easy topic. I'm doing research on the …
Count the number of yearsHi, I have a question of calculating the number of years in Stata. In the data, each ID has an Iss…
Combining results of different t tests in a tableDear all, I'm new here on the forum, but I have a question about the possibility to combine the out…
Event Study and Two-Way Fixed-Effect Diff-in-Diff with varying treatment timingI have MSA level data from 1990-2018 where I am looking at professional sports teams and what happen…
How to adjust the scale on the axes of a graph before outputting in a batch file, if the yscale/xscale option is not availableIf I am not using the twoway plot or some other library that has the yscale() or xscale() option, ho…
Subscribe to:
Post Comments (Atom)
0 Response to Merging variables
Post a Comment