food price inflation to dietary behaviour - Presentation

Kornelia

2025-12-04

Introduction

Research Context

Over the past several years, U.S. households have faced rising food costs, particularly since the COVID-19 pandemic and subsequent supply chain disruptions.

Key Issues:

This Analysis:

Research Questions

Three Key Questions

  1. How do changes in food prices relate to food insecurity rates?
    • Direct relationship between inflation and household food security
  2. Does food inflation correlate with household spending pattern shifts?
    • Do people change their eating habits (home vs. restaurant)?
  3. Is there a lagged relationship between inflation and food insecurity?
    • Do effects appear immediately or over time?

Data Preparation

Data Sources & Processing

# Download food price data from FRED
food_home <- fredr(series_id = "CUSR0000SAF11", 
                   observation_start = as.Date("2018-01-01"),
                   observation_end = as.Date("2023-12-31"))

food_away <- fredr(series_id = "CUSR0000SEFV", 
                   observation_start = as.Date("2018-01-01"),
                   observation_end = as.Date("2023-12-31"))

# Calculate monthly YoY inflation on full series
monthly_home <- food_home %>%
  arrange(date) %>%
  mutate(
    inflation_home = (value / lag(value, 12) - 1) * 100,
    year = lubridate::year(date)
  )

monthly_away <- food_away %>%
  arrange(date) %>%
  mutate(
    inflation_away = (value / lag(value, 12) - 1) * 100,
    year = lubridate::year(date)
  )

# Compute annual averages for 2019-2023
annual_inflation <- monthly_home %>%
  filter(year >= 2019, year <= 2023) %>%
  group_by(year) %>%
  summarise(avg_inflation_home = mean(inflation_home, na.rm = TRUE), .groups = "drop")

inflation_away <- monthly_away %>%
  filter(year >= 2019, year <= 2023) %>%
  group_by(year) %>%
  summarise(avg_inflation_away = mean(inflation_away, na.rm = TRUE), .groups = "drop")

# Combine inflation data
inflation_data <- annual_inflation %>%
  left_join(inflation_away, by = "year") %>%
  mutate(avg_inflation_total = (avg_inflation_home + avg_inflation_away) / 2)

Data Preparation (cont.)

Food Security Data

# Load food security data (combined from CPS-FSS annual files)
food_security <- read_csv("food_security_annual_summary.csv", show_col_types = FALSE) %>%
  filter(year >= 2019, year <= 2023)

# Merge all data
data <- inflation_data %>%
  left_join(food_security, by = "year")
Combined Dataset: Food Inflation and Food Security (2019-2023)
Year Avg Inflation (%) Food Insecure (%) Food Secure (%) Very Low Security (%)
2019 1.98 10.78 88.99 3.61
2020 3.42 11.65 88.10 3.76
2021 4.00 10.36 89.51 3.44
2022 9.52 13.38 86.40 4.88
2023 6.12 14.16 85.72 4.92

Note: Food security data collected from ~120,000 households per year via CPS Food Security Supplement

Question 1: Food Prices & Food Insecurity

How do changes in food prices relate to food insecurity?

# Correlation
cor_result <- cor(data$avg_inflation_total, data$food_insecure_pct, 
                  use = "complete.obs")

# Regression
model1 <- lm(food_insecure_pct ~ avg_inflation_total, data = data)

Key Statistics:

Interpretation: For every 1% increase in food inflation, food insecurity increases by approximately 0.42 percentage points.

Question 1: Correlation Plot

Question 1: Summary

Key Findings

Strong Positive Correlation (r = 0.753)

Regression Results

Limitations

Question 2: Spending Patterns

Does food inflation correlate with spending shifts?

# Download spending data
pce_food <- fredr(series_id = "DFOORC1A027NBEA",
                  observation_start = as.Date("2019-01-01"),
                  observation_end = as.Date("2023-12-31"))

pce_services <- fredr(series_id = "DFSARC1A027NBEA",
                      observation_start = as.Date("2019-01-01"),
                      observation_end = as.Date("2023-12-31"))

# Calculate annual spending
spending <- pce_food %>%
  mutate(year = year(date)) %>%
  filter(year >= 2019, year <= 2023) %>%
  group_by(year) %>%
  summarise(food_home_spending = mean(value), .groups = "drop")

services <- pce_services %>%
  mutate(year = year(date)) %>%
  filter(year >= 2019, year <= 2023) %>%
  group_by(year) %>%
  summarise(food_away_spending = mean(value), .groups = "drop")

# Combine and calculate ratio
spending_data <- spending %>%
  left_join(services, by = "year") %>%
  left_join(inflation_data, by = "year") %>%
  mutate(
    home_away_ratio = (food_home_spending / food_away_spending) * 100,
    pct_change_ratio = (home_away_ratio / lag(home_away_ratio) - 1) * 100
  )

Question 2: Spending Data

Home vs. Away Food Spending Ratio
Year Inflation (%) Home/Away Ratio (%) Change from Prior Year (%)
2019 1.98 2.65 NA
2020 3.42 2.89 9.23
2021 4.00 2.45 -15.28
2022 9.52 2.39 -2.41
2023 6.12 2.38 -0.23
# Correlation
cor_spending <- cor(spending_data$avg_inflation_total, 
                    spending_data$home_away_ratio, 
                    use = "complete.obs")

Key Statistics:

Question 2: Correlation Plot

Question 2: Summary

Key Findings

Negative Correlation (r = -0.644)

The Pattern:

Possible Explanations:

  1. Post-pandemic “revenge spending” on dining experiences
  2. Strong wage growth (2021-2023) enabled sustained restaurant spending
  3. Restaurant dining became a priority/non-negotiable expense
  4. Pent-up demand overwhelmed price sensitivity

Question 3: Lagged Effects

Is there a lagged relationship?

# Create lagged variables
lagged_data <- data %>%
  arrange(year) %>%
  mutate(
    inflation_lag1 = lag(avg_inflation_total, 1),
    inflation_lag2 = lag(avg_inflation_total, 2)
  )

# Calculate correlations for different lags
cors <- tibble(
  Lag = c("Same Year", "1-Year Lag", "2-Year Lag"),
  Correlation = c(
    cor(lagged_data$avg_inflation_total, lagged_data$food_insecure_pct, 
        use = "complete.obs"),
    cor(lagged_data$inflation_lag1, lagged_data$food_insecure_pct, 
        use = "complete.obs"),
    cor(lagged_data$inflation_lag2, lagged_data$food_insecure_pct, 
        use = "complete.obs")
  ),
  N = c(5, 4, 3)
)

Question 3: Lag Comparison

Correlations at Different Time Lags
Time Lag Correlation Sample Size
Same Year 0.753 5
1-Year Lag 0.734 4
2-Year Lag 0.996 3

Question 3: Current vs. Lagged

Question 3: Summary

Key Findings - Effects Are Immediate

Contemporaneous Effects Dominate

What This Tells Us:

Important Caveats:

Overall Conclusions

Main Takeaways

1. Strong Direct Relationship

2. Unexpected Spending Patterns

3. Immediate, Not Delayed Effects

Study Limitations

Important Caveats

1. Small Sample Size

2. COVID-19 Confounding

3. Temporal Aggregation

4. Single Outcome Measure

Technical Appendix

Data Sources & Methods

Data Sources:

Sample Sizes:

Thank You