convertPrevalence: Convert parasite rate estimates between age categories.

Description Usage Arguments Details Value Author(s) References Examples

Description

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.

Usage

1
2
3
4
5
6
7
convertPrevalence(prevalence,
                  age_min_in,
                  age_max_in,
                  age_min_out = rep(2, length(prevalence)),
                  age_max_out = rep(9, length(prevalence)),
                  parameters = "Pf_Smith2007",
                  sample_weights = NULL)

Arguments

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 prevalence.

age_max_in

A vector giving the (inclusive) upper bound on the age range associated with the prevalence estimates given in prevalence.

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 prevalence, i.e. ages *above* 2.

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 prevalence, i.e. ages 9 and below.

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, sample_weights must be a vector of length 85 giving the age distribution of the population (i.e. the proportion of the population with age falling within 85 1-year bins: 0-1, 1-2, ..., 83-84, 84-85+). If sample_weights = NULL the average age distribution given in the studies used in Smith et al. (2007) are used.

Details

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.

Value

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.

Author(s)

David L. Smith and Nick Golding

References

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).

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
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")

SEEG-Oxford/ageStand documentation built on May 9, 2019, 11:07 a.m.