# A tibble: 5 × 3
Race1 mean `4`
<fct> <dbl> <dbl>
1 Black 28.1 4
2 Hispanic 26.4 4
3 Mexican 26.5 4
4 White 26.7 4
5 Other 24.4 4
Week 1: Intro & Measures of Helath Disparities
September 8, 2025
Social epidemiologist, assistant professor
| Week | Topic | Description |
|---|---|---|
| 1 | Descriptive | Measures of health disparity |
| 2-3 | Causal Inference | How to analyze data |
| 4 | Measurement | How to measure social constructs |
| 5 | Estimand | Questions |
| 6-7 | Interaction & Mediation | Applications in social epi |
Goal
| Assessment | % Grade |
|---|---|
| Class Participation | 10% |
| Weekly Reading Quiz | 10% |
| Weekly Problem Set | 60% |
| Final Paper | 20% |
| Total | 100% |
Prioritize learning rather than grading
Quarto
| Country | Mean |
|---|---|
| New Zealand | 7.71 (1) |
| Ireland | 7.67 (2) |
| Australia | 7.59 (3) |
| Canada | 7.59 (4) |
| Uzbekistan | 7.58 (5) |
| Iceland | 7.55 (6) |
| Norway | 7.52 (7) |
| United States | 7.50 (8) |
| Netherlands | 7.50 (9) |
| Indonesia | 7.50 (10) |
What about within-population distributions?
| Country | Mean | Equality |
|---|---|---|
| New Zealand | 7.71 (1) | 0.094 (4) |
| Ireland | 7.67 (2) | 0.096 (6) |
| Australia | 7.59 (3) | 0.100 (15) |
| Canada | 7.59 (4) | 0.099 (14) |
| Uzbekistan | 7.58 (5) | 0.097 (10) |
| Iceland | 7.55 (6) | 0.090 (2) |
| Norway | 7.52 (7) | 0.096 (7) |
| United States | 7.50 (8) | 0.107 (29) |
| Netherlands | 7.50 (9) | 0.097 (12) |
| Indonesia | 7.50 (10) | 0.098 (13) |
“Health disparities/inequalities are potentially avoidable differences in health (or in health risks that policy can influence) between groups of people who are more and less advantaged socially; these differences systematically place socially disadvantaged groups at further disadvantage on health” (Braveman 2006)
Underlying Values?
Things to avoid
Health differences that are considered unfair and unjust
Distinguish disparity/inequality from inequity
How do we quantify health disparity/inequality?
pacman::p_load(tidyverse, broom, tinytable, NHANES) # load packages
# Manual pair-wise comparison
NHANES |> group_by(Race1) |> summarize(mean = mean(BMI, na.rm = T), 4)
# Using regression
NHANES |> mutate(Race1 = factor(Race1, ordered = F) |> relevel(Race1, ref = "White")) |>
lm(formula = BMI ~ Race1) |> tidy()Manual pair-wise comparison
# A tibble: 5 × 3
Race1 mean `4`
<fct> <dbl> <dbl>
1 Black 28.1 4
2 Hispanic 26.4 4
3 Mexican 26.5 4
4 White 26.7 4
5 Other 24.4 4
Using regression
# A tibble: 5 × 5
term estimate std.error statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl>
1 (Intercept) 26.7 0.0935 286. 0
2 Race1Black 1.38 0.235 5.88 4.30e- 9
3 Race1Hispanic -0.349 0.316 -1.10 2.70e- 1
4 Race1Mexican -0.220 0.255 -0.863 3.88e- 1
5 Race1Other -2.29 0.279 -8.20 2.61e-16
Race1Black: \(1.38\)
Disparity measures are scale dependent
# Manual pair-wise comparison
NHANES <- NHANES |> mutate(diabetes.num = as.numeric(Diabetes=="Yes"))
NHANES |> group_by(Race1) |> summarize(prop = mean(diabetes.num, na.rm = T))
# Using linear regression
NHANES |> mutate(Race1 = factor(Race1, ordered = F) |> relevel(Race1, ref = "White")) |>
lm(formula = diabetes.num ~ Race1) |> tidy()Manual pair-wise comparison
# A tibble: 5 × 2
Race1 prop
<fct> <dbl>
1 Black 0.111
2 Hispanic 0.0781
3 Mexican 0.0666
4 White 0.0715
5 Other 0.0834
Usinglinearregression
# A tibble: 5 × 5
term estimate std.error statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl>
1 (Intercept) 0.0715 0.00336 21.3 2.20e-98
2 Race1Black 0.0391 0.00844 4.63 3.68e- 6
3 Race1Hispanic 0.00653 0.0114 0.574 5.66e- 1
4 Race1Mexican -0.00494 0.00911 -0.543 5.87e- 1
5 Race1Other 0.0119 0.0101 1.18 2.37e- 1
Race1Black: \(0.039\)
# Manual pair-wise comparison
NHANES <- NHANES |> mutate(diabetes.num = as.numeric(Diabetes=="Yes"))
NHANES |> group_by(Race1) |> summarize(prop = mean(diabetes.num, na.rm = T))
# Using poisson regression
NHANES |> mutate(Race1 = factor(Race1, ordered = F) |> relevel(Race1, ref = "White")) |>
glm(formula = diabetes.num ~ Race1, family = "poisson") |> tidy(exp=T)Manual pair-wise comparison
# A tibble: 5 × 2
Race1 prop
<fct> <dbl>
1 Black 0.111
2 Hispanic 0.0781
3 Mexican 0.0666
4 White 0.0715
5 Other 0.0834
UsingPoissonregression
# A tibble: 5 × 5
term estimate std.error statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl>
1 (Intercept) 0.0715 0.0471 -55.9 0
2 Race1Black 1.55 0.0993 4.39 0.0000112
3 Race1Hispanic 1.09 0.153 0.570 0.569
4 Race1Mexican 0.931 0.132 -0.543 0.587
5 Race1Other 1.17 0.132 1.17 0.243
Race1Black: \(1.55\)
Which scale of inequality is your regressin model estimating?
Which is more equitable society?
Too many comparisons?
Always check what choices are made for reference group and weighting
| Group | Income | Prev | n |
|---|---|---|---|
| 1 | 0-4999 | 0.07 | 182 |
| 2 | 5000-9999 | 0.11 | 250 |
| 3 | 10000-14999 | 0.12 | 537 |
| 4 | 15000-19999 | 0.10 | 515 |
| 5 | 20000-24999 | 0.10 | 605 |
| 6 | 25000-34999 | 0.08 | 945 |
| 7 | 35000-44999 | 0.10 | 851 |
| 8 | 45000-54999 | 0.06 | 776 |
| 9 | 55000-64999 | 0.07 | 615 |
| 10 | 65000-74999 | 0.09 | 521 |
| 11 | 75000-99999 | 0.06 | 1066 |
| 12 | more 99999 | 0.05 | 2200 |
df.income.db <- NHANES |> select(HHIncome, diabetes.num) |> na.omit() |>
group_by(HHIncome) |> summarize(prop = mean(diabetes.num, na.rm = T), n=n())
df.income.db |>
ggplot(aes(x = HHIncome, y = prop)) +
geom_point() +
geom_smooth(aes(group = 1), method = "lm", se = F, color = "#457b9d") +
theme_minimal() +
labs(x = "Income", y = "Prevalence") +
theme(text = element_text(family = "roboto",size = 12, , colour = "#1d3557"),
axis.text = element_text(family = "roboto",size = 10, colour = "#1d3557"),
axis.text.x = element_text(angle=50, vjust = 0.5))Ignoring group size
df.income.db2 <- df.income.db |>
slice(-1) |> mutate(outl = "Excluded")
df.income.db |>
mutate(outl = "Included") |>
bind_rows(df.income.db2) |>
ggplot(aes(x = HHIncome, y = prop, color = outl)) +
geom_point(color = "#1d3557") +
geom_smooth(aes(group = outl), method = "lm", se = F) +
scale_color_manual(name = "The lowest income group", values = c("#be2f3a", "#457b9d")) +
theme_minimal() +
labs(x = "Income", y = "Prevalence") +
theme(text = element_text(family = "roboto",size = 12, , colour = "#1d3557"),
axis.text = element_text(family = "roboto",size = 10, colour = "#1d3557"),
axis.text.x = element_text(angle=50, vjust = 0.5),
legend.text = element_text(family = "roboto",size = 12, colour = "#1d3557"),
legend.title = element_text(family = "roboto",size = 12, colour = "#1d3557"),
legend.position = "inside",
legend.position.inside = c(0.8, 0.8),
legend.box.background = element_rect(colour = "#1d3557"))Account for the group size
| Group | Income | Prev | n | Prop |
|---|---|---|---|---|
| 1 | 0-4999 | 0.071 | 182 | 0.02 |
| 2 | 5000-9999 | 0.108 | 250 | 0.028 |
| 3 | 10000-14999 | 0.121 | 537 | 0.059 |
| 4 | 15000-19999 | 0.105 | 515 | 0.057 |
| 5 | 20000-24999 | 0.098 | 605 | 0.067 |
| 6 | 25000-34999 | 0.085 | 945 | 0.104 |
| 7 | 35000-44999 | 0.101 | 851 | 0.094 |
| 8 | 45000-54999 | 0.064 | 776 | 0.086 |
| 9 | 55000-64999 | 0.072 | 615 | 0.068 |
| 10 | 65000-74999 | 0.086 | 521 | 0.057 |
| 11 | 75000-99999 | 0.063 | 1066 | 0.118 |
| 12 | more 99999 | 0.048 | 2200 | 0.243 |
Account for the group size
| Group | Income | Prev | n | Prop | Cum |
|---|---|---|---|---|---|
| 1 | 0-4999 | 0.071 | 182 | 0.02 | 0.02 |
| 2 | 5000-9999 | 0.108 | 250 | 0.028 | 0.048 |
| 3 | 10000-14999 | 0.121 | 537 | 0.059 | 0.107 |
| 4 | 15000-19999 | 0.105 | 515 | 0.057 | 0.164 |
| 5 | 20000-24999 | 0.098 | 605 | 0.067 | 0.23 |
| 6 | 25000-34999 | 0.085 | 945 | 0.104 | 0.335 |
| 7 | 35000-44999 | 0.101 | 851 | 0.094 | 0.429 |
| 8 | 45000-54999 | 0.064 | 776 | 0.086 | 0.514 |
| 9 | 55000-64999 | 0.072 | 615 | 0.068 | 0.582 |
| 10 | 65000-74999 | 0.086 | 521 | 0.057 | 0.64 |
| 11 | 75000-99999 | 0.063 | 1066 | 0.118 | 0.757 |
| 12 | more 99999 | 0.048 | 2200 | 0.243 | 1 |
Account for the group size
df.income.db |>
mutate(Group = row_number(), .before = HHIncome) |>
mutate(
n.prop = n/sum(n),
n.cumprop = cumsum(n.prop),
midpoint = n.cumprop - n.prop/2
) |>
tt(height=0.2) |>
setNames(c("Group","Income","Prev","n","Prop", "Cum", "Mid")) |>
format_tt(digits = 2) |>
style_tt(i = 1:2, background = "#457b9d", color = "white")| Group | Income | Prev | n | Prop | Cum | Mid |
|---|---|---|---|---|---|---|
| 1 | 0-4999 | 0.071 | 182 | 0.02 | 0.02 | 0.01 |
| 2 | 5000-9999 | 0.108 | 250 | 0.028 | 0.048 | 0.034 |
| 3 | 10000-14999 | 0.121 | 537 | 0.059 | 0.107 | 0.077 |
| 4 | 15000-19999 | 0.105 | 515 | 0.057 | 0.164 | 0.135 |
| 5 | 20000-24999 | 0.098 | 605 | 0.067 | 0.23 | 0.197 |
| 6 | 25000-34999 | 0.085 | 945 | 0.104 | 0.335 | 0.283 |
| 7 | 35000-44999 | 0.101 | 851 | 0.094 | 0.429 | 0.382 |
| 8 | 45000-54999 | 0.064 | 776 | 0.086 | 0.514 | 0.471 |
| 9 | 55000-64999 | 0.072 | 615 | 0.068 | 0.582 | 0.548 |
| 10 | 65000-74999 | 0.086 | 521 | 0.057 | 0.64 | 0.611 |
| 11 | 75000-99999 | 0.063 | 1066 | 0.118 | 0.757 | 0.698 |
| 12 | more 99999 | 0.048 | 2200 | 0.243 | 1 | 0.879 |
df.sii <- df.income.db |>
mutate(Group = row_number(), .before = HHIncome) |>
mutate(
n.prop = n/sum(n),
n.cumprop = cumsum(n.prop),
midpoint = n.cumprop - n.prop/2,
left = midpoint - n.prop/2
)
df.sii |>
ggplot(aes(ymin=0)) +
geom_rect(aes(xmin = left, xmax = n.cumprop, ymax = prop), colour = "#1d3557", fill = "#D3D3D3") +
geom_point(aes(x = midpoint, y = prop), colour = "#1d3557", size = 3) +
geom_smooth(aes(x = midpoint, y = prop), method = "lm", se = F, color = "#457b9d") +
theme_minimal() +
labs(x = "Cumulative Proportion", y = "Prevalence") +
theme(text = element_text(family = "roboto",size = 12, , colour = "#1d3557"),
axis.text = element_text(family = "roboto",size = 12, colour = "#1d3557"),
axis.title = element_text(family = "roboto",size = 12, colour = "#1d3557"))| term | estimate | std.error | statistic | p.value |
|---|---|---|---|---|
| (Intercept) | 0.106 | 0.0075 | 14.1 | 0.000000063 |
| midpoint | -0.057 | 0.0166 | -3.4 | 0.006648294 |
midpoint: -0.057
Assumptions?
set.seed(123)
x = runif(100, min = 0, max = 1)
y = 100*(x-0.5)^3 - 10*x^2 + rnorm(100, 0, 0.5) # non-linear shape
y.star = y - min(y) # rescale to start from zero
prev = 0.2 + y.star/(max(y.star)/0.6) #rescale to 0.2-0.8
coef1 <- bind_cols(x, prev) |>
lm(formula = prev ~ x) |>
tidy() |>
pull(estimate)
# coef1[2] is the SII from the linear regression model
cbind(x, prev) |>
ggplot(aes(x = x, y = prev)) +
geom_point(colour = "#1d3557") +
geom_smooth(method = "lm", se = F, color = "#457b9d") +
geom_smooth(formula = y ~ x^3 + x^2, se = F, color = "#be2f3a") +
theme_minimal() +
labs(x = "Cumulative Proportion", y = "Prevalence") +
scale_y_continuous(limits = c(0,1)) +
theme(text = element_text(family = "roboto",size = 12, , colour = "#1d3557"),
axis.text = element_text(family = "roboto",size = 12, colour = "#1d3557"),
axis.title = element_text(family = "roboto",size = 12, colour = "#1d3557"))set.seed(123)
x = runif(100, min = 0, max = 1)
y = 100*(x-0.5)^3 - 20*x^2 + rnorm(100, 0, 0.5) # non-linear shape
y.star = y - min(y) # rescale to start from zero
prev = 0.2 + y.star/(max(y.star)/0.6) #rescale to 0.2-0.8
coef2 <- bind_cols(x, prev) |>
lm(formula = prev ~ x) |>
tidy() |>
pull(estimate)
# coef2[2] is the SII from the linear regression model
cbind(x, prev) |>
ggplot(aes(x = x, y = prev)) +
geom_point(colour = "#1d3557") +
geom_smooth(method = "lm", se = F, color = "#457b9d") +
geom_smooth(formula = y ~ x^3 + x^2, se = F, color = "#be2f3a") +
theme_minimal() +
labs(x = "Cumulative Proportion", y = "Prevalence") +
scale_y_continuous(limits = c(0,1)) +
theme(text = element_text(family = "roboto",size = 12, , colour = "#1d3557"),
axis.text = element_text(family = "roboto",size = 12, colour = "#1d3557"),
axis.title = element_text(family = "roboto",size = 12, colour = "#1d3557")) Real-world application of SII and RII (Mackenbach et al. 2008)
RII for education-based inequalities in all-cause mortality rate among men
Interpretation?
| SES | Rate (\(Y\)) | Size | Fraction |
|---|---|---|---|
| Low | 0.5 | 40 | 0.25 |
| Middle | 0.3 | 100 | 0.625 |
| High | 0.2 | 20 | 0.125 |
Analytic approaches for assessing intersectionality
qmd file to include your answers
PH784 (Shiba) 2025/9/8
Social Epidemiology is Hard
We provide scientific evidence on:
This is hard because what we study are: