Exploring obesity, physical inactivity, and mental distress among adults age 50 and older
Author
Adam Yang
PC: Photo of my Grandpa
Research Question
How are obesity, physical inactivity, and frequent mental distress associated with fair or poor self-rated health among adults age 50 and older in the United States, and how do these patterns differ by age group and sex?
Introduction
I chose this topic because my family has a personal connection with Alzheimer’s disease. Two of my grandparents suffered from the disease, so I feel this topic is important for me to look into. Seeing how it affected my family has made me interested in learning more about the health challenges people may face as they get older. I want to better understand factors related to healthy aging so that I and other members of my family can be more informed and know how to better prepare for and manage potential health challenges in the future. For this project, I am especially interested in whether obesity, physical inactivity, and frequent mental distress are associated with fair or poor self-rated health. I also want to explore whether these patterns differ between age groups and sexes.
The data comes from the Centers for Disease Control and Prevention (CDC) Alzheimer’s Disease and Healthy Aging data-set, which uses information from the Behavioral Risk Factor Surveillance System (BRFSS). The data-set includes health indicators reported across different locations and demographic groups in the United States. For this project, I will focus on four health indicators: fair or poor self-rated health, obesity, physical inactivity, and frequent mental distress. I will also examine year, age group, sex, and location. These variables will help me explore how different health factors are associated with the overall health of older adults.
Percentage reporting fair or poor health; response variable
obesity
Obesity
Quantitative
Percentage reported for obesity
physical_inactivity
No leisure-time physical activity within past month
Quantitative
Percentage reporting no leisure-time physical activity
mental_distress
Frequent mental distress
Quantitative
Percentage reporting frequent mental distress
year
YearStart
Quantitative
Year of the estimate
age_group
Stratification1
Categorical
50–64 years or 65 years or older
sex
Stratification2
Categorical
Female or Male
location
LocationDesc
Categorical
State, territory, or other reporting location
The original CSV has 31 columns: 25 categorical columns and 6 quantitative columns. Some numeric columns in the original file are identifiers, duplicate values, or confidence limits, so they are not all appropriate as independent variables in a regression model.
Load Libraries and Data
This section loads the packages used for data cleaning, visualization, interactive plots, and regression output. It then reads the CSV file with read_csv() from the readr package.
# Load packages used throughout the projectlibrary(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.2.1 ✔ readr 2.2.0
✔ forcats 1.0.1 ✔ stringr 1.6.0
✔ ggplot2 4.0.3 ✔ tibble 3.3.1
✔ lubridate 1.9.5 ✔ tidyr 1.3.2
✔ purrr 1.2.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(plotly)
Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':
last_plot
The following object is masked from 'package:stats':
filter
The following object is masked from 'package:graphics':
layout
library(broom)# Read the CSV filehealthy_aging_raw <-read_csv("Alzheimer's_Disease_and_Healthy_Aging_Data.csv",show_col_types =FALSE)# Check the size and column names of the original data-setdim(healthy_aging_raw)
The original data-set contains many different health topics. I only keep the four topics needed for this research question. I also keep percentage estimates for the two age groups and the two sex categories. Rows with missing values are removed only after selecting the variables needed for this project. The data is then reshaped so that each row represents one location, year, age group, and sex, with a separate column for each health indicator.
# Identify the four health indicators used in this projectselected_topics <-c("Self-rated health (fair to poor health)","Obesity","No leisure-time physical activity within past month","Frequent mental distress")# Filter to percentage estimates and the age/sex groups used in the analysishealthy_aging_filtered <- healthy_aging_raw %>%filter( Topic %in% selected_topics, Data_Value_Type =="Percentage", StratificationCategory1 =="Age Group", Stratification1 %in%c("50-64 years", "65 years or older"), StratificationCategory2 =="Sex", Stratification2 %in%c("Female", "Male"),!is.na(Data_Value) ) %>%select( YearStart, LocationAbbr, LocationDesc, Stratification1, Stratification2, Topic, Data_Value )# Give the topic names shorter column nameshealthy_aging_long <- healthy_aging_filtered %>%mutate(Topic =recode( Topic,"Self-rated health (fair to poor health)"="poor_health","Obesity"="obesity","No leisure-time physical activity within past month"="physical_inactivity","Frequent mental distress"="mental_distress" ) )# Reshape the data so each health indicator has its own columnhealthy_aging_wide <- healthy_aging_long %>%group_by( YearStart, LocationAbbr, LocationDesc, Stratification1, Stratification2, Topic ) %>%summarize(Data_Value =mean(Data_Value, na.rm =TRUE), .groups ="drop") %>%pivot_wider(names_from = Topic,values_from = Data_Value ) %>%rename(year = YearStart,location_abbr = LocationAbbr,location = LocationDesc,age_group = Stratification1,sex = Stratification2 )# Keep only rows that have values for all four health indicatorshealthy_aging_clean <- healthy_aging_wide %>%filter(!is.na(poor_health),!is.na(obesity),!is.na(physical_inactivity),!is.na(mental_distress) ) %>%mutate(age_group =factor(age_group, levels =c("50-64 years", "65 years or older")),sex =factor(sex, levels =c("Female", "Male")) )# Review the cleaned dataglimpse(healthy_aging_clean)
year location_abbr location age_group
Min. :2015 Length :1824 Length :1824 50-64 years :920
1st Qu.:2016 N.unique : 59 N.unique : 59 65 years or older:904
Median :2018 N.blank : 0 N.blank : 0
Mean :2018 Min.nchar: 2 Min.nchar: 4
3rd Qu.:2020 Max.nchar: 4 Max.nchar: 31
Max. :2022
sex mental_distress obesity physical_inactivity
Female:915 Min. : 2.70 Min. :15.20 Min. :14.20
Male :909 1st Qu.: 7.30 1st Qu.:28.57 1st Qu.:24.90
Median : 9.50 Median :32.50 Median :28.80
Mean :10.34 Mean :32.94 Mean :29.58
3rd Qu.:12.80 3rd Qu.:37.20 3rd Qu.:33.50
Max. :25.60 Max. :51.90 Max. :70.50
poor_health
Min. :10.40
1st Qu.:19.10
Median :22.50
Mean :23.24
3rd Qu.:25.93
Max. :64.80
The pivot_wider() step is important because the original file stores each health indicator in a separate row. Reshaping the data makes it possible to compare the four percentages for the same location, year, age group, and sex. I use complete cases only for the four health indicators included in the analysis, rather than deleting rows because an unrelated column is missing.
Explore the Data
First, I look at the distribution of the percentage of adults reporting fair or poor health. This helps show the range of values in the data-set.
# Histogram of the outcome variableggplot(healthy_aging_clean, aes(x = poor_health)) +geom_histogram(bins =25, fill ="#3B82A0", color ="white") +labs(title ="Distribution of Fair or Poor Self-Rated Health",x ="Adults reporting fair or poor health (%)",y ="Number of group estimates" ) +theme_minimal()
Next, I compare fair or poor self-rated health between the two age groups.
# Compare the outcome across age groupsggplot(healthy_aging_clean, aes(x = age_group, y = poor_health, fill = age_group)) +geom_boxplot() +scale_fill_brewer(palette ="Set2") +labs(title ="Fair or Poor Self-Rated Health by Age Group",x ="Age group",y ="Adults reporting fair or poor health (%)",fill ="Age group" ) +theme_classic()
I also compare the average outcome by sex.
# Calculate average reported fair or poor health by sexhealthy_aging_clean %>%group_by(sex) %>%summarize(average_poor_health =mean(poor_health),.groups ="drop" ) %>%ggplot(aes(x = sex, y = average_poor_health, fill = sex)) +geom_col(width =0.6) +scale_fill_brewer(palette ="Set1") +labs(title ="Average Fair or Poor Self-Rated Health by Sex",x ="Sex",y ="Average percentage (%)",fill ="Sex" ) +theme_minimal()
Finally, I look at how obesity and fair or poor self-rated health are related. The points represent group-level estimates, not individual people.
# Explore the relationship between obesity and the outcomeggplot( healthy_aging_clean,aes(x = obesity, y = poor_health, color = age_group)) +geom_point(alpha =0.55) +geom_smooth(method ="lm", se =FALSE) +scale_color_brewer(palette ="Dark2") +labs(title ="Obesity and Fair or Poor Self-Rated Health",x ="Adults reporting obesity (%)",y ="Adults reporting fair or poor health (%)",color ="Age group" ) +theme_minimal()
`geom_smooth()` using formula = 'y ~ x'
Multiple Linear Regression
For the multiple linear regression, I use fair or poor self-rated health as the response variable. The three main quantitative predictors are obesity, physical inactivity, and frequent mental distress. I also include year, age group, and sex to account for differences across years and demographic groups. Age group and sex are categorical predictors, while the four health percentages and year are quantitative variables.
This model can help show whether each health indicator is associated with fair or poor self-rated health while the other variables in the model are held constant. Since the data is observational and aggregated, the model cannot prove that these factors cause poor self-rated health.
# Fit a multiple linear regression modelhealth_model <-lm( poor_health ~ obesity + physical_inactivity + mental_distress + age_group + year + sex,data = healthy_aging_clean)# Display the regression resultssummary(health_model)
Call:
lm(formula = poor_health ~ obesity + physical_inactivity + mental_distress +
age_group + year + sex, data = healthy_aging_clean)
Residuals:
Min 1Q Median 3Q Max
-14.5596 -2.1164 -0.2744 1.8185 19.4892
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 621.79877 78.15196 7.956 3.09e-15 ***
obesity -0.08387 0.02123 -3.951 8.08e-05 ***
physical_inactivity 0.63393 0.01627 38.964 < 2e-16 ***
mental_distress 0.91127 0.03779 24.117 < 2e-16 ***
age_group65 years or older 4.23738 0.32634 12.985 < 2e-16 ***
year -0.31159 0.03883 -8.025 1.80e-15 ***
sexMale 5.77700 0.21193 27.259 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.453 on 1817 degrees of freedom
Multiple R-squared: 0.7014, Adjusted R-squared: 0.7004
F-statistic: 711.3 on 6 and 1817 DF, p-value: < 2.2e-16
The categorical variables are represented by indicator variables in the regression model. The printed coefficient table below gives the estimated coefficients, standard errors, t-statistics, and p-values.
# Print the estimated model coefficientstidy(health_model)
The multiple linear regression showed that obesity, physical inactivity, and frequent mental distress all had statistically significant relationships with fair or poor self-rated health. Out of the three health indicators, frequent mental distress had the largest positive coefficient (0.911), followed by physical inactivity (0.634). This suggests that groups with higher percentages of mental distress and physical inactivity also tended to report higher percentages of fair or poor health. Surprisingly, obesity had a small negative coefficient (-0.084), meaning that higher obesity percentages were associated with slightly lower percentages of fair or poor health after accounting for the other variables. The results also showed that adults ages 65 and older and males had higher predicted percentages of fair or poor health compared to their respective reference groups. All the variables were statistically significant, with p-values below 0.05. The model had an R-squared value of 0.7014, meaning it explained about 70% of the variation in fair or poor self-rated health. Overall, these results suggest that mental distress and physical inactivity are important factors associated with self-rated health among older adults. However, these relationships do not necessarily mean that one factor directly causes another.
Final Interactive Visualization
This interactive scatterplot compares obesity and fair or poor self-rated health. Color represents age group, and point shape represents sex. Hover over a point to see its location, year, age group, sex, and the percentages for all four health indicators.
# Create the final plot with color and shape to compare demographic groups# Create the final plot with 4 demographic groups and custom colorsfinal_plot <-ggplot( healthy_aging_clean,aes(x = obesity,y = poor_health,color =interaction(age_group, sex, sep =" - "),shape = sex,text =paste0("Location: ", location,"<br>Year: ", year,"<br>Age group: ", age_group,"<br>Sex: ", sex,"<br>Obesity: ", round(obesity, 1), "%","<br>Physical inactivity: ", round(physical_inactivity, 1), "%","<br>Mental distress: ", round(mental_distress, 1), "%","<br>Fair/poor health: ", round(poor_health, 1), "%" ) )) +geom_point(alpha =0.7, size =2) +scale_color_manual(values =c("50-64 years - Male"="blue","50-64 years - Female"="pink","65 years or older - Male"="purple","65 years or older - Female"="red" )) +scale_shape_manual(values =c("Female"=16, "Male"=17 )) +labs(title ="Obesity and Fair or Poor Health Among Adults Age 50 and Older",subtitle ="CDC group-level estimates by age group and sex",x ="Adults reporting obesity (%)",y ="Adults reporting fair or poor health (%)",color ="Demographic Group",shape ="Sex",caption ="Source: CDC, Alzheimer's Disease and Healthy Aging Data (BRFSS)." ) +theme_classic()# Convert the ggplot into an interactive Plotly chartggplotly(final_plot, tooltip ="text")
Conclusion
This project examines how obesity, physical inactivity, and frequent mental distress are associated with fair or poor self-rated health among adults age 50 and older. The visualizations make it possible to compare health estimates across age groups and sex, while the multiple linear regression examines the relationship between several health indicators and the outcome at the same time.
After reviewing the regression output, I can identify which predictors have stronger statistical associations with fair or poor self-rated health and how much variation the model explains. One limitation is that the data-set contains group-level survey estimates rather than individual medical records. It also relies on self-reported information, which may not perfectly reflect a person’s health. Because of these limitations, the results should be understood as associations among reported health indicators, not proof that one condition causes another.