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 = 180 |
| 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) |
env_health %>%
tbl_summary(
by = waste_disposal)
| Characteristic |
Improper
N = 56 |
Proper
N = 124 |
| 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) |
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 |