## Characterizing semi-nomadic populations ## Script to generate figures for manuscript ## Date: February 3, 2024 ## Author: Hannah Meredith ## load libraries and data library(dplyr) library(tidyr) library(ggplot2) library(epiDisplay) library(lme4) library(extrafont) library(leaflet) library(leaflet.esri) library(geosphere) source("make_table_functions.R") # Load data household <- read.csv("Household_details.csv") # Malaria analysis: household data member <- read.csv("Member_details.csv") # Malaria analysis: household member data night.tracks <- read.csv("Night_tracks.csv") # GPS logger sub-analysis: tracks logged at night all.tracks <- read.csv("All_tracks.csv") # GPS logger sub-analysis: tracks logged at any point any.traveler <- read.csv("Any_traveler.csv") # Travel analysis: travel survey data ################################################################################ ########## Categorizing and characterizing individual trip types ############### ################################################################################ trip.types = characterize.trip.types(all.tracks, night.tracks) all.tracks = trip.types[[1]] # updated file with trip.types - used for plotting gps.point.stats = trip.types[[2]] #summary of trip.type details- used for tables ############Table 1: GPS details ############# majority.long <- gps.point.stats %>% filter(trip.type == "Longterm") quantile(majority.long$Trip_length) quantile(majority.long$num.changes) quantile(majority.long$num.campsites) quantile(majority.long$Total_night_distance_km) quantile(majority.long$Total_distance_km) majority.transient <- gps.point.stats %>% filter(trip.type == "Transient") quantile(majority.transient$Trip_length) quantile(majority.transient$num.changes) quantile(majority.transient$num.campsites) quantile(majority.transient$Total_night_distance_km) quantile(majority.transient$Total_distance_km) one.location <- gps.point.stats %>% filter(trip.type == "Static") quantile(one.location$Trip_length) quantile(one.location$num.changes) quantile(one.location$num.campsites) quantile(one.location$Total_night_distance_km) quantile(one.location$Total_distance_km) one.location.daytrips <- gps.point.stats %>% filter(trip.type == "Day_trip") quantile(one.location.daytrips$Trip_length) quantile(one.location.daytrips$num.changes) quantile(one.location.daytrips$num.campsites) quantile(one.location.daytrips$Total_night_distance_km) quantile(one.location.daytrips$Total_distance_km) ############# Table 1: Survey data for various subsets of travelers ############### travel.data <- all.tracks %>% group_by(GPS_carrier_ID) %>% slice(1) travel.data <- travel.data %>% group_by(GPS_carrier_ID) %>% mutate(Camps_reported = ifelse(!is.na(Trip1_travel_time) & !is.na(Trip2_travel_time) & !is.na(Trip3_travel_time), 3, ifelse(!is.na(Trip1_travel_time) & !is.na(Trip2_travel_time) & is.na(Trip3_travel_time), 2, 1)), AnyCamp_Travel_Time = mean(c(Trip1_travel_time, Trip2_travel_time, Trip3_travel_time), na.rm = T), AnyCamp_Stay_duration = mean(c(Stay1_duration, Stay2_duration, Stay3_duration), na.rm = T), AnyCamp_nonhousehold_members = ifelse(sum(c(Camp1_nonhousehold_members, Camp2_nonhousehold_members, Camp3_nonhousehold_members), na.rm = T) >= 1, 1, 0), AnyCamp_people_count = median(c(Camp1_people_count, Camp2_people_count, Camp3_people_count), na.rm = T), AnyCamp_Water_Open = ifelse(sum(Camp1_Water_open, Camp2_Water_open, Camp3_Water_open) > 0 & sum(Camp1_Water_closed, Camp2_Water_closed, Camp3_Water_closed) == 0, 1, 0), AnyCamp_Water_OpenClosed = ifelse(sum(Camp1_Water_open, Camp2_Water_open, Camp3_Water_open) > 0 & sum(Camp1_Water_closed, Camp2_Water_closed, Camp3_Water_closed) > 0, 1, 0), AnyCamp_Water_Closed = ifelse(sum(Camp1_Water_open, Camp2_Water_open, Camp3_Water_open) == 0 & sum(Camp1_Water_closed, Camp2_Water_closed, Camp3_Water_closed) > 0, 1, 0), AnyCamp_goats = ifelse(sum(c(Camp1_goats, Camp2_goats, Camp3_goats), na.rm = T) > 0, 1, 0), AnyCamp_sheep = ifelse(sum(c(Camp1_sheep, Camp2_sheep, Camp3_sheep), na.rm = T) > 0, 1, 0), AnyCamp_Camels = ifelse(sum(c(Camp1_camels, Camp2_camels, Camp3_camels), na.rm = T) > 0, 1, 0), AnyCamp_Cattle = ifelse(sum(c(Camp1_cattle, Camp2_cattle, Camp3_cattle), na.rm = T) > 0, 1, 0)) travel.data <- left_join(travel.data, gps.point.stats, by = c("GPS_carrier_ID", "Total_trip_duration"="Trip_length", "trip.type")) majority.long.all <- travel.data %>% filter(prop.longterm > 0.5 & night.all.change.status != "Night.Stay") quantile(majority.long.all$Camps_reported) quantile(majority.long.all$AnyCamp_Travel_Time, na.rm = T) quantile(majority.long.all$AnyCamp_Stay_duration, na.rm = T) table(majority.long.all$AnyCamp_nonhousehold_members); prop.table(table(majority.long.all$AnyCamp_nonhousehold_members)) quantile(majority.long.all$AnyCamp_people_count, na.rm = T) table(majority.long.all$AnyCamp_Water_Open); prop.table(table(majority.long.all$AnyCamp_Water_Open)) table(majority.long.all$AnyCamp_Water_OpenClosed); prop.table(table(majority.long.all$AnyCamp_Water_OpenClosed)) table(majority.long.all$AnyCamp_Water_Closed); prop.table(table(majority.long.all$AnyCamp_Water_Closed)) table(majority.long.all$AnyCamp_goats); prop.table(table(majority.long.all$AnyCamp_goats)) table(majority.long.all$AnyCamp_sheep); prop.table(table(majority.long.all$AnyCamp_sheep)) table(majority.long.all$AnyCamp_Camels); prop.table(table(majority.long.all$AnyCamp_Camels)) table(majority.long.all$AnyCamp_Cattle); prop.table(table(majority.long.all$AnyCamp_Cattle)) table(majority.long.all$Gender); prop.table(table(majority.long.all$Gender)) quantile(majority.long.all$Age) table(majority.long.all$Facility); prop.table(table(majority.long.all$Facility)) table(majority.long.all$Trip1_travel_time) table(majority.long.all$Trip2_travel_time) table(majority.long.all$Trip3_travel_time) majority.transient.all <- travel.data %>% filter(prop.longterm <=0.5 & night.all.change.status != "Night.Stay") quantile(majority.transient.all$Camps_reported) quantile(majority.transient.all$AnyCamp_Travel_Time, na.rm = T) quantile(majority.transient.all$AnyCamp_Stay_duration, na.rm = T) table(majority.transient.all$AnyCamp_nonhousehold_members) quantile(majority.transient.all$AnyCamp_people_count, na.rm = T) table(majority.transient.all$AnyCamp_Water_Open); prop.table(table(majority.transient.all$AnyCamp_Water_Open)) table(majority.transient.all$AnyCamp_Water_OpenClosed); prop.table(table(majority.transient.all$AnyCamp_Water_OpenClosed)) table(majority.transient.all$AnyCamp_Water_Closed); prop.table(table(majority.transient.all$AnyCamp_Water_Closed)) table(majority.transient.all$AnyCamp_goats); prop.table(table(majority.transient.all$AnyCamp_goats)) table(majority.transient.all$AnyCamp_sheep); prop.table(table(majority.transient.all$AnyCamp_sheep)) table(majority.transient.all$AnyCamp_Camels); prop.table(table(majority.transient.all$AnyCamp_Camels)) table(majority.transient.all$AnyCamp_Cattle); prop.table(table(majority.transient.all$AnyCamp_Cattle)) table(majority.transient.all$Gender); prop.table(table(majority.transient.all$Gender)) quantile(majority.transient.all$Age) table(majority.transient.all$Facility); prop.table(table(majority.transient.all$Facility)) table(majority.transient.all$Trip1_travel_time) table(majority.transient.all$Trip2_travel_time) table(majority.transient.all$Trip3_travel_time) one.location.all <- travel.data %>% filter(combo.change.stat == "All.Stay.Night.Stay") quantile(one.location.all$Camps_reported) table(one.location.all$AnyCamp_nonhousehold_members);prop.table(table(one.location.all$AnyCamp_nonhousehold_members)) quantile(one.location.all$AnyCamp_people_count, na.rm = T) table(one.location.all$AnyCamp_Water_Open); prop.table(table(one.location.all$AnyCamp_Water_Open)) table(one.location.all$AnyCamp_Water_OpenClosed); prop.table(table(one.location.all$AnyCamp_Water_OpenClosed)) table(one.location.all$AnyCamp_Water_Closed); prop.table(table(one.location.all$AnyCamp_Water_Closed)) table(one.location.all$AnyCamp_goats); prop.table(table(one.location.all$AnyCamp_goats)) table(one.location.all$AnyCamp_sheep); prop.table(table(one.location.all$AnyCamp_sheep)) table(one.location.all$AnyCamp_Camels); prop.table(table(one.location.all$AnyCamp_Camels)) table(one.location.all$AnyCamp_Cattle); prop.table(table(one.location.all$AnyCamp_Cattle)) table(one.location.all$Gender); prop.table(table(one.location.all$Gender)) quantile(one.location.all$Age) table(one.location.all$Facility); prop.table(table(one.location.all$Facility)) table(one.location.all$Trip1_travel_time) table(one.location.all$Trip2_travel_time) table(one.location.all$Trip3_travel_time) one.location.daytrips.all <- travel.data %>% filter(combo.change.stat == "All.Change.Night.Stay") quantile(one.location.daytrips.all$Camps_reported) table(one.location.daytrips.all$AnyCamp_nonhousehold_members);prop.table(table(one.location.daytrips.all$AnyCamp_nonhousehold_members)) quantile(one.location.daytrips.all$AnyCamp_people_count, na.rm = T) table(one.location.daytrips.all$AnyCamp_Water_Open); prop.table(table(one.location.daytrips.all$AnyCamp_Water_Open)) table(one.location.daytrips.all$AnyCamp_Water_OpenClosed); prop.table(table(one.location.daytrips.all$AnyCamp_Water_OpenClosed)) table(one.location.daytrips.all$AnyCamp_Water_Closed); prop.table(table(one.location.daytrips.all$AnyCamp_Water_Closed)) table(one.location.daytrips.all$AnyCamp_goats); prop.table(table(one.location.daytrips.all$AnyCamp_goats)) table(one.location.daytrips.all$AnyCamp_sheep); prop.table(table(one.location.daytrips.all$AnyCamp_sheep)) table(one.location.daytrips.all$AnyCamp_Camels); prop.table(table(one.location.daytrips.all$AnyCamp_Camels)) table(one.location.daytrips.all$AnyCamp_Cattle); prop.table(table(one.location.daytrips.all$AnyCamp_Cattle)) table(one.location.daytrips.all$Gender); prop.table(table(one.location.daytrips.all$Gender)) quantile(one.location.daytrips.all$Age) table(one.location.daytrips.all$Facility); prop.table(table(one.location.daytrips.all$Facility)) table(one.location.daytrips.all$Trip1_travel_time) table(one.location.daytrips.all$Trip2_travel_time) table(one.location.daytrips.all$Trip3_travel_time) ### All GPS carriers quantile(travel.data$Camps_reported) table(travel.data$AnyCamp_nonhousehold_members);prop.table(table(travel.data$AnyCamp_nonhousehold_members)) quantile(travel.data$AnyCamp_people_count, na.rm = T) table(travel.data$AnyCamp_Water_Open); prop.table(table(travel.data$AnyCamp_Water_Open)) table(travel.data$AnyCamp_Water_OpenClosed); prop.table(table(travel.data$AnyCamp_Water_OpenClosed)) table(travel.data$AnyCamp_Water_Closed); prop.table(table(travel.data$AnyCamp_Water_Closed)) table(travel.data$AnyCamp_goats); prop.table(table(travel.data$AnyCamp_goats)) table(travel.data$AnyCamp_sheep); prop.table(table(travel.data$AnyCamp_sheep)) table(travel.data$AnyCamp_Camels); prop.table(table(travel.data$AnyCamp_Camels)) table(travel.data$AnyCamp_Cattle); prop.table(table(travel.data$AnyCamp_Cattle)) table(travel.data$Gender); prop.table(table(travel.data$Gender)) quantile(travel.data$Age) quantile(travel.data$Total_trip_duration) table(travel.data$Facility); prop.table(table(travel.data$Facility)) ### Travelers who did not carry GPS loggers traveler.no.gps <- any.traveler %>% filter(GPS_study_status == 0) quantile(traveler.no.gps$Camps_reported) table(traveler.no.gps$AnyCamp_nonhousehold_members);prop.table(table(traveler.no.gps$AnyCamp_nonhousehold_members)) quantile(traveler.no.gps$AnyCamp_people_count, na.rm = T) table(traveler.no.gps$AnyCamp_Water_Open); prop.table(table(traveler.no.gps$AnyCamp_Water_Open)) table(traveler.no.gps$AnyCamp_Water_OpenClosed); prop.table(table(traveler.no.gps$AnyCamp_Water_OpenClosed)) table(traveler.no.gps$AnyCamp_Water_Closed); prop.table(table(traveler.no.gps$AnyCamp_Water_Closed)) table(traveler.no.gps$AnyCamp_goats); prop.table(table(traveler.no.gps$AnyCamp_goats)) table(traveler.no.gps$AnyCamp_sheep); prop.table(table(traveler.no.gps$AnyCamp_sheep)) table(traveler.no.gps$AnyCamp_Camels); prop.table(table(traveler.no.gps$AnyCamp_Camels)) table(traveler.no.gps$AnyCamp_Cattle); prop.table(table(traveler.no.gps$AnyCamp_Cattle)) table(traveler.no.gps$Gender); prop.table(table(traveler.no.gps$Gender)) quantile(traveler.no.gps$Age, na.rm = T) quantile(traveler.no.gps$Total_trip_duration) table(traveler.no.gps$Facility); prop.table(table(traveler.no.gps$Facility)) table(traveler.no.gps$Trip1_travel_time) table(traveler.no.gps$Trip2_travel_time) table(traveler.no.gps$Trip3_travel_time) no.gps.travel.time <- c(rep(0,(15+11+1)), rep(1, (32+9+1)), rep(2, (138+21+4)), rep(3,(13+7+0)), rep(4, 4)) quantile(no.gps.travel.time) ### All travelers, regardless of GPS loggers traveler.all <- any.traveler quantile(traveler.all$Camps_reported) quantile(traveler.all$AnyCamp_Travel_Time, na.rm = T) quantile(traveler.all$AnyCamp_Stay_duration, na.rm = T) table(traveler.all$AnyCamp_nonhousehold_members);prop.table(table(traveler.all$AnyCamp_nonhousehold_members)) quantile(traveler.all$AnyCamp_people_count, na.rm = T) table(traveler.all$AnyCamp_Water_Open); prop.table(table(traveler.all$AnyCamp_Water_Open)) table(traveler.all$AnyCamp_Water_OpenClosed); prop.table(table(traveler.all$AnyCamp_Water_OpenClosed)) table(traveler.all$AnyCamp_Water_Closed); prop.table(table(traveler.all$AnyCamp_Water_Closed)) table(traveler.all$AnyCamp_goats); prop.table(table(traveler.all$AnyCamp_goats)) table(traveler.all$AnyCamp_sheep); prop.table(table(traveler.all$AnyCamp_sheep)) table(traveler.all$AnyCamp_Camels); prop.table(table(traveler.all$AnyCamp_Camels)) table(traveler.all$AnyCamp_Cattle); prop.table(table(traveler.all$AnyCamp_Cattle)) table(traveler.all$Gender); prop.table(table(traveler.all$Gender)) quantile(traveler.all$Age, na.rm = T) quantile(traveler.all$Total_trip_duration) table(traveler.all$Facility); prop.table(table(traveler.all$Facility)) table(traveler.all$Trip1_travel_time) table(traveler.all$Trip2_travel_time) table(traveler.all$Trip3_travel_time) all.travel.time <- c(rep(0,(17+16+2)), rep(1, (42+18+1)), rep(2, (179+27+7)), rep(3,(18+8+2)), rep(4, 4)) quantile(all.travel.time) ################################################################################## ###### Plot individual GPS details for Supplement figures and Figure 3 ########### ################################################################################## # tiff("S2 Fig.tiff", units="in", width=7, height=2.625, res=300) ggplot(all.tracks %>% filter(trip.type == "Day_trip"))+ facet_wrap(~GPS_carrier_ID, ncol = 3, scales = "free")+ geom_point(aes(as.Date(Date_adj), ClusterID, color = Night), alpha = 0.5, size = 2)+ geom_segment(aes(x = as.Date(date_enrolled), xend = as.Date(date_enrolled), y = 0, yend = max(ClusterID)), color = "blue")+ geom_segment(aes(x = as.Date(date_followed_up), xend = as.Date(date_followed_up), y = 0, yend = max(ClusterID)), color = "blue")+ geom_segment(aes(x = as.Date(date_report_depart), xend = as.Date(date_report_depart), y = 0, yend = max(ClusterID)), color = "blue", linetype = "dashed")+ geom_segment(aes(x = as.Date(date_report_return), xend = as.Date(date_report_return), y = 0, yend = max(ClusterID)), color = "blue", linetype = "dashed")+ theme_bw()+ theme(legend.background = element_blank(), strip.text = element_text(size = 8))+ labs(x = "Date", y = "Location ID", color = "", title = "Day trips") # dev.off() # tiff("Fig3_daytrip.tiff", units="in", width=3, height=2.5, res=300) ggplot(all.tracks %>% filter(GPS_carrier_ID == "R 4"))+ geom_point(aes(as.Date(Date_adj), ClusterID, color = Night), alpha = 0.5, size = 2)+ theme_bw()+ theme(legend.position = c(0.13, 0.87), legend.background = element_blank())+ labs(x = "Date", y = "Location ID", color = "") # dev.off() # tiff("S3 Fig.tiff", units="in", width=9, height=10.5, res=300) ggplot(all.tracks %>% filter(trip.type == "Static"))+ facet_wrap(~GPS_carrier_ID, scales = "free", ncol = 3)+ geom_point(aes(as.Date(Date_adj), ClusterID, color = Night), alpha = 0.5, size = 2)+ geom_segment(aes(x = as.Date(date_enrolled), xend = as.Date(date_enrolled), y = 0, yend = max(ClusterID)), color = "blue")+ geom_segment(aes(x = as.Date(date_followed_up), xend = as.Date(date_followed_up), y = 0, yend = max(ClusterID)), color = "blue")+ geom_segment(aes(x = as.Date(date_report_depart), xend = as.Date(date_report_depart), y = 0, yend = max(ClusterID)), color = "blue", linetype = "dashed")+ geom_segment(aes(x = as.Date(date_report_return), xend = as.Date(date_report_return), y = 0, yend = max(ClusterID)), color = "blue", linetype = "dashed")+ theme_bw()+ theme(legend.background = element_blank())+ labs(x = "Date", y = "Location ID", color = "", title = "Static") # dev.off() # tiff("Fig3_static.tiff", units="in", width=3, height=2.5, res=300) ggplot(all.tracks %>% filter(GPS_carrier_ID == "L 9"))+ geom_point(aes(as.Date(Date_adj), ClusterID, color = Night), alpha = 0.5, size = 2)+ theme_bw()+ theme(legend.position = c(0.13, 0.87), legend.background = element_blank())+ labs(x = "Date", y = "Location ID", color = "") # dev.off() # tiff("S4 Fig.tiff", units="in", width=15, height=10.5, res=300) ggplot(all.tracks %>% filter(trip.type == "Transient"))+ facet_wrap(~GPS_carrier_ID, scales = "free", ncol = 5)+ geom_point(aes(as.Date(Date_adj), ClusterID, color = Night), alpha = 0.5, size = 2)+ geom_segment(aes(x = as.Date(date_enrolled), xend = as.Date(date_enrolled), y = 0, yend = max(ClusterID)), color = "blue")+ geom_segment(aes(x = as.Date(date_followed_up), xend = as.Date(date_followed_up), y = 0, yend = max(ClusterID)), color = "blue")+ geom_segment(aes(x = as.Date(date_report_depart), xend = as.Date(date_report_depart), y = 0, yend = max(ClusterID)), color = "blue", linetype = "dashed")+ geom_segment(aes(x = as.Date(date_report_return), xend = as.Date(date_report_return), y = 0, yend = max(ClusterID)), color = "blue", linetype = "dashed")+ theme_bw()+ theme(legend.background = element_blank())+ labs(x = "Date", y = "Location ID", color = "", title = "Transient") # dev.off() # tiff("Manuscripts/Fig3_transient.tiff", units="in", width=3, height=2.5, res=300) ggplot(all.tracks %>% filter(GPS_carrier_ID == "N 5"))+ geom_point(aes(as.Date(Date_adj), ClusterID, color = Night), alpha = 0.5, size = 2)+ theme_bw()+ theme(legend.position = c(0.13, 0.87), legend.background = element_blank())+ labs(x = "Date", y = "Location ID", color = "") # dev.off() # tiff("Manuscripts/S5 Fig.tiff", units="in", width=15, height=10.5, res=300) ggplot(all.tracks %>% filter(trip.type == "Longterm"))+ facet_wrap(~GPS_carrier_ID, scales = "free", ncol = 5)+ geom_point(aes(as.Date(Date_adj), ClusterID, color = Night), alpha = 0.5, size = 2)+ geom_segment(aes(x = as.Date(date_enrolled), xend = as.Date(date_enrolled), y = 0, yend = max(ClusterID)), color = "blue")+ geom_segment(aes(x = as.Date(date_followed_up), xend = as.Date(date_followed_up), y = 0, yend = max(ClusterID)), color = "blue")+ geom_segment(aes(x = as.Date(date_report_depart), xend = as.Date(date_report_depart), y = 0, yend = max(ClusterID)), color = "blue", linetype = "dashed")+ geom_segment(aes(x = as.Date(date_report_return), xend = as.Date(date_report_return), y = 0, yend = max(ClusterID)), color = "blue", linetype = "dashed")+ theme_bw()+ theme( legend.background = element_blank())+ labs(x = "Date", y = "Location ID", color = "", title = "Long term") # dev.off() # tiff("Fig3_longterm.tiff", units="in", width=3, height=2.5, res=300) ggplot(all.tracks %>% filter(GPS_carrier_ID == "K 7"))+ geom_point(aes(as.Date(Date_adj), ClusterID, color = Night), alpha = 0.5, size = 2)+ theme_bw()+ theme(legend.position = c(0.13, 0.87), legend.background = element_blank())+ labs(x = "Date", y = "Location ID", color = "") # dev.off() ################################################################################## ######## Traveler and Remainer characterization and malaria analysis ############# ################################################################################## #### Table 2: Household characteristics ##### household.table <- household.epi(df = household, time.pt = "enroll") #### Table 3: Traveler vs Remainer characteristics ###### herder <- subset(member, Travel_status == 1) herder$Water_open <- ifelse(herder$Camp1_Water_open == 1 | herder$Camp2_Water_open == 1 | herder$Camp3_Water_open == 1, 1, 0) # Open water = River, lake, dam, spring, hand dug water pit herder$Water_closed <- ifelse(herder$Camp1_Water_closed == 1 | herder$Camp2_Water_closed == 1 | herder$Camp3_Water_closed == 1, 1, 0) # Closed water = Tap water, well or borehole, herder.all <- member.epi.follow(subset(herder)) herder.f.PCR.pos <- member.epi.follow.diff.denom(herder) remainer <- subset(member, Travel_status == 0) remainer$Water_open <- ifelse(remainer$Household_water %in% c("Open only", "Open or closed"), 1, 0) # Open water = River, lake, dam, spring, hand dug water pit remainer$Water_closed <- ifelse(remainer$Household_water %in% c("Closed only", "Open or closed"), 1, 0) # Closed water = Tap water, well or borehole, remainer.all <- member.epi.follow(subset(remainer))#, rdt_e_hm == 1)) remainer.f.PCR.pos <- member.epi.follow.diff.denom(remainer) travel.remainer.table <- cbind(herder.all$member, herder.f.PCR.pos$member, remainer.all$member, remainer.f.PCR.pos$member) colnames(travel.remainer.table) <- c("Traveler: All", "Traveler: PCR+", "Remainer: All", "Remainer: PCR+") rownames(travel.remainer.table) <- rownames(herder.all) #### Table 4: models #### model.travel <- glm(PCR_result_Falciparum ~ Travel_status, data = member, family = "binomial") exp(cbind(coef(model.travel), confint(model.travel))) model.age <- glm(PCR_result_Falciparum ~ Age_bin, data = member, family = "binomial") exp(cbind(coef(model.age), confint(model.age))) model.Gender <- glm(PCR_result_Falciparum ~ Gender, data = member, family = "binomial") exp(cbind(coef(model.Gender), confint(model.Gender))) model.Facility <- glm(PCR_result_Falciparum ~ Facility, data = member, family = "binomial") exp(cbind(coef(model.Facility), confint(model.Facility))) model.water <- glm(PCR_result_Falciparum ~ Household_water, data = member, family = "binomial") exp(cbind(coef(model.water), confint(model.water))) model.adjusted <- glm(PCR_result_Falciparum ~ Travel_status + Age_bin + Gender, data = member, family = "binomial") exp(cbind(coef(model.adjusted), confint(model.adjusted)))