EpiModel/EpiModelHIV

Over counts based on multiple infections within timesteps

dth2 opened this issue · 0 comments

dth2 commented

In the transmission module the transmission events and type defined by:

infected <- c(disc.ip[trans.ip == 1, 2],
              disc.rp[trans.rp == 1, 1])
inf.role <- c(rep(0, sum(trans.ip)), rep(1, sum(trans.rp)))
inf.type <- c(disc.ip[trans.ip == 1, "ptype"],
              disc.rp[trans.rp == 1, "ptype"])

These vectors are not unique which is not a problem when [infected] is used as an index but it results in over counts in the Epi summary statistics:

dat$epi$incid[at] <- length(infected)

dat$epi$trans.main[at] <- sum(inf.type == 1)
dat$epi$trans.casl[at] <- sum(inf.type == 2)
dat$epi$trans.inst[at] <- sum(inf.type == 3)