library(readr)
env_health <- read_csv("C:/Users/HP/OneDrive/Desktop/env_health.csv")
## Rows: 180 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (7): district, residence, toilet_type, water_source, handwashing_facilit...
## dbl (3): household_id, household_size, household_income
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
View(env_health)
library(gtsummary)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
 env_health %>% 
  tbl_summary()
Characteristic N = 1801
household_id 91 (46, 136)
district
    Barishal 24 (13%)
    Chattogram 21 (12%)
    Dhaka 22 (12%)
    Khulna 19 (11%)
    Mymensingh 27 (15%)
    Rajshahi 24 (13%)
    Rangpur 23 (13%)
    Sylhet 20 (11%)
residence
    Rural 82 (46%)
    Urban 98 (54%)
household_size
    2 26 (14%)
    3 20 (11%)
    4 23 (13%)
    5 27 (15%)
    6 18 (10%)
    7 28 (16%)
    8 21 (12%)
    9 17 (9.4%)
toilet_type
    Improved 112 (62%)
    Open defecation 20 (11%)
    Unimproved 48 (27%)
water_source
    Piped 75 (42%)
    Surface water 16 (8.9%)
    Tube well 89 (49%)
handwashing_facility 137 (76%)
waste_disposal
    Improper 56 (31%)
    Proper 124 (69%)
reported_diarrhea_case 41 (23%)
household_income 29,146 (17,128, 42,825)
1 Median (Q1, Q3); n (%)

Interpretation :

  1. The R Code Explanation

The R code:

env_health %>% 
  tbl_summary()

uses the gtsummary package to produce a summary table that presents descriptive statistics of the dataset env_health.

The result is a professionally formatted summary table showing the main characteristics of the dataset. This table helps researchers understand the overall distribution, central tendency, and composition of the data before further analysis.

  1. Overview of the Table Output

The output below provides descriptive statistics for all variables in the dataset env_health (N = 1801 households). It includes both numeric and categorical variables.

Characteristic | N = 1801 | Interpretation
household_id | 91 (46, 136) | The median household ID is 91, with the interquartile range (IQR) from 46 to 136. This is mainly an identifier variable, so its statistical summary is not analytically important. |
district | Barishal (13%), Chattogram (12%), Dhaka (12%), Khulna (11%), Mymensingh (15%), Rajshahi (13%), Rangpur (13%), Sylhet (11%) | The dataset includes households from all 8 administrative divisions of Bangladesh, fairly evenly distributed across districts, with Mymensingh having the largest proportion (15%). |
residence | Rural (46%), Urban (54%) | Slightly more households are from urban areas (54%) than rural (46%), suggesting balanced representation from both residence types. |
household_size | 2 (14%), 3 (11%), 4 (13%), 5 (15%), 6 (10%), 7 (16%), 8 (12%), 9 (9.4%) | Most households consist of **5–7 members, with the highest proportion being 7-member households (16%), indicating moderately large family sizes. |
toilet_type | Improved (62%), Open defecation (11%), Unimproved (27%) | A majority (62%) use improved sanitation facilities, but 11% still practice open defecation — a public health concern. |
water_source | Piped (42%), Surface water (8.9%), Tube well (49%) | Most households rely on tube wells (49%) and piped water (42%). Only a small proportion (8.9%) depend on surface water, which can be unsafe. |
handwashing_facility | 137 (76%) | Around three-quarters (76%) of households have access to a handwashing facility, indicating moderate hygiene coverage. |
waste_disposal | Proper (69%), Improper (31%) | Most households (69%) practice proper waste disposal, but 31% do not, which may pose environmental and health risks. |
reported_diarrhea_case | 41 (23%) | Approximately 23% of households reported a diarrhea case, suggesting possible links with sanitation and water quality. |
household_income | 29,146 (17,128, 42,825) | The median monthly income is 29,146 BDT, with the IQR ranging from 17,128 to 42,825 BDT. This shows income variability among households. |
  1. Statistical Interpretation
  1. Broad Analytical Interpretation

The descriptive summary table provides an overview of environmental health conditions across 1,801 households. Most households are urban (54%) and use improved sanitation facilities (62%), while tube wells (49%) and piped water (42%) are the dominant water sources. About three-quarters (76%) of households have handwashing facilities, yet nearly one-third (31%) still practice improper waste disposal. The occurrence of reported diarrhea (23%) indicates ongoing health risks possibly associated with sanitation and water issues. The median monthly household income is BDT 29,146, suggesting a middle-income population with significant variability.

Overall, this summary highlights mixed progress in environmental health—good access to water and sanitation in some areas, but persistent challenges in hygiene practices and waste management. These insights are crucial for designing public health interventions aimed at improving water, sanitation, and hygiene (WASH) outcomes in Bangladesh.

Final Summary

In summary, the R command env_health %>% tbl_summary() efficiently produces a comprehensive descriptive summary of the environmental health dataset. The resulting table displays both numeric and categorical variable summaries, allowing easy understanding of household distribution, environmental conditions, and public health indicators. The findings show relatively high coverage of improved sanitation and safe water sources, yet issues like open defecation, improper waste disposal, and diarrhea prevalence persist, emphasizing the need for continued health and hygiene interventions.

env_health %>%
  tbl_summary(
    by = waste_disposal)
Characteristic Improper
N = 56
1
Proper
N = 124
1
household_id 92 (59, 132) 89 (39, 136)
district

    Barishal 7 (13%) 17 (14%)
    Chattogram 5 (8.9%) 16 (13%)
    Dhaka 10 (18%) 12 (9.7%)
    Khulna 8 (14%) 11 (8.9%)
    Mymensingh 6 (11%) 21 (17%)
    Rajshahi 9 (16%) 15 (12%)
    Rangpur 8 (14%) 15 (12%)
    Sylhet 3 (5.4%) 17 (14%)
residence

    Rural 22 (39%) 60 (48%)
    Urban 34 (61%) 64 (52%)
household_size

    2 10 (18%) 16 (13%)
    3 6 (11%) 14 (11%)
    4 9 (16%) 14 (11%)
    5 10 (18%) 17 (14%)
    6 3 (5.4%) 15 (12%)
    7 8 (14%) 20 (16%)
    8 7 (13%) 14 (11%)
    9 3 (5.4%) 14 (11%)
toilet_type

    Improved 35 (63%) 77 (62%)
    Open defecation 6 (11%) 14 (11%)
    Unimproved 15 (27%) 33 (27%)
water_source

    Piped 24 (43%) 51 (41%)
    Surface water 7 (13%) 9 (7.3%)
    Tube well 25 (45%) 64 (52%)
handwashing_facility 45 (80%) 92 (74%)
reported_diarrhea_case 9 (16%) 32 (26%)
household_income 30,717 (17,470, 43,876) 28,562 (17,128, 42,327)
1 Median (Q1, Q3); n (%)

Interpretation :

  1. Purpose of the Analysis

The code:

env_health %>%
  tbl_summary(by = waste_disposal)

was used to generate descriptive statistics of household and environmental characteristics, stratified by waste disposal type (i.e., Improper vs. Proper disposal).

The function tbl_summary() from the gtsummary package automatically summarizes numeric variables using median (Q1, Q3) and categorical variables using frequency and percentage [n (%)].

This comparison helps identify whether households with proper waste disposal practices differ in key environmental and health characteristics compared to those with improper practices.

  1. Overview of the Table
Variable | Improper Waste Disposal (N = 561) | Proper Waste Disposal (N = 1241) | Interpretation |
household_id | 92 (59, 132) | 89 (39, 136) | Household IDs are identifiers; no analytical difference. |
district | Barishal (13%), Dhaka (18%), Khulna (14%) have higher improper disposal rates | Mymensingh (17%), Sylhet (14%), Barishal (14%) show higher proper disposal rates | Waste disposal practices vary slightly across districts, with Dhaka showing more improper practices compared to Mymensingh and Sylhet. |
residence | Rural 39%, Urban 61% | Rural 48%, Urban 52% | Improper disposal is somewhat more common in urban areas (61%), suggesting potential urban waste management challenges. |
household_size | Most common sizes: 2–5 members | Most common sizes: 5–7 members | Proper waste disposal is slightly more common in larger households, possibly due to greater awareness or resources. |
toilet_type | Improved 63%, Unimproved 27%, Open defecation 11% | Improved 62%, Unimproved 27%, Open defecation 11% | Sanitation facility distribution is similar in both groups, suggesting toilet type is not strongly linked to waste disposal practice. |
water_source | Tube well 45%, Piped 43%, Surface 13% | Tube well 52%, Piped 41%, Surface 7.3% | Households with proper disposal use safer water sources slightly more often (fewer rely on surface water). |
handwashing_facility | 80% have access | 74% have access | Availability of handwashing facilities is relatively high in both groups, slightly better among households with improper waste disposal. |
reported_diarrhea_case | 16% | 26% | Higher diarrhea cases (26%) among households with proper disposal may indicate other confounding factors (e.g., water contamination, overcrowding). |
household_income | 30,717 (17,470, 43,876) | 28,562 (17,128, 42,327) | Median income levels are similar, with slightly higher income among those with improper disposal, suggesting that income alone doesn’t determine waste management behavior. |
  1. Key Findings and Interpretation Waste Disposal Practices

Out of 1,801 households:

This indicates that while most households manage waste correctly, a significant portion still dispose waste improperly, posing environmental and public health risks.

Socio-Demographic Patterns

Environmental and Sanitation Factors

Health Outcome (Diarrhea Cases)

Interestingly, the proportion of households reporting diarrhea cases is higher among those with proper disposal (26%) than those with improper disposal (16%). This counterintuitive result could be due to:

  1. Statistical Summary
  1. Broad Analytical Interpretation

The stratified summary reveals that households practicing proper waste disposal are slightly more rural, have similar income levels, and show marginally better access to improved water sources. However, health outcomes such as reported diarrhea do not appear to differ positively for the proper disposal group, suggesting the presence of additional environmental or behavioral risk factors.

These findings highlight that while waste management practices are improving, complementary interventions — such as improving water quality, ensuring consistent sanitation infrastructure, and promoting hygiene behavior — are necessary to achieve better public health outcomes.

Final Summary

The R code env_health %>% tbl_summary(by = waste_disposal) produces a stratified summary comparing household and environmental characteristics by type of waste disposal. Among 1,801 households, 31% practiced improper waste disposal and 69% proper disposal. The analysis shows relatively balanced socio-economic characteristics between the two groups, with proper waste disposal slightly more common among rural households and those using safer water sources. Although sanitation access is similar in both groups, the higher prevalence of reported diarrhea among households with proper disposal suggests other influencing factors beyond waste management alone. The results emphasize that effective environmental health outcomes depend on multiple integrated factors — water quality, sanitation, hygiene behavior, and community infrastructure — rather than waste disposal practices in isolation.

model <- glm( factor(waste_disposal) ~ residence + household_size + toilet_type + water_source + handwashing_facility + reported_diarrhea_case + household_income, data = env_health, family = "binomial")


 tbl_regression(model)
Characteristic log(OR) 95% CI p-value
residence


    Rural
    Urban -0.39 -1.1, 0.29 0.3
household_size 0.11 -0.04, 0.26 0.2
toilet_type


    Improved
    Open defecation 0.11 -0.94, 1.2 0.8
    Unimproved 0.06 -0.69, 0.84 0.9
water_source


    Piped
    Surface water -0.59 -1.7, 0.58 0.3
    Tube well 0.21 -0.49, 0.91 0.6
handwashing_facility


    No
    Yes -0.25 -1.1, 0.55 0.5
reported_diarrhea_case


    No
    Yes 0.66 -0.15, 1.5 0.13
household_income 0.00 0.00, 0.00 0.7
Abbreviations: CI = Confidence Interval, OR = Odds Ratio

Interpretation :

Interpretation of the Logistic Regression Analysis

  1. Purpose of the Analysis

This logistic regression model examines the factors associated with household waste disposal practices** (proper vs. improper).

The dependent variable (waste_disposal) is binary:

The independent (predictor) variables are:

The model uses a binomial family (logit link), which estimates the log-odds of having proper waste disposal given these predictors.

  1. Output Summary Table
Characteristic | log(OR) | 95% CI | p-value | Interpretation |
Residence (Urban vs. Rural) | -0.39 | -1.1, 0.29 | 0.3 | Urban households have lower odds of proper waste disposal compared to rural households, but this difference is not statistically significant (p = 0.3). |
Household size | 0.11 | -0.04, 0.26 | 0.2 | Each additional household member slightly increases the odds of proper disposal, but the effect is not significant. |
Toilet type (vs. Improved) | | | | |
– Open defecation | 0.11 | -0.94, 1.2 | 0.8 | Households practicing open defecation have slightly higher odds of proper disposal, but the wide CI and high p-value (0.8) mean no meaningful effect. |
– Unimproved | 0.06 | -0.69, 0.84 | 0.9 | Similarly, unimproved toilets show no significant difference from improved toilets in predicting waste disposal. |
Water source (vs. Piped) | | | | |
– Surface water | -0.59 | -1.7, 0.58 | 0.3 | Households using surface water have lower odds of proper waste disposal, but this relationship is not statistically significant. |
– Tube well | 0.21 | -0.49, 0.91 | 0.6 | Tube well users are slightly more likely to dispose waste properly, but the result is **not significant. |
Handwashing facility (Yes vs. No) | -0.25 | -1.1, 0.55 | 0.5 | Availability of a handwashing facility does not significantly influence waste disposal practices. |
Reported diarrhea case (Yes vs. No) | 0.66 | -0.15, 1.5 | 0.13 | Households with diarrhea cases show higher odds of proper waste disposal (log(OR) = 0.66), but the result is not statistically significant (p = 0.13). |
Household income | 0.00 | 0.00, 0.00 | 0.7 | Income shows no measurable effect on waste disposal behavior. |
  1. Statistical Interpretation
  1. Log(OR) and Odds Ratio Meaning

In this model, none of the predictors are statistically significant, meaning that there is no strong evidence that the tested variables independently influence waste disposal practices at the 5% significance level.

  1. Interpretation of Key Predictors

Residence

Household Size

Toilet Type

Water Source

Handwashing Facility Contrary to expectations, having a handwashing facility is not associated with better waste disposal, which might suggest a gap between infrastructure availability and behavior.

Reported Diarrhea Cases

The positive coefficient (0.66) implies households reporting diarrhea were more likely to dispose waste properly.

This could reflect reactive behavior—households adopting cleaner practices after illness occurs—though the result is not significant (p = 0.13).

Household Income

The coefficient for income is near zero, suggesting economic status does not meaningfully predict waste disposal practices in this sample.

  1. Model Summary and Implications

The logistic regression model indicates that, although some variables (such as water source, residence, and diarrhea cases) show trends in the expected directions, none of the relationships are statistically significant at the 5% level. This suggests that proper waste disposal behavior in this population is not strongly determined by socioeconomic or environmental factors alone, but may depend on community-level infrastructure, awareness campaigns, or municipal services not captured in the model.

  1. Policy and Public Health Implications

From a public health standpoint:

The lack of significant predictors implies that improving waste disposal may require broader interventions, such as community-based programs, municipal collection systems, and behavioral change communication, rather than focusing solely on household demographics.

Even though income and facilities are available, behavioral and systemic barriers may prevent proper waste disposal.

Final Summary

The binary logistic regression model assessed the association between household characteristics and waste disposal practices. None of the predictor variables, including residence, household size, toilet type, water source, handwashing facilities, reported diarrhea, or household income, were statistically significant predictors of proper waste disposal (p > 0.05). Although urban households, surface water users, and those without handwashing facilities tended to have lower odds of proper waste disposal, these relationships were weak and not significant. The findings suggest that waste management behaviors in the study population are influenced by complex social and infrastructural factors beyond household-level characteristics. Therefore, policy efforts should focus on improving waste management systems, community awareness, and sanitation infrastructure to promote environmentally safe practices.