Description Usage Arguments Details Value Author(s) References Examples
Given a malaria parasite rate for a specific age category, used the modified Pull and Grab model introduced by Smith et al. (2007) to estimate the parasite rate for any other age category.
1 2 3 4 5 6 7 |
prevalence |
A vector giving the malaria prevalence (parasite rate) estimates to convert from. |
age_min_in |
A vector giving the (exclusive) lower bound on the age range associated with the prevalence estimates given in |
age_max_in |
A vector giving the (inclusive) upper bound on the age range associated with the prevalence estimates given in |
age_min_out |
A vector giving the (exclusive) lower bound on the age range for which the resulting prevalence estimate is to be calculated. Defaults to 2 for all elements of |
age_max_out |
A vector giving the (inclusive) upper bound on the age range for which the resulting prevalence estimate is to be calculated. Defaults to 9 for all elements of |
parameters |
The set of parameters to use in the model. This can either be "Pf_Smith2007" to use the parameters for Plasmodium falciparum defined in Smith et al. (2007), "Pv_Gething2012" for the P. vivax parameters used in Gething et al. (2012), or a user-specified vector givng the values of parameters b, s, c and α, in that order. |
sample_weights |
If specified, |
The vectors prevalence
, age_min_in
, age_max_in
, age_min_out
and age_max_out
must all have the same length.
If any element of these vectors is NA
, the corresponding output is also NA
and a warning is issued.
See Smith et al. (2007) for details of the model used.
A vector of the same length as prevalence
with each element giving the parasite rate estimates for the age range bounded by the corresponding elements of age_min_out
and age_max_out
.
David L. Smith and Nick Golding
Smith, D. L. et al. Standardizing estimates of the Plasmodium falciparum parasite rate. Malar. J. 6, 131 (2007).
Gething, P. W. et al. A long neglected world malaria map: Plasmodium vivax endemicity in 2010. PLoS Negl. Trop. Dis. 6, e1814 (2012).
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # convert a 2-10 PfPR of 0.1 to all-ages prevalence using the
# parameters for PfPR from Smith *et al.* (2007) - the default.
convertPrevalence(prevalence = 0.1,
age_min_in = 2,
age_max_in = 9,
age_min_out = 0,
age_max_out = 85)
# convert a 2-10 *PvPR* of 0.3 to 60-85 prevalence using the
# parameters for PvPR from Gething *et al.* (2012)
convertPrevalence(prevalence = 0.3,
age_min_in = 2,
age_max_in = 9,
age_min_out = 60,
age_max_out = 85,
parameters = "Pv_Gething2012")
# The same again, but using a user-specified set of parameters
convertPrevalence(prevalence = 0.3,
age_min_in = 2,
age_max_in = 9,
age_min_out = 60,
age_max_out = 85,
parameters = c(b = 1.2,
s = 0.8,
c = 0.1,
alpha = 5.1))
# The function is vectorized, so convert a whole load of PvPRs with different
# age ranges to 2-10 PvPR (the default) using the Gething *et al.* (2013)
# parameters
convertPrevalence(prevalence = (1:5) / 10,
age_min_in = 1:5,
age_max_in = (1:5) * 10,
parameters = "Pv_Gething2012")
# If any of the vectors are NA, an NA is returned for that element and a warning is issued
convertPrevalence(prevalence = c(0.1, NA, 0.3),
age_min_in = c(1, 2, NA),
age_max_in = (1:3) * 10,
parameters = "Pv_Gething2012")
# Same for a single record
convertPrevalence(prevalence = 0.1,
age_min_in = NA,
age_max_in = 10,
parameters = "Pv_Gething2012")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.