Data from a randomized trial targeting couples at high risk of HIV infection. The intervention provided counseling sessions regarding practices that could reduce their likelihood of contracting HIV. Couples were randomized either to a control group, a group in which just the woman participated, or a group in which both members of the couple participated. One of the outcomes examined after three months was “number of unprotected sex acts.”. See Chapter 15 in Regression and Other Stories.
Reference: El-Bassel, N., Witte, S. S., Gilbert, L., Wu, E., Chang, M., Hill, J., and Steinglass, P. (2003). The efficacy of a relationship-based HIV/STD prevention program for heterosexual couples. American journal of public health, 93, 963--969.
Load packages
library("rprojroot")
root<-has_file(".ROS-Examples-root")$make_fix_file()
Load data
risky <- read.csv(root("RiskyBehavior/data","risky.csv"))
head(risky)
sex couples women_alone bs_hiv bupacts fupacts
1 woman 0 1 negative 7 32
2 woman 0 0 negative 2 5
3 woman 0 0 positive 0 15
4 woman 0 0 negative 24 9
5 woman 1 0 negative 2 2
6 woman 1 0 negative 15 4
LS0tCnRpdGxlOiAiUmVncmVzc2lvbiBhbmQgT3RoZXIgU3RvcmllczogUmlza3lCZWhhdmlvciIKYXV0aG9yOiAiQW5kcmV3IEdlbG1hbiwgSmVubmlmZXIgSGlsbCwgQWtpIFZlaHRhcmkiCmRhdGU6ICJgciBmb3JtYXQoU3lzLkRhdGUoKSlgIgpvdXRwdXQ6CiAgaHRtbF9kb2N1bWVudDoKICAgIHRoZW1lOiByZWFkYWJsZQogICAgdG9jOiB0cnVlCiAgICB0b2NfZGVwdGg6IDIKICAgIHRvY19mbG9hdDogdHJ1ZQogICAgY29kZV9kb3dubG9hZDogdHJ1ZQotLS0KCkRhdGEgZnJvbSBhIHJhbmRvbWl6ZWQgdHJpYWwgdGFyZ2V0aW5nIGNvdXBsZXMgYXQgaGlnaCByaXNrIG9mIEhJVgppbmZlY3Rpb24uIFRoZSBpbnRlcnZlbnRpb24gcHJvdmlkZWQgY291bnNlbGluZyBzZXNzaW9ucyByZWdhcmRpbmcKcHJhY3RpY2VzIHRoYXQgY291bGQgcmVkdWNlIHRoZWlyIGxpa2VsaWhvb2Qgb2Yg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