calc_prop_vacc_SIA: Calculate the total proportion vaccinated by routine...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/funcs.R

Description

This function calculates the proportion immune due to vaccination given the proportion vaccinated at each routine activity plus one SIA campaign and the effectiveness of each dose. The function assumes that vaccination events are dependent by default, where individuals that have recieved the first dose are the most likely to recieve the second dose and those that have received both the first and second doses are the most likely to receive the third. receipt of dose in SIA campaign is dependent on having any number of prior doses. The function uses either the two-dose plus SIA or three-dose plus SIA method based on the length of V.

Usage

1
calc_prop_vacc_SIA(V, S, effectiveness, independent = FALSE)

Arguments

V

a vector giving the proportion vaccinated for up to three routine immunization activities

S

a scalar giving the proportion vaccinated with SIA campaign

effectiveness

scalar or vector giving the vaccine effectiveness for each number of doses

independent

logical indicating if receipt of routine vaccine dose is depends on the number of prior doses received and receipt of SIA dose depends on at least one prior dose (default = FALSE)

Details

Length of effectiveness must be equal to the number of vaccination activities

Value

A scalar giving the total proportion of the population immune due to vaccination

Author(s)

John Giles

See Also

Other prop_vacc: calc_doses_SIA(), calc_doses(), calc_prop_vacc()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Two dose measles vaccine: routine without SIA
calc_prop_vacc(V=c(0.9, 0.8),
               effectiveness=c(0.84, 0.941),
               independent=FALSE)

calc_prop_vacc(V=c(0.9, 0.8),
               effectiveness=c(0.84, 0.941),
               independent=TRUE)

# Three dose vaccine: routine without SIA
calc_prop_vacc(V=c(0.9, 0.8, 0.7),
               effectiveness=c(0.85, 0.9, 0.95))

# Estimate posterior distribution of proportion vaccinated given uncertainty around MCV1 and MCV2
n <- 1000
sims <- rep(NA, n)
for (i in 1:n) {

  sims[i] <- calc_prop_vacc(V=c(rbeta(1,40,1), rbeta(1,4,2)),
                      effectiveness=c(0.85, 0.94),
                      independent=FALSE)
}

q <- quantile(sims, c(0.025, 0.5, 0.975))

par(mfrow=c(1,1))
hist(sims, breaks=100, col='cyan', xlab='Proportion vaccinated')
abline(v=q[2], lwd=3)
abline(v=q[c(1,3)], lty=2, lwd=2)

gilesjohnr/propvacc documentation built on Aug. 24, 2020, 3:20 a.m.