Code
library(readr)
library(tidyverse)
library(knitr)
library(ggplot2)
library(usethis)
library(gtsummary)
library(ggplot2)
library(gt)
library(ggthemes)
library(tidyverse)
library(kableExtra)
Acesss to improved sanitation is fundememtal need and human right. However, in developing countries including Kenya, is still a challenge. this study investigated factor influncing households’willingness to invest in saniation, with majority 76% willing to invest.social factors investigated had no significant associations with the willingness to invest in sanitation, except for the benefit of use and the presence of a toilet, which showed significant associations at a p-value of less than .05. Economic factors such household income, the presence of organizations that promote sanitation, and being a member of saving and lending groups was to have significance association, at p value (<.05)
sdgs, willingness to invest, social fcators, economic factors
library(readr)
library(tidyverse)
library(knitr)
library(ggplot2)
library(usethis)
library(gtsummary)
library(ggplot2)
library(gt)
library(ggthemes)
library(tidyverse)
library(kableExtra)
The United Nations Sustainable Development Goal 6.2 aims to achieve access to adequate and equitable sanitation and hygiene for all by 2030. By, 2022, the global access to safely managed sanitation services was reported to be 57% of the population, which equates to 4.6 billion people[ WHO (2022)]. Despite this progress, over 1.5 billion people still lacked basic sanitation services, and 419 million people still practiced open defecation in Sub-Sahara Africa (SSA) and South & central Asia.
Access to improved sanitation in Kenya remains a significant challenge, with only about 32% of the population having access to basic sanitation facilities. This lack of access has led to more than 6 million Kenyans practicing open defecation, contributing to the prevalence of diseases such as diarrhea, typhoid, and cholera. In economic terms, poor sanitation leads to a loss of 0.9% of Kenya’s gross domestic product (GDP) annually. In Bomet County access to improve sanitation is still low at 41% (“Dhs” 2022). The effect of poor sanitation on health in Bomet is significant, with over 40% of diarrheal illnesses and intestinal worm infestations attributed to it, as indicated by the Ministry of Health records. Investing in sanitation facilities is crucial to reducing these cases. However, many people do not prioritize sanitation on their investment agenda(Koskei, Koskei, and Koech 2013)
The traditional community-led total sanitation (CLTS) approach, as used in Bomet, proposes that once people are made aware of their sanitation problems, they can take action to improve their sanitation status using locally available materials (Njuguna 2019) whether to construc these facilities depends on people’s willingness, preferences, and ability to pay for the facility of their choice. A study by (Mulatya et al. 2021) pointed out that various factors, including demographic, socio-cultural, economic, and financial factors to have influence on Households’ willingness, in rural areas of Siaya, Kakamega, and Makueni counties. the findings may not apply to Bomet due to unique contextual factors.
1. To assess the proportion of willingness to invest in sanitation facilities by households in Bomet Sub-county.
2. To determine the demographic and social-cultural factors that influences the willingness to invest in sanitation facilities by households in Bomet Sub-county.
3. To determine the economic and financial factors that influences the willingness to invest in sanitation facilities by household sin Bomet Sub-county.
Study was Conducted in Bomet County, in Kenya. The sample size was determined using Yamane (1973) follows: n=N/(1+N(e2) Where, n= desired sample N=Total number of households 30,086 e=sampling error (taken to be ±10%) =30, 806 / (1+30, 806 (0.12).the sample was 100 households. Cluster and simple random sampling technique was used to select households.
Data was analysed using R tool software for descriptive statistics such frequency, percentage, mean and standard deviations. Findings was presented using tables, and charts. Inferential statistics was computed using chi–square test , to examine associations of social and economic factors , and willingness to invest in sanitation.
Ethical considerations was sought in this study.
<- read_csv(here::here("data/raw/Sanitation_investiment.csv")) sanitation
# A tibble: 6 × 55
Gender Age_bracket Education Religion Household_size Know_sanitation
<chr> <chr> <chr> <chr> <dbl> <chr>
1 male 18-25 primary christi… 5 yes
2 male 26-35 secondary christi… 6 no
3 prefer not say 56 and above college muslim 4 yes
4 male 46-55 university Other 5 yes
5 female 26-35 university christi… 8 yes
6 male 36-45 primary christi… 4 yes
# ℹ 49 more variables: Source_of_information <chr>,
# Source_of_information_Public_Health_Officers <dbl>,
# Source_of_information_Community_Health_Volunteers <dbl>,
# `Source_of_information_ Media` <dbl>,
# Source_of_information_NGO_Workers <dbl>,
# Source_of_information_Local_Marketers <dbl>,
# Source_of_information_Others <dbl>, Presence_of_latrine <chr>, …
# A tibble: 6 × 55
Gender Age_bracket Education Religion Household_size Know_sanitation
<chr> <chr> <chr> <chr> <dbl> <chr>
1 female 36-45 secondary christian 6 yes
2 male 36-45 primary christian 4 yes
3 female 26-35 secondary christian 3 yes
4 male 46-55 university christian 5 yes
5 male 36-45 college christian 5 yes
6 female 18-25 secondary christian 2 yes
# ℹ 49 more variables: Source_of_information <chr>,
# Source_of_information_Public_Health_Officers <dbl>,
# Source_of_information_Community_Health_Volunteers <dbl>,
# `Source_of_information_ Media` <dbl>,
# Source_of_information_NGO_Workers <dbl>,
# Source_of_information_Local_Marketers <dbl>,
# Source_of_information_Others <dbl>, Presence_of_latrine <chr>, …
[1] 99
[1] 55
# A tibble: 99 × 52
id gender age_bracket education religion household_size know_sanitation
<int> <fct> <fct> <chr> <chr> <dbl> <chr>
1 1 male 18-25 primary christi… 5 yes
2 2 male 26-35 secondary christi… 6 no
3 3 prefer n… 56 and abo… college muslim 4 yes
4 4 male 46-55 universi… Other 5 yes
5 5 female 26-35 universi… christi… 8 yes
6 6 male 36-45 primary christi… 4 yes
7 7 female 18-25 primary christi… 3 no
8 8 male 46-55 universi… Other 5 yes
9 9 male 56 and abo… no educa… christi… 3 yes
10 10 prefer n… 26-35 college Other 2 yes
# ℹ 89 more rows
# ℹ 45 more variables: public_health_officers <dbl>,
# community_health_officers <dbl>, media <dbl>, ngo_workers <dbl>,
# local_markertes <dbl>, others <dbl>, presence_of_latrine <chr>,
# type_latrine_own <chr>, disease_prevention <dbl>, dignity <dbl>,
# privacy <dbl>, safety <dbl>, prestige <dbl>, if_no <chr>,
# benefit_of_use_latrine <chr>, quality_of_toilet <dbl>, …
[1] "factor"
[1] "Don't know" "No" "Yes"
# A tibble: 6 × 3
# Groups: information [6]
information n percent
<chr> <int> <dbl>
1 community_health_officers 74 74.7
2 local_markertes 10 10.1
3 media 41 41.4
4 ngo_workers 19 19.2
5 others 15 15.2
6 public_health_officers 42 42.4
# A tibble: 5 × 3
# Groups: consequences [5]
consequences n percent
<chr> <int> <dbl>
1 dignity 40 40.4
2 disease_prevention 50 50.5
3 prestige 11 11.1
4 privacy 28 28.3
5 safety 15 15.2
# A tibble: 4 × 3
# Groups: quality_of_toilet [4]
quality_of_toilet n percent
<chr> <int> <dbl>
1 clean_floor_and_slab 41 41.4
2 covered_squat_hole 11 11.1
3 lockable_door 68 68.7
4 with_wall_and_roof 80 80.8
# A tibble: 4 × 3
# Groups: existing_cultures [4]
existing_cultures n percent
<chr> <int> <dbl>
1 children_do_not_share_with_adults 37 37.4
2 in_laws_do_not_share 41 41.4
3 people_living_with_chronic_illnesses_do_not_share 33 33.3
4 visitors_do_not_share 9 9.09
# A tibble: 4 × 3
# Groups: barrier_to _loan_services [4]
`barrier_to _loan_services` n percent
<chr> <int> <dbl>
1 cost_of_service 24 24.2
2 employment_status 47 47.5
3 financial_knowledge 73 73.7
4 physical_distance_to_service_point 18 18.2
#plot- box plot
# Create a box plot
ggplot(sanitation_clean, aes(x = education, y = household_size)) +
geom_boxplot(fill = "skyblue") +
labs(title = "Household Size Distribution by eduction level", x = "education level", y = "household size") +
theme_classic()
#saving data file
write_csv(x = sanitation_clean, "/cloud/project/data/processed/sanitation_clean.csv" )
importing processed data.
#importing proccesed data
<- read_csv(here::here("/cloud/project/data/processed/sanitation_clean.csv")) sanitation_clean
The Table 1, shows the distribution of respondents by gender, age bracket, religion, and household size. The majority of the respondents were male (49%), and the majority of the respondents’ age bracket was 36-45 (30%). In terms of religion, the majority of the respondents reported being Christian (69%). The household size in Bomet County ranged from 2 to 8 persons, with a mean of approximately 4.77 and a standard deviation of 1.44. as shown in Figure 9.
<- sanitation_clean |>
demographic select(gender, age_bracket, religion, education) |>
tbl_summary(
statistic = list(all_continuous() ~ "{mean} ± {sd}"))
kable(demographic, caption = "Demographic informations of respondents")
Characteristic | N = 99 |
---|---|
gender | NA |
female | 48 (48%) |
male | 49 (49%) |
prefer not say | 2 (2.0%) |
age_bracket | NA |
18-25 | 6 (6.1%) |
26-35 | 23 (23%) |
36-45 | 30 (30%) |
46-55 | 21 (21%) |
56 and above | 19 (19%) |
religion | NA |
christian | 69 (70%) |
muslim | 10 (10%) |
Other | 20 (20%) |
education | NA |
college | 21 (21%) |
no education | 19 (19%) |
primary | 28 (28%) |
secondary | 21 (21%) |
university | 10 (10%) |
#Create a histogram for the household_size variable
ggplot(sanitation_clean, aes(x = household_size)) +
geom_histogram(binwidth = 1, fill = "skyblue", color = "orange", alpha = 0.7) +
stat_function(fun = dnorm, args = list(mean = mean_hs, sd = sd_hs), color = "red", size = 1)+
annotate("text", x = 1, y = 20, label = paste("Mean:", round(mean_hs, 2), "\nSD:", round(sd_hs, 2), "\nSize:", size_hs), color = "black", size = 4) +
labs(title = "Household Size Distribution", x = "Household Size", y = "Count") +
theme_minimal()
As illustrated in Table 2, majority of respondents 76% were willing to invest in sanitation facilities. The study investigated the level of willingness, 29% were not willing, 20% very much willing and 48% were willing to invest, with significant associations at p-Value (0.001) as shown in Table 3.
<-sanitation_clean |>
tx tbl_summary(include = c(willingness_to_invest))
kable(tx)
Characteristic | N = 99 |
---|---|
willingness_to_invest | 76 (77%) |
<- sanitation_clean |>
level_of_willingness tbl_cross(row = level_of_willingness,
col = willingness_to_invest,
percent = "cell") |>
add_p()
kable(level_of_willingness)
no | yes | Total | p-value | |
---|---|---|---|---|
level_of_willingness | NA | NA | NA | <0.001 |
Not willing | 19 (19%) | 10 (10%) | 29 (29%) | NA |
Very much willing | 0 (0%) | 20 (20%) | 20 (20%) | NA |
Willing | 2 (2.0%) | 46 (46%) | 48 (48%) | NA |
Unknown | 2 (2.0%) | 0 (0%) | 2 (2.0%) | NA |
Total | 23 (23%) | 76 (77%) | 99 (100%) | NA |
the study investigated influence of employement status, household income , sanitation organizations, knowldge on finacial institutions, and being member to saving and lending groups.
chi-square test statistics.
#influence of employement status
#no significant association p value = 0.02 > 0.005
<- table(sanitation_clean$willingness_to_invest, sanitation_clean$employement_status)
e1 chisq.test(e1)
Pearson's Chi-squared test
data: e1
X-squared = 7.7276, df = 2, p-value = 0.02099
# influnce of household income
#The analysis revealed a significant association, χ²(4, N = [99]) = 16.22, p = 0.0027
<- table(sanitation_clean$willingness_to_invest, sanitation_clean$income)
e2 chisq.test(e2)
Pearson's Chi-squared test
data: e2
X-squared = 16.215, df = 4, p-value = 0.002744
#presence sanitation organizations
#the analysis revealed a significant association, χ²(1, N = [99]) = 12.07, p = 0.0005
<- table(sanitation_clean$willingness_to_invest, sanitation_clean$sanitation_organizations)
e3 chisq.test(e3)
Pearson's Chi-squared test with Yates' continuity correction
data: e3
X-squared = 12.066, df = 1, p-value = 0.0005135
# influence of being member of saving and lending groups
# signifiacnt association at χ²(1, N= 99)= 10.692, p = 001.
<- table(sanitation_clean$willingness_to_invest, sanitation_clean$member_to_savings_and_lendings_groups)
e4chisq.test(e4)
Pearson's Chi-squared test with Yates' continuity correction
data: e4
X-squared = 10.692, df = 1, p-value = 0.001076
The study found that the majority of respondents, 76%, were willing to invest in sanitation. There could be several reasons for this willingness, including the desire for personal safety and privacy, fear of penalties and fines, fear of disease outbreaks, raising social status, and the need for a safe place for defecation/urination.
The study found that the majority of social factors investigated had no significant associations with the willingness to invest in sanitation, except for the benefit of use and the presence of a toilet, which showed significant associations at a p-value of less than .005. This could be due to various reasons, including the specific emphasis on the benefit of use and the presence of a toilet in influencing individuals’ decisions to invest in sanitation. Additionally, the findings may suggest that these two factors, in particular, play a more prominent role in shaping attitudes and behaviors towards sanitation investment compared to other social factors that were examined in the study
Several economic factors were found to have significant associations with the willingness to invest in sanitation, including household income, the presence of organizations that promote sanitation, and being a member of saving and lending groups at p value (<.005). This could be due to increasing access to financial resources and promoting economic development could help to improve sanitation investment.
@online{kipngeno2024,
author = {Kipngeno, Aaron},
title = {Willingness to Invest in Sanitation Facilities. {A} Case
Study of {Bomet} {County,} {Kenya}},
date = {2024-02-13},
url = {https://github.com/ds4owd-001/project-Aaron-Kipngeno.git},
langid = {en},
abstract = {Acesss to improved sanitation is fundememtal need and
human right. However, in developing countries including Kenya, is
still a challenge. this study investigated factor influncing
households’willingness to invest in saniation, with majority 76\%
willing to invest.social factors investigated had no significant
associations with the willingness to invest in sanitation, except
for the benefit of use and the presence of a toilet, which showed
significant associations at a p-value of less than .05. Economic
factors such household income, the presence of organizations that
promote sanitation, and being a member of saving and lending groups
was to have significance association, at p value (\textless.05)}
}
Social factors and willingness to invest in sanitation
Study investigated associations of gender,age, religion, knowledge on satiation, presence of latrine, benefit of use of toilet, sanitation laws and willingness to invest in sanitation facilities.
chi-Square test statistics
A Pearson’s chi-squared test was conducted to examine the relationship between Social factors and willingness to invest in sanitation.