athowes / multi-agyw

Spatio-temporal estimates of HIV risk group proportions for AGYW across 13 priority countries in sub-Saharan Africa
https://athowes.github.io/multi-agyw
MIT License
2 stars 2 forks source link

Align PHIA to DHS on cohabiting #84

Open athowes opened 2 years ago

athowes commented 2 years ago

The PHIA coding is now:

sexcohab = case_when(
sex12m == FALSE ~ FALSE,
(part12monum == 1) & ((!partrelation1 %in% cas_cats) & (!partrelation2 %in% cas_cats) & (!partrelation3 %in% cas_cats)) ~ TRUE,
TRUE ~ FALSE
)

sexnonreg = case_when(
nosex12m == TRUE ~ FALSE,
part12monum > 1 ~ TRUE, # More than one partner
# One partner not cohabiting
(part12monum == 1) & ((partrelation1 %in% cas_cats) | (partrelation2 %in% cas_cats) | (partrelation3 %in% cas_cats)) ~ TRUE,
TRUE ~ FALSE
)

where cas_cats <- c(3, 4, 5, 6, 7, 8, 96) and

# Relationship to partner i, where:
# 1 = Husband or wife
# 2 = Live-in partner
# 3 = Partner (not living with)
# 4 = Ex-spouse or partner
# 5 = Friend or acquantance
# 6 = Sex worker
# 7 = Sex worker client
# 8 = Stranger
# 96 = Other

As compared with DHS:

# sexcohab = whether reports sex with only one cohabiting partner in the past
# 12 mo. Recode v766b (# partners in past 12 mo) and v767a-c (relationship
# w/partners)
# Currently if your partner type is missing or inconsistent and
# you had only one partner in the past year you are classified as a "yes"
# for having sex with only one cohabiting partner

# v767a-c coding does not match DHS questionnaire and isn't labelled - correct is:
# 1 = spouse, 2 = boyfriend not living with respondent, 3 = other friend
# 4 = casual acquaintance, 5 = relative, 6 = commercial sex worker,
# 7 = live-in partner, 96 = other
cas_cats <- c(2, 3, 4, 5, 6, 96)
dat$sexcohab <- dplyr::case_when(dat$sex12m == FALSE ~ FALSE,
dat$v766b == 1 & ((!dat$v767a %in% cas_cats) &
(!dat$v767b %in% cas_cats) &
(!dat$v767c %in% cas_cats)) ~ TRUE,
dat$v766b == 99 ~ NA,
TRUE ~ FALSE)

# sexnonreg = whether the person reports having non-regular sexual partner(s)
# or multiple partners in the past year. Recode v766b (# partners in past 12 mo)
# and v767a-c (relationship w/partners)
dat$sexnonreg <- dplyr::case_when(dat$sex12m == FALSE ~ FALSE,
(dat$v766b > 1 & dat$v766b != 99) |
(dat$v767a %in% cas_cats | dat$v767b %in% cas_cats |
dat$v767c %in% cas_cats) ~ TRUE,
dat$v766b == 99 ~ NA,
TRUE ~ FALSE)

PHIA cohabiting excludes: partner (not living with), ex-spouse or partner, friend or acquaintance, sex worker or client, stranger, other. DHS cohabiting excludes: boyfriend (not living with), other friend, casual acquaintance, relative, sex worker, other

athowes commented 2 years ago

Alternative definition in DHS using husband cohabiting question (compare).

athowes commented 2 years ago

Prior to change being made:

image

After change has been made:

image

Now need to alter definition of sexnonreg and sexnonregplus to capture these new people who are no longer in cohabiting!

athowes commented 2 years ago

Alteration made (https://github.com/athowes/naomi.utils/commit/77fb1c11782540b7ac637b53e8e5c1994688f210) and run through all the surveys. Seem to have swapped one problem for another problem.

Prior:

image

After:

image

athowes commented 2 years ago

DHS and PHIA in Malawi

sexmultiple is an indicator for having multiple partners (defined as two or more). For the PHIA:

> phia_survey_indicators %>%
+ filter(indicator == "sexmultiple", area_id == "MWI")
# A tibble: 4 × 15
indicator survey_id survey_mid_calendar… area_id area_name res_type sex age_group n_clusters n_observations n_eff_kish estimate
<chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <int> <int> <dbl> <dbl>
1 sexmultiple MWI2016PHIA CY2016Q1 MWI Malawi all fema… Y015_024 488 3580 2624. 0.0411
2 sexmultiple MWI2016PHIA CY2016Q1 MWI Malawi all fema… Y015_019 442 1646 1248. 0.0388
3 sexmultiple MWI2016PHIA CY2016Q1 MWI Malawi all fema… Y020_024 463 1934 1466. 0.0440
4 sexmultiple MWI2016PHIA CY2016Q1 MWI Malawi all fema… Y025_029 454 1511 1135. 0.0321

Whereas for the DHS:

> survey_indicators %>%
+   filter(indicator == "sexmultiple", area_id == "MWI") %>%
+   select(indicator, survey_id, age_group, estimate)
# A tibble: 16 × 4
   indicator   survey_id  age_group estimate
   <chr>       <chr>      <chr>        <dbl>
 1 sexmultiple MWI2000DHS Y015_024   0.0105 
 2 sexmultiple MWI2000DHS Y015_019   0.0108 
 3 sexmultiple MWI2000DHS Y020_024   0.0102 
 4 sexmultiple MWI2000DHS Y025_029   0.00759
 5 sexmultiple MWI2004DHS Y015_024   0.0114 
 6 sexmultiple MWI2004DHS Y015_019   0.0102 
 7 sexmultiple MWI2004DHS Y020_024   0.0124 
 8 sexmultiple MWI2004DHS Y025_029   0.00781
 9 sexmultiple MWI2010DHS Y015_024   0.00722
10 sexmultiple MWI2010DHS Y015_019   0.00657
11 sexmultiple MWI2010DHS Y020_024   0.00794
12 sexmultiple MWI2010DHS Y025_029   0.00697
13 sexmultiple MWI2015DHS Y015_024   0.0127 
14 sexmultiple MWI2015DHS Y015_019   0.0130 
15 sexmultiple MWI2015DHS Y020_024   0.0123 
16 sexmultiple MWI2015DHS Y025_029   0.0123 

Takeaway: there is a 3% difference between the DHS and PHIA for how many women have multiple partners.