← All projects

Statistical analysis

Looking at patterns in happiness data

Using World Happiness Report data to ask how health, economic conditions, generosity, and freedom relate to reported well-being.

Duke · IDS 702 team project

RQuartoRegressionggplot2

The question

Does the association between health and happiness vary with economic conditions? We also looked at whether generosity and freedom were related to happiness differently when considered together.

What we did

  • Combined World Happiness Report data from 2015 to 2019 and explored country-level patterns.
  • Used linear regression with a life-expectancy-by-GDP interaction and country-clustered standard errors.
  • Fit an ordinal logistic model with a generosity-by-freedom interaction, then plotted predicted probabilities and discussed the modeling assumptions.

Results & discussion

The fitted associations depended on the interactions in the models. Looking at a single coefficient in isolation would have hidden that. We wrote up the analysis as a course policy memo addressed to UNDP.

Limitations

This was an observational class project. Country-level associations do not establish the effects of a policy on individuals. Missing country-years, changing survey measures, and the model assumptions also limit the conclusions.

Team: Arvind Kandala, Ammy Lin, Lingyue Hao, and Shelly Cao. Completed for IDS 702: Modeling and Representation of Data at Duke in Fall 2025. This repository is a fork of the team project.

For the code and full project details, see the project repository.