Skip to content

Commit

Permalink
v0.1.3 with clearer docs
Browse files Browse the repository at this point in the history
  • Loading branch information
OJWatson committed Jan 25, 2023
1 parent ee9ec80 commit a2e2e90
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: hrp2malaRia
Type: Package
Title: pfhrp2 gene deletion malaria modelling
Version: 0.1.2
Date: 2023-01-20
Version: 0.1.3
Date: 2023-01-25
Author: OJ Watson
Maintainer: <[email protected]>
Description: Individual based malaria transmission model.
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## hrp2malaRia 0.1.3

* Better NMF documentation

## hrp2malaRia 0.1.2

* Fix to hrp2_Simulation introduced during previous version
Expand Down
8 changes: 5 additions & 3 deletions R/hrp2-simulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
#' @param microscopy.use Probability of microscopy use. Default = 0, i.e. no microscopy
#' @param include.nmf Boolean detailing whether to include nmf section. Default = FALSE
#' @param fever.age.breaks Age breaks for fevers
#' @param annual.nmf.per.age.bracket Annual number of non malarial fevers for each age bracket in fever.age.breaks.
#' Default is mean across 5 representative surveys from Burundi 2012, Liberia 2009/2011 and Nigeria 2010/2015
#' @param annual.nmf.per.age.bracket Annual number of non malarial fevers sufficiently severe to trigger
#' treatment seeking for the fever and receieve assessment. These are reported for each age bracket in fever.age.breaks.
#' Default is based on eLife 2017 Watson et al.
#' @param nmf.multiplier Multiplication for annual.nmf.per.age.bracket to introduce sensitivity. Default = 1
#' ## delays and durations
#' @param delay.mos Mosquito extrinsic incubation period (days). Default = 10
Expand Down Expand Up @@ -1040,8 +1041,9 @@ hrp2_Simulation <- function(

# identify any hrp2' only individuals
rdt.det.D.or.A.nmf <- rep(1,length(D.or.A.pos.nmf))

# probability that hrp2' only individual will still be treated, 1 - chance of not being hrp3, microscopied or nonadherence
rdt.det.D.or.A.nmf[which(res$N.Sens[D.or.A.pos.nmf,res$Counter] == 0)] <- ft * (1 - ((1-rdt.det)*(1-rdt.nonadherence)*(1-microscopy.use)))
rdt.det.D.or.A.nmf[which(res$N.Sens[D.or.A.pos.nmf,res$Counter] == 0)] <- (1 - ((1-rdt.det)*(1-rdt.nonadherence)*(1-microscopy.use)))

D.or.A.treated.pos.nmf <- D.or.A.pos.nmf[which(rbinom(length(D.or.A.pos.nmf),size = 1,rdt.det.D.or.A.nmf)==1)]
res$Status[D.or.A.treated.pos.nmf,res$Counter] <- 5
Expand Down

0 comments on commit a2e2e90

Please sign in to comment.