Description Usage Arguments Value Author(s) See Also Examples
This function calculates the proportion immune due to vaccination given the proportion vaccinated at
each routine activity 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. The function uses either the two-dose
or three-dose method based on the length of V
.
1 | calc_prop_vacc(V, effectiveness, independent = FALSE)
|
V |
a vector giving the proportion vaccinated for up to three routine immunization activities |
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 (default = FALSE) |
A scalar giving the total proportion of the population immune due to vaccination
John Giles
Other prop_vacc:
calc_doses_SIA()
,
calc_doses()
,
calc_prop_vacc_SIA()
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.