Closed andsv2 closed 3 years ago
Process Schematic 1: Partner Identification
param <- param_msm(epistats = epistats,
netstats = netstats,
part.hiv.test.rate = c(1, 1, 1),
part.ident.main.window = 52,
part.ident.casl.window = 52,
part.ident.ooff.window = 52,
part.ident.main.prob = 1,
part.ident.casl.prob = 1,
part.ident.ooff.prob = 1,
part.index.window = Inf,
part.ident.start = 1
)
init <- init_msm()
control3 <- control_msm(simno = 1001, nsteps = 2, ncores = 1, nsims = 1, save.nwstats = FALSE, save.clin.hist = FALSE, tergmLite = TRUE)
set.seed(123)
dat <- initialize_msm(est, param, init, control3, s = 1)
for (at in 2:9) { dat <- aging_msm(dat, at) dat <- departure_msm(dat, at) dat <- arrival_msm(dat, at) dat <- partident_msm(dat, at) dat <- hivtest_msm(dat, at) dat <- hivtx_msm(dat, at) dat <- hivprogress_msm(dat, at) dat <- hivvl_msm(dat, at) dat <- simnet_msm(dat, at) dat <- acts_msm(dat, at) dat <- condoms_msm(dat, at) dat <- position_msm(dat, at) dat <- prep_msm(dat, at) dat <- hivtrans_msm(dat, at) dat <- stitrans_msm(dat, at) dat <- stirecov_msm(dat, at) dat <- stitx_msm(dat, at) dat <- prevalence_msm(dat, at) verbose.net(dat, "progress", at = at) }
at = 10 dat <- aging_msm(dat, at) dat <- departure_msm(dat, at) dat <- arrival_msm(dat, at) dat <- partident_msm(dat, at)
#
dat$attr$uid[c(6512, 14619, 13922, 5826, 18990, 19417)] [1] 6658 14919 14202 5959 19365 19806
Process Schematic 2: Identified Partner Testing
## From debug of hivtest_msm: true status of identified partners
eligPart <- which(part.ident == at & (diag.status == 0 | is.na(diag.status)))
head(eligPart)
[1] 40 61 67 69 78 81
status[head(eligPart)]
[1] 0 0 0 0 0 0
## Update when an individual has been screened through the partner identification
## process
prob.screen <- part.hiv.test.rate[race[eligPart]]
screened <- eligPart[rbinom(length(eligPart), 1, prob.screen) == 1]
dat$attr$part.scrnd[screened] <- at
dat$attr$part.scrnd[head(eligPart)] [1] 2 2 2 2 2 2
Process Schematic 3: PrEP initiation
## From debug of prep_msm
idsEligStartPart <- which(part.ident == at & diag.status == 0 &
prepStat == 0)
head(idsEligStartPart)
[1] 40 61 67 69 78 81
dat$attr$part.ident[head(idsEligStartPart)]
[1] 2 2 2 2 2 2
head(idsStartPart) #ID's of identified partners who started PrEP services
[1] 40 61 67 78 81 95
dat$attr$prepStat[head(idsStartPart)]
[1] 1 1 1 1 1 1
dat$attr$prepStartTime[head(idsStartPart)]
[1] 2 2 2 2 2 2
The below will run through testing of each stage of the CombPrevNet workflow in EpiModelHIV.