library(ggplot2)
library(cluster)
library(factoextra)
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
library(maps)
## 
## 载入程辑包:'maps'
## The following object is masked from 'package:cluster':
## 
##     votes.repub
library(dplyr)
## 
## 载入程辑包:'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(arules)
## 载入需要的程辑包:Matrix
## 
## 载入程辑包:'arules'
## The following object is masked from 'package:dplyr':
## 
##     recode
## The following objects are masked from 'package:base':
## 
##     abbreviate, write

Introduction

Understanding how health threats affect life expectancy is essential for improving global health outcomes. Factors such as diseases, pollution, and lifestyle choices can significantly impact the longevity of populations worldwide. This project aims to explore the relationship between health threats in various countries and their life expectancyto identify most significant health indicators, so each region can target interventions to improve healthcare service. Using unsupervised learning, we’ll identify patterns in health data and visualize the global distribution of life expectancy and health threats.

Exploratory data analysis

This phase involves preparing the dataset for analysis by loading it, renaming columns for clarity, and visualizing the distribution of life expectancy across countries. We need to understand the distribution of life expectancy and identify any preliminary patterns or outliers that may require attention, such as zero values that could skew the analysis.

First I prepare the data for analysis by loading and renaming the column

dataset <- read.csv("C:/Users/PC/Documents/Life_expectancy.csv", header = TRUE, sep = ",", fileEncoding = "ISO-8859-1")
colnames(dataset) <- c('Country', 'LifeExpectancy', 'ViolenceAgainstWomen', 'MaternalMortality', 'UnsafeWASHMortality', 'PM25Concentration', 'CleanFuelAndTechnology', 'HypertensionPrevalence', 'SuicideMortality', 'ObesityPrevalence', 'HIVInfectionRate', 'TuberculosisIncidence', 'MalariaIncidence', 'RoadTrafficMortality', 'HomicideMortality', 'AlcoholConsumptionPerCapita', 'TobaccoUsePrevalence')
str(dataset)
## 'data.frame':    198 obs. of  17 variables:
##  $ Country                    : chr  "Afghanistan" "Albania" "Algeria" "Andorra" ...
##  $ LifeExpectancy             : num  63.2 78 77.1 0 63.1 76.5 76.6 76 83 81.6 ...
##  $ ViolenceAgainstWomen       : int  46 13 0 0 38 0 27 10 23 15 ...
##  $ MaternalMortality          : num  62 0.8 7.8 0 22.2 2.1 4.5 2.7 0.3 0.5 ...
##  $ UnsafeWASHMortality        : num  16.6 3.2 4.1 0 48.9 2.5 11.4 5.8 1.9 2 ...
##  $ PM25Concentration          : num  75.2 16.6 22.9 8.9 32.3 8.4 11.2 36.2 9.1 12.4 ...
##  $ CleanFuelAndTechnology     : int  35 84 100 100 50 100 100 98 100 100 ...
##  $ HypertensionPrevalence     : num  40.2 41.8 36.2 31 38.7 42.6 47.5 47.3 29.3 33.8 ...
##  $ SuicideMortality           : num  4.1 4.3 2.5 0 6.1 0.4 8.4 3.3 12.5 14.6 ...
##  $ ObesityPrevalence          : num  5.5 21.7 27.4 25.6 8.2 18.9 28.3 20.2 29 20.1 ...
##  $ HIVInfectionRate           : num  0.4 0.3 0.4 0 5.2 0 1.1 0 0.2 0 ...
##  $ TuberculosisIncidence      : num  18.9 1.7 5.4 0.29 32.5 0.49 3 2.7 0.65 0.5 ...
##  $ MalariaIncidence           : num  0.63 0 0 0 25.49 ...
##  $ RoadTrafficMortality       : num  15.9 11.7 20.9 0 26.1 0 14.1 20 4.9 4.9 ...
##  $ HomicideMortality          : num  8.5 3.6 1.7 0 9.2 2.4 6.1 3.8 1 0.5 ...
##  $ AlcoholConsumptionPerCapita: num  0 5.1 0.6 11.1 6.2 8.5 8 5 10.1 12 ...
##  $ TobaccoUsePrevalence       : num  23.3 22.4 21 31.8 0 0 24.5 25.5 13.6 26.4 ...

I use histogram visualizes how life expectancy values are distributed across the countries

ggplot(data = dataset, aes(x = LifeExpectancy)) +
  geom_histogram(fill = "lightblue", color = "black", bins = 20) +
  labs(
    title = "Histogram of Life Expectancy",
    x = "Life Expectancy",
    y = "Frequency"
  ) +
  theme_minimal()

A skewed histogram might indicate disparities in global health, with a significant number of countries having lower life expectancies. we can see some zero value which affect the data so we need to clean it

generate_scatter_plot <- function(x, y, xlab, main) {
  ggplot(data = dataset, aes(x = x, y = y)) +
    geom_point(color = "lightblue", size = 2) +
    geom_smooth(method = "lm", color = "red") + 
    labs(
      title = main,
      x = xlab,
      y = "Life Expectancy"
    ) +
    theme_minimal()
}
for (i in 3:ncol(dataset)) {
  x_col <- colnames(dataset)[i]
  main_title <- paste("Scatter Plot -", x_col)
  x_label <- colnames(dataset)[i]
  scatter_plot <- generate_scatter_plot(x = dataset[[i]], y = dataset$LifeExpectancy, xlab = x_label, main = main_title)
  print(scatter_plot)
}
## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

scatter plots suggest correlations between these health indicators and life expectancy.

dataset <- subset(dataset, MalariaIncidence != 0 & TobaccoUsePrevalence != 0 & ViolenceAgainstWomen & LifeExpectancy !=0)

PCA

Then apply PCA to reduce the dataset’s dimensionality to identify the most significant health indicators affecting life expectancy.This step helps to identify the most significant health indicators affecting life expectancy, simplifying the dataset for further analysis

dataset_scaled <- as.data.frame(scale(dataset[, -1]))
pca_result <- prcomp(dataset_scaled, center = TRUE, scale. = TRUE)
summary(pca_result)
## Importance of components:
##                           PC1    PC2    PC3    PC4     PC5    PC6     PC7
## Standard deviation     2.2067 1.5958 1.3661 1.1164 1.09561 0.9550 0.85967
## Proportion of Variance 0.3043 0.1592 0.1166 0.0779 0.07502 0.0570 0.04619
## Cumulative Proportion  0.3043 0.4635 0.5801 0.6580 0.73305 0.7901 0.83624
##                           PC8     PC9    PC10    PC11    PC12    PC13    PC14
## Standard deviation     0.7949 0.65147 0.60178 0.57253 0.51730 0.51026 0.38515
## Proportion of Variance 0.0395 0.02653 0.02263 0.02049 0.01673 0.01627 0.00927
## Cumulative Proportion  0.8757 0.90226 0.92489 0.94538 0.96211 0.97838 0.98765
##                           PC15    PC16
## Standard deviation     0.37003 0.24631
## Proportion of Variance 0.00856 0.00379
## Cumulative Proportion  0.99621 1.00000
plot(pca_result, col = "dodgerblue")

The PCA results show that the first few principal components capture a significant portion of the variance in the dataset.

fviz_pca_var(pca_result, col.var="steelblue")

ind <- get_pca_ind(pca_result)  
head(ind$contrib)
##           Dim.1      Dim.2     Dim.3      Dim.4       Dim.5      Dim.6
## 1  1.0661401685 1.46867013 1.2453999 0.50488479 7.135530557 5.41007746
## 14 0.0002983408 8.41979787 3.8787641 0.91674582 0.004774331 0.23944118
## 19 2.5581882971 0.07995157 2.7597102 0.09451185 2.379933480 0.25587836
## 21 1.1799900104 1.02158382 0.2118801 1.40493680 0.567451080 0.47200638
## 23 0.8505729121 9.20404649 3.4915913 0.08153334 0.872794841 0.05476251
## 24 5.8598526561 0.93339953 1.8983516 0.16833424 1.144310977 0.95214738
##         Dim.7    Dim.8       Dim.9      Dim.10      Dim.11     Dim.12   Dim.13
## 1  3.84141946 8.625137 0.170118910 3.046148849 1.462695401 0.41804671 4.372736
## 14 1.93079832 3.285279 0.095604837 0.001171430 0.239730411 2.64625471 2.763541
## 19 3.01416943 1.500791 0.513685395 0.001888027 0.129953687 0.09768395 2.168054
## 21 1.80747554 1.054365 0.001303432 1.947241575 0.079361121 0.53686590 1.582704
## 23 0.02600951 1.842669 1.767003186 0.844044618 6.714826485 1.11016751 1.941449
## 24 0.05012578 1.046191 4.150012666 3.543181283 0.001695033 0.05582562 1.431367
##        Dim.14    Dim.15      Dim.16
## 1   0.3466162 6.2709857  8.69253462
## 14  0.5691387 0.7789764  9.07280035
## 19  0.2660868 1.0046203  0.09496903
## 21  1.0197559 0.5989603 12.94129958
## 23  4.1245107 0.3847417  3.94821219
## 24 14.7326510 0.2187694  0.24889458

the first country (ID 1) contributes significantly to Dim.5 (7.14%) and Dim.6 (5.41%), indicating that this country’s health indicators strongly influence the variance explained by these two components

High contributions to a PC from a country suggest that the country’s health indicators are strongly associated with the patterns or features that the PC represents.

Calculating the variance explained by each principal component in the PCA result helps in deciding how many components to retain for further analysis

explained_variance <- pca_result$sdev^2 / sum(pca_result$sdev^2)
cumulative_variance <- cumsum(explained_variance)
cumulative_variance
##  [1] 0.3043374 0.4634943 0.5801322 0.6580305 0.7330532 0.7900498 0.8362388
##  [8] 0.8757346 0.9022606 0.9248942 0.9453813 0.9621064 0.9783791 0.9876505
## [15] 0.9962081 1.0000000

The first principal component (PC1) explains 30.4337450% of the variance, the first five principal components together explain approximately 73.30532% of the variance. It’s sufficient to represent the data effectively, allowing for a reduced-dimensional space that still retains the core information.

loadings <- pca_result$rotation
head(loadings)
##                               PC1         PC2         PC3          PC4
## LifeExpectancy          0.3554685  0.27375002 -0.22526908  0.092795242
## ViolenceAgainstWomen   -0.1259074  0.07748016  0.21968403 -0.557288791
## MaternalMortality      -0.3638541 -0.10412888 -0.12472823  0.029207667
## UnsafeWASHMortality    -0.3946506 -0.12519880 -0.03916546  0.007197427
## PM25Concentration      -0.2783558  0.12892257 -0.08406027  0.143688546
## CleanFuelAndTechnology  0.3782774 -0.02174464 -0.06793482  0.105671535
##                                PC5        PC6         PC7         PC8
## LifeExpectancy         -0.01915459 0.02392332  0.18011854 -0.10433018
## ViolenceAgainstWomen   -0.33492119 0.13712570  0.52442897 -0.26452998
## MaternalMortality       0.17857432 0.22283288  0.19077271  0.08016183
## UnsafeWASHMortality     0.02442923 0.15018765 -0.18493172  0.20208679
## PM25Concentration       0.25375519 0.49469738  0.05342298 -0.53437561
## CleanFuelAndTechnology  0.13462804 0.22291283  0.02351048 -0.28071654
##                                 PC9       PC10         PC11        PC12
## LifeExpectancy         -0.030319728  0.1666963  0.041238038 -0.03339757
## ViolenceAgainstWomen   -0.142517980 -0.1117464  0.034178700  0.12037046
## MaternalMortality       0.007227015  0.2581364 -0.417706473  0.53600945
## UnsafeWASHMortality    -0.023713758  0.2033078 -0.232928867 -0.09089350
## PM25Concentration      -0.098086475 -0.1320969  0.037467778 -0.29640302
## CleanFuelAndTechnology -0.200158460  0.5114744  0.008535036  0.01832408
##                               PC13        PC14          PC15        PC16
## LifeExpectancy         -0.05337996  0.21709852 -0.0686893989 -0.78029284
## ViolenceAgainstWomen    0.05854748  0.22705460 -0.1894987098  0.06314710
## MaternalMortality       0.06911298  0.07102952  0.3985784650 -0.13724322
## UnsafeWASHMortality    -0.23151640  0.13814191 -0.7325860510 -0.12255312
## PM25Concentration       0.03206296 -0.39795295  0.0007619608 -0.07022606
## CleanFuelAndTechnology -0.31271394  0.28400213 -0.0099431560  0.46136555

From this result, we can conclude that ‘Unsafe WASH Mortality’,‘Tuberculosis Incidence’, ‘Hypertension Prevalence’,‘Violence Against Women’,‘Tobacco Use Prevalence’ have strong relationship

A scree plot is generated to visualize the proportion of variance explained by each principal component

plot(explained_variance, type = "b", xlab = "Principal Component", ylab = "Proportion of Variance Explained", main = "Scree Plot")
abline(h = 0.7, col = "lightblue", lty = 2) 

Clustering

From the result, I decide to take the first 5 principal components, then applies K-means clustering to these scores to group countries into clusters based on their health indicators. This is expected to reveal patterns or groupings that correspond to different health and life expectancy profiles which is important to target interventions By comparing clusters, we can understand the key differences in health indicators that contribute to varying life expectancies across countries. This can reveal which factors are most critical in determining health outcomes.

pca_scores <- pca_result$x[, 1:5]
set.seed(123) 
kmeans_result <- kmeans(pca_scores, centers = 3) 
print(kmeans_result$size)
## [1] 25 12 17
print(kmeans_result$centers)
##          PC1        PC2        PC3         PC4         PC5
## 1 -1.8597302 -0.2800062 -0.4219174  0.02560692 -0.15982340
## 2  0.2707778  1.5946251  1.4979131  0.33624473  0.36251564
## 3  2.5437600 -0.7138439 -0.4368836 -0.27500646 -0.02085898

Cluster 1 contains 25 countries. Cluster 2 contains 12 countries. Cluster 3 contains 17 countries.

pca_clusters combines the scores of the first five principal components with the cluster assignments obtained through K-means clustering. Each row in pca_clusters represents a country with its scores on the principal components and its corresponding cluster label

pca_clusters <- data.frame(pca_scores, Cluster = kmeans_result$cluster)

I use the ggplot2 package to create a scatter plot to visualize how the clusters are distributed in the reduced-dimensional space created by PCA, revealing patterns or groupings that correspond to different health and life expectancy profiles

ggplot(pca_clusters, aes(x = PC1, y = PC2, color = factor(Cluster))) +
  geom_point(alpha = 0.6) +
  theme_minimal() +
  labs(color = 'Cluster') +
  theme(legend.position = "right")

Countries in cluster 1 have predominantly negative scores on PC1, suggesting a profile of health indicators negatively correlated with those that have a strong positive loading on PC1. cluster 3 includes countries with positive PC1 scores, suggesting that the health indicators with positive loadings on PC1 are more prevalent or significant in these countries.

Then I create a ‘numeric_data’ dataframe which has a cluster label indicating the group to which the corresponding observation has been assigned based on the PCA and clustering analysis

numeric_data <- dataset[, c(1, which(sapply(dataset, is.numeric)))]
numeric_data$Cluster <- kmeans_result$cluster

calculate the mean of each numeric feature for each cluster,summarizes the average profile of health indicators for each cluster, providing insights into the characteristics that differentiate the clusters.

numeric_data_without_country <- numeric_data[, -1]
cluster_profiles <- aggregate(. ~ Cluster, data = numeric_data_without_country, mean)
cluster_profiles
##   Cluster LifeExpectancy ViolenceAgainstWomen MaternalMortality
## 1       1       64.29600             32.64000          41.98400
## 2       2       68.43333             30.83333          19.20833
## 3       3       72.43529             28.41176          11.11765
##   UnsafeWASHMortality PM25Concentration CleanFuelAndTechnology
## 1            44.36000          35.53600               10.84000
## 2            24.55000          31.14167               37.25000
## 3            13.10588          16.60000               74.05882
##   HypertensionPrevalence SuicideMortality ObesityPrevalence HIVInfectionRate
## 1               35.40000         6.612000          8.388000        5.1120000
## 2               33.35000         5.841667          8.458333        0.9916667
## 3               36.65294        10.617647         21.929412        7.8176471
##   TuberculosisIncidence MalariaIncidence RoadTrafficMortality HomicideMortality
## 1              16.72800       21.5780000             29.48400          8.028000
## 2              26.69167        3.1750000             16.39167          6.166667
## 3              12.64706        0.4170588             22.75294         18.682353
##   AlcoholConsumptionPerCapita TobaccoUsePrevalence
## 1                    4.368000              9.46800
## 2                    3.083333             29.91667
## 3                    5.476471             12.72353

Cluster 1 appears to represent countries with the most significant health challenges, including higher mortality rates and lower life expectancy. Cluster 2 includes countries with moderate life expectancy and better health outcomes than Cluster 1 but still facing significant health challenges. Cluster 3 consists of countries with the best average health indicators, highest life expectancy, and better access to clean technologies, although they face non-communicable disease challenges.

Then calculate the silhouette scores of the clusters identified by K-means clustering to assess their quality

silhouette_score <- silhouette(kmeans_result$cluster, dist(dataset_scaled))
plot(silhouette_score, col = "lightblue", bg = "lightgray")

Cluster 1 seems to be relatively better separated from the others, meaning the countries in this cluster are more similar to each other than to those in the other clusters. Clusters 2 and 3 have lower silhouette scores, which may suggest that the countries in these clusters are not as tightly grouped, or that these clusters are not as distinct from one another.

Then I use ggplot to create a map where countries are colored based on their cluster assignment, represent how clusters are distributed worldwide

numeric_data$region <- numeric_data$Country
world_map <- map_data("world")
data_map <- merge(world_map, numeric_data, by = "region", all.x = TRUE)

ggplot() +
  geom_polygon(data = data_map, aes(x = long, y = lat, group = group, fill = factor(Cluster)), color = "white") +
  theme_minimal() +
  labs(fill = "Cluster", title = "Geographical Distribution of Clusters") +
  theme(legend.position = "bottom") + coord_cartesian(xlim = c(-10, 120), ylim = c(-50, 40))

Cluster 1 region has the lowest life expectancy, indicating widespread public health issues and a lack of access to essential health services. High maternal mortality and violence against women, alongside significant mortality due to unsafe WASH conditions, suggest critical needs in healthcare infrastructure and social services. Cluster 2 display moderate life expectancy and show improvements in public health compared to Cluster 1. They have lower violence against women and maternal mortality rates, indicating better health systems, but face challenges such as high tobacco use and tuberculosis incidence. Cluster 3 has the highest life expectancy, reflecting advanced healthcare systems and better health outcomes. Despite this, they face challenges with non-communicable diseases, as indicated by high rates of obesity, hypertension, and alcohol consumption, as well as mental health concerns highlighted by the highest suicide mortality rate.

Association rules

Then we apply Association Rule Mining uncover the relationships between various health indicators and life expectancy across each countries First I do the Data Categorization and tranform the data into categorical levels (Low, Medium, High). This step helps the discovery of rules to be more interpretable

categorize_column <- function(column) {
  cut(column,
      breaks = quantile(column, probs = c(0, .33, .67, 1), na.rm = TRUE),
      labels = c("Low", "Medium", "High"),
      include.lowest = TRUE)
}
dataset_cat <- dataset %>% 
  mutate(across(-1 & where(is.numeric), categorize_column))
head(dataset_cat)
##                             Country LifeExpectancy ViolenceAgainstWomen
## 1                       Afghanistan            Low                 High
## 14                       Bangladesh           High                 High
## 19                            Benin            Low               Medium
## 21 Bolivia (Plurinational State of)           High                 High
## 23                         Botswana            Low               Medium
## 24                           Brazil           High                  Low
##    MaternalMortality UnsafeWASHMortality PM25Concentration
## 1               High                 Low              High
## 14               Low              Medium              High
## 19              High                High            Medium
## 21            Medium                 Low            Medium
## 23            Medium              Medium               Low
## 24               Low                 Low               Low
##    CleanFuelAndTechnology HypertensionPrevalence SuicideMortality
## 1                  Medium                   High              Low
## 14                 Medium                    Low              Low
## 19                    Low                    Low             High
## 21                   High                    Low           Medium
## 23                   High                   High             High
## 24                   High                   High           Medium
##    ObesityPrevalence HIVInfectionRate TuberculosisIncidence MalariaIncidence
## 1                Low              Low                Medium           Medium
## 14               Low              Low                  High              Low
## 19            Medium           Medium                   Low             High
## 21              High           Medium                Medium              Low
## 23              High             High                  High              Low
## 24              High           Medium                   Low           Medium
##    RoadTrafficMortality HomicideMortality AlcoholConsumptionPerCapita
## 1                   Low            Medium                         Low
## 14                  Low               Low                         Low
## 19               Medium               Low                        High
## 21               Medium            Medium                      Medium
## 23               Medium              High                        High
## 24                  Low              High                        High
##    TobaccoUsePrevalence
## 1                  High
## 14                 High
## 19                  Low
## 21               Medium
## 23                 High
## 24               Medium
transactions <- apply(dataset_cat, 1, function(row) {
  items <- paste(names(row), as.character(row), sep="=")
  return(items)
})
transactions <- transactions[-1, ]
transactions_list <- apply(transactions, 2, function(col) {
  list(as.character(col))
})
transactions_list <- unlist(transactions_list, recursive = FALSE)
trans <- as(transactions_list, "transactions")

Then I Apply the apriori algorithm to discover frequent itemsets which are presumably composed of categorized health indicators and life expectancy levels and generate rules

rules <- apriori(trans,
                 parameter = list(supp = 0.2, conf = 0.6),
                 appearance = list(default = "lhs", rhs = c("LifeExpectancy=High", "LifeExpectancy=Medium", "LifeExpectancy=Low")),
                 control = list(verbose = TRUE))
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.6    0.1    1 none FALSE            TRUE       5     0.2      1
##  maxlen target  ext
##      10  rules TRUE
## 
## Algorithmic control:
##  filter tree heap memopt load sort verbose
##     0.1 TRUE TRUE  FALSE TRUE    2    TRUE
## 
## Absolute minimum support count: 10 
## 
## set item appearances ...[3 item(s)] done [0.00s].
## set transactions ...[48 item(s), 54 transaction(s)] done [0.00s].
## sorting and recoding items ... [48 item(s)] done [0.00s].
## creating transaction tree ... done [0.00s].
## checking subsets of size 1 2 3 4 done [0.00s].
## writing ... [19 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
rules_sorted <- sort(rules, by = "confidence")
inspect(rules_sorted[1:10])
##      lhs                               rhs                     support confidence  coverage     lift count
## [1]  {MalariaIncidence=Low,                                                                               
##       UnsafeWASHMortality=Low}      => {LifeExpectancy=High} 0.2037037  1.0000000 0.2037037 3.176471    11
## [2]  {MalariaIncidence=High,                                                                              
##       UnsafeWASHMortality=High}     => {LifeExpectancy=Low}  0.2407407  1.0000000 0.2407407 3.000000    13
## [3]  {MaternalMortality=High,                                                                             
##       UnsafeWASHMortality=High}     => {LifeExpectancy=Low}  0.2037037  1.0000000 0.2037037 3.000000    11
## [4]  {CleanFuelAndTechnology=High,                                                                        
##       UnsafeWASHMortality=Low}      => {LifeExpectancy=High} 0.2407407  0.9285714 0.2592593 2.949580    13
## [5]  {MaternalMortality=Low,                                                                              
##       UnsafeWASHMortality=Low}      => {LifeExpectancy=High} 0.2037037  0.9166667 0.2222222 2.911765    11
## [6]  {CleanFuelAndTechnology=High,                                                                        
##       MaternalMortality=Low,                                                                              
##       UnsafeWASHMortality=Low}      => {LifeExpectancy=High} 0.2037037  0.9166667 0.2222222 2.911765    11
## [7]  {CleanFuelAndTechnology=High,                                                                        
##       MaternalMortality=Low}        => {LifeExpectancy=High} 0.2222222  0.8571429 0.2592593 2.722689    12
## [8]  {MalariaIncidence=High,                                                                              
##       MaternalMortality=High}       => {LifeExpectancy=Low}  0.2037037  0.8461538 0.2407407 2.538462    11
## [9]  {UnsafeWASHMortality=Low}      => {LifeExpectancy=High} 0.2777778  0.8333333 0.3333333 2.647059    15
## [10] {CleanFuelAndTechnology=High}  => {LifeExpectancy=High} 0.2592593  0.7777778 0.3333333 2.470588    14

Rules [1], [2], and [8] highlight a strong association between MalariaIncidence, UnsafeWASHMortality, and life expectancy. Rules [3] and [5] show that high maternal mortality and high unsafe WASH mortality are strongly linked to low life expectancy The presence of clean fuel and technology combined with low unsafe WASH mortality ([4], [6], and [7]) is predominantly associated with high life expectancy These rules collectively suggest that improving access to clean fuel and technology, reducing unsafe WASH mortality, and addressing malaria and maternal mortality could be effective strategies for increasing life expectancy.

The results show the critical impact of controlling malaria, improving maternal health, and ensuring safe water, sanitation, and hygiene on increasing life expectancy. High access to clean fuel and technology appears to be a key factor in achieving higher life expectancy, suggesting that energy and infrastructure policies can have significant health impacts. Public health strategies that target these areas are likely to be effective in improving life expectancy based on the dataset. Improvements in infrastructure, particularly in access to clean fuel and technology, along with better healthcare services, could lead to higher life expectancy.