mrc-ide / leapfrog

Multistate population projection model for demographic estimation.
Other
2 stars 5 forks source link

add functions to read PMTCT and child ART inputs #45

Closed jeffeaton closed 1 year ago

jeffeaton commented 1 year ago

This PR adds several functions to read the PMTCT, Child ART, breastfeeding percentage, and abortion inputs from Spectrum Programme statistics input editor.

These are the functions and example usage:

pjnz <- system.file("pjnz/bwa2021_v6.13.pjnz", package = "leapfrog")
dp <- read_dp(pjnz)
dp_anc_testing <- dp_read_anc_testing(dp)
dp_pmtct <- dp_read_pmtct(dp)
dp_read_pmtct <- dp_read_pmtct_retained(dp)
dp_abortion <- dp_read_abortion(dp)
dp_notbreastfeeding <- dp_read_breastfeeding(dp)
dp_childart <- dp_read_childart(dp)
dp_childltfu <- dp_read_childltfu(dp)

## Can either pass PJNZ path or parsed "spectrum_dp" object

anc_testing1 <- dp_read_anc_testing(pjnz)
anc_testing2 <- dp_read_anc_testing(dp)
all.equal(anc_testing1, anc_testing2)

Things are returned as matrices with rows for indicators and columns for each year---mimicking the input editors in Spectrum.

Please review and let me know:

  1. anything doesn't make sense,
  2. any inputs you need that are missing,
  3. any suggestions for better ways to format
  4. anything that is wrong (of course)

A few further notes:

mwalte10 commented 1 year ago

Approving to merge into my branches, copying what is missing below in case it gets lost.

We are missing the following:

Transmission:

mtct transmission rates Distribution of new infections by CD4 Treatment:

ART initiation by age Disease progression:

HIV mortality without ART HIV mortality with ART Mortality rate ratios over time Disease progression rates