| Title: | Analyzing Human Exposure to Mosquito Biting |
|---|---|
| Description: | Tools to analyse human and mosquito behavioral interactions and to compute exposure to mosquito bites estimates. Using behavioral data for human individuals and biting patterns for mosquitoes, you will be able to compute hourly exposure for bed net users and non-users, and summarize (e.g. proportion indoors and outdoors, proportion per time periods, and proportion prevented by bed nets) or visualize these dynamics across a 24-hour cycle. |
| Authors: | Nicolas Moiroux [aut, cre] (ORCID: <https://orcid.org/0000-0001-6755-6167>) |
| Maintainer: | Nicolas Moiroux <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.3 |
| Built: | 2025-11-26 13:11:10 UTC |
| Source: | https://github.com/Nmoiroux/ExpBites |
Using a model of behavioral interactions, computes the hourly exposure to mosquito bites for both bednet users and non-users, based on their location (indoors, outdoors, under a net) and mosquito biting rates. For users, exposure is adjusted for the protective effect of bednets.
calculate_Exp(df, df_bites, protection = 0.92)calculate_Exp(df, df_bites, protection = 0.92)
df |
A dataframe with individual-level data, including columns:
|
df_bites |
A dataframe of biting rates by hour, with columns:
|
protection |
A numeric value (default = 0.92, according to Corbel et al. (2010) for Permanet 2 ITNs) indicating the proportion of bites prevented by bednet use. |
The mathematical model of behavioral interactions is an extension of the Killeen et al. (2006) model as previously described in Geissbühler et al. (2007) and Moiroux et al. (2014)
A dataframe with one row per hour (0–23) and the following columns:
Bi_t – indoor biting rate,
Bo_t – outdoor biting rate,
N – number of human individuals,
Np – number of human individuals that are net users,
It – proportion of people indoors (users and non-users),
Eui – mean exposure of non-users indoors,
Euo – mean exposure of non-users outdoors,
Eu – total mean exposure of non-users,
p_in – proportion of people (users) being indoors,
p_net – proportion of people (users) being asleep (under net),
Epi – mean exposure of users indoors (not under net),
Epn – mean exposure of users indoors under bed net (adjusted by protection),
Epo – mean exposure of users outdoors,
Epp – mean exposure prevented by bed net use,
Ep – total mean exposure of users.
Corbel V, Chabi J, Dabiré RK, Etang J, Nwane P, Pigeon O, Akogbeto M, Hougard J (2010).
“Field Efficacy of a New Mosaic Long-Lasting Mosquito Net (PermaNet 3.0) against Pyrethroid-Resistant Malaria Vectors: A Multi Centre Study in Western and Central Africa.”
Malaria Journal, 9, 113.
ISSN 1475-2875, doi:10.1186/1475-2875-9-113.
Geissbühler Y, Chaki P, Emidi B, Govella NJ, Shirima R, Mayagaya V, Mtasiwa D, Mshinda H, Fillinger U, Lindsay SW, Kannady K, de Castro MC, Tanner M, Killeen GF (2007).
“Interdependence of Domestic Malaria Prevention Measures and Mosquito-Human Interactions in Urban Dar Es Salaam, Tanzania.”
Malaria Journal, 6, 126.
ISSN 1475-2875, doi:10.1186/1475-2875-6-126.
Killeen GF, Kihonda J, Lyimo E, Oketch FR, Kotas ME, Mathenge E, Schellenberg JA, Lengeler C, Smith TA, Drakeley CJ (2006).
“Quantifying Behavioural Interactions between Humans and Mosquitoes: Evaluating the Protective Efficacy of Insecticidal Nets against Malaria Transmission in Rural Tanzania.”
BMC infectious diseases, 6, 161.
ISSN 1471-2334, doi:10.1186/1471-2334-6-161.
Moiroux N, Damien GB, Egrot M, Djenontin A, Chandre F, Corbel V, Killeen GF, Pennetier C (2014).
“Human Exposure to Early Morning Anopheles Funestus Biting Behavior and Personal Protection Provided by Long-Lasting Insecticidal Nets.”
PloS One, 9(8), e104967.
ISSN 1932-6203, doi:10.1371/journal.pone.0104967.
# generate fake data df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) df_bites <- gen_df_mosquito() # calculate mean hourly exposure to bites exposure_results <- calculate_Exp(df, df_bites)# generate fake data df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) df_bites <- gen_df_mosquito() # calculate mean hourly exposure to bites exposure_results <- calculate_Exp(df, df_bites)
Simulates the hourly state of a set of individuals (either bednet users or non-users) over a 24-hour period. Each individual's state is assigned probabilistically based on the hour of the day and whether they use a bednet.
gen_df_human(n_individuals = 100, hours = c(0:23), prob_use = 0.5)gen_df_human(n_individuals = 100, hours = c(0:23), prob_use = 0.5)
n_individuals |
Integer. Number of individuals to simulate. Default is 100. |
hours |
Integer vector. The hours of the day to simulate, typically |
prob_use |
Numeric. Probability of being a bednet user vs non-user. Default is 0.5. |
A data.frame with the following columns:
Individual ID.
Hour of the day (0–23).
Logical, indicating whether the individual is a bednet user.
Integer representing the individual’s state at that hour:
1 = outdoors, 2 = indoors and awake, 3 = indoors asleep (non-user), 4 = indoors asleep under bednet (user).
Factor version of state with descriptive labels.
df <- gen_df_human(n_individuals = 50) df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) head(df)df <- gen_df_human(n_individuals = 50) df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) head(df)
Simulates the number of Anopheles mosquito bites occurring indoors and outdoors for each hour of the day. Biting rates follow predefined lambda patterns that reflect typical mosquito activity (e.g., low during the day, peaking at night).
gen_df_mosquito()gen_df_mosquito()
A data.frame with the following columns:
Hour of the day (0–23).
Simulated number of mosquito bites occurring indoors for each hour.
Simulated number of mosquito bites occurring outdoors for each hour.
df_bites <- gen_df_mosquito() head(df_bites)df_bites <- gen_df_mosquito() head(df_bites)
Generates a dual-axis plot showing the hourly variation in human behavior (proportion of individuals indoors and under bednets) and mosquito biting behavior (biting rates indoors and outdoors). Human behavior is shown as a stacked area plot on the primary Y-axis, while mosquito biting rates are shown as lines on the secondary Y-axis. Hours are centered on midnight.
plot_behaviors(data)plot_behaviors(data)
data |
A dataframe (typically the output of
|
A ggplot2 plot object with a stacked area chart for human behavior (on the primary Y-axis)
and line plots for mosquito biting rates (on the secondary Y-axis), with hours centered on midnight.
# generate fake data df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) df_bites <- gen_df_mosquito() # calculate mean hourly exposure to bites exposure_results <- calculate_Exp(df, df_bites) # plot plot_behaviors(exposure_results)# generate fake data df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) df_bites <- gen_df_mosquito() # calculate mean hourly exposure to bites exposure_results <- calculate_Exp(df, df_bites) # plot plot_behaviors(exposure_results)
Creates a stacked area chart showing the hourly distribution of exposure to mosquito bites among bednet users, broken down by exposure type: outdoors, indoors (no net), indoors (under net), and prevented exposure due to bednet use. The hours are centered on midnight for better visualization.
plot_exposure(data, cPalette = c("#000000", "#E69F00", "#56B4E9", "#009E73"))plot_exposure(data, cPalette = c("#000000", "#E69F00", "#56B4E9", "#009E73"))
data |
A dataframe resulting from the
|
cPalette |
A character vector of color values (hex codes or color names) used to fill each exposure category.
Must be of length 4 and will be applied in the following order:
|
A ggplot2 stacked area chart object showing the distribution of exposure types across centered hours.
# generate fake data df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) df_bites <- gen_df_mosquito() # calculate mean hourly exposure to bites exposure_results <- calculate_Exp(df, df_bites) # plot plot_exposure(exposure_results)# generate fake data df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) df_bites <- gen_df_mosquito() # calculate mean hourly exposure to bites exposure_results <- calculate_Exp(df, df_bites) # plot plot_exposure(exposure_results)
Computes daily (24h) and interval-specific exposure statistics for both non-users and bednet users,
based on the output of calculate_Exp. Protective efficacy of bednets
and proportion of exposure indoors or during the specified interval are computed.
summarise_exposure(data, interval = c(22, 5))summarise_exposure(data, interval = c(22, 5))
data |
A dataframe returned by
|
interval |
A numeric vector of length 2 giving the start and end hour (inclusive) of the time interval,
e.g., |
The mathematical model of behavioral interactions is an extension of the Killeen et al. (2006) model as previously described in Geissbühler et al. (2007) and Moiroux et al. (2014)
A tibble with three columns:
Character string indicating the category of summary: "non_user_daily", "user_daily",
"non_user_interval", "user_interval", "interval_vs_daily" or "net_efficacy".
Name of the exposure component or metric (e.g., "Eui", "Euo", "Ep",
"Epp", "prop_indoor", etc., "prop_interval_non_user", "prop_interval_user" and "prop_prevented").
Numeric value corresponding to the output for the given type.
Geissbühler Y, Chaki P, Emidi B, Govella NJ, Shirima R, Mayagaya V, Mtasiwa D, Mshinda H, Fillinger U, Lindsay SW, Kannady K, de Castro MC, Tanner M, Killeen GF (2007).
“Interdependence of Domestic Malaria Prevention Measures and Mosquito-Human Interactions in Urban Dar Es Salaam, Tanzania.”
Malaria Journal, 6, 126.
ISSN 1475-2875, doi:10.1186/1475-2875-6-126.
Killeen GF, Kihonda J, Lyimo E, Oketch FR, Kotas ME, Mathenge E, Schellenberg JA, Lengeler C, Smith TA, Drakeley CJ (2006).
“Quantifying Behavioural Interactions between Humans and Mosquitoes: Evaluating the Protective Efficacy of Insecticidal Nets against Malaria Transmission in Rural Tanzania.”
BMC infectious diseases, 6, 161.
ISSN 1471-2334, doi:10.1186/1471-2334-6-161.
Moiroux N, Damien GB, Egrot M, Djenontin A, Chandre F, Corbel V, Killeen GF, Pennetier C (2014).
“Human Exposure to Early Morning Anopheles Funestus Biting Behavior and Personal Protection Provided by Long-Lasting Insecticidal Nets.”
PloS One, 9(8), e104967.
ISSN 1932-6203, doi:10.1371/journal.pone.0104967.
# generate fake data df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) df_bites <- gen_df_mosquito() # calculate mean hourly exposure to bites exposure_results <- calculate_Exp(df, df_bites) # summarise exposure estimates summarise_exposure(exposure_results, interval = c(22, 5))# generate fake data df <- gen_df_human(n_individuals = 100, hours = c(0:9,17:23)) df_bites <- gen_df_mosquito() # calculate mean hourly exposure to bites exposure_results <- calculate_Exp(df, df_bites) # summarise exposure estimates summarise_exposure(exposure_results, interval = c(22, 5))