Skip to content

Commit

Permalink
adjust art_dropout to annualised rate
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffeaton committed Jul 25, 2024
1 parent 8a1ce36 commit 538c864
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

This has modest overall difference, but was a source of numerical differences between
Spectrum and EPP-ASM.

* Patch ART dropout implementation. Spectrum converts input ART dropout percent to an
annual rate using [dropout rate] = -log(1.0 - [input percent]).


## eppasm 0.7.6

Expand Down
6 changes: 4 additions & 2 deletions R/spectrum.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ create_spectrum_fixpar <- function(projp, demp, hiv_steps_per_year = 10L, proj_s
} else {
fp$art_dropout_recover_cd4 <- art_dropout_recover_cd4
}

fp$art_dropout <- projp$art_dropout[as.character(proj_start:proj_end)]/100

## Convert input percent dropout in 12 months to an annual rate (Rob Glaubius email 25 July 2024)
fp$art_dropout <- -log(1.0 - projp$art_dropout[as.character(proj_start:proj_end)]/100)

fp$median_cd4init <- projp$median_cd4init[as.character(proj_start:proj_end)]
fp$med_cd4init_input <- as.integer(fp$median_cd4init > 0)
fp$med_cd4init_cat <- replace(findInterval(-fp$median_cd4init, - c(1000, 500, 350, 250, 200, 100, 50)),
Expand Down

0 comments on commit 538c864

Please sign in to comment.