Skip to contents

A reproducibly simulated cross-sectional wellbeing survey for descriptive, correlation, regression and missing-data examples. life_satisfaction responds meaningfully to its predictors: higher stress lowers it, more sleep and exercise raise it, log-income has a real positive effect (about +0.4 per natural-log unit), and age has a mild inverted-U (peaking in mid-life). education is an ordered factor. Income is missing more often at higher stress (missing at random); because income genuinely predicts the outcome, this missingness is informative for the missing-data examples.

Usage

wellbeing_survey

Format

A data frame with 300 rows and 9 variables:

id

Respondent identifier.

region

Region of residence: North, South, East or West.

age

Age in years.

education

Highest education level (ordered factor: secondary < undergraduate < postgraduate).

income

Annual income; contains missing values (more at high stress).

stress

Self-reported stress (1-7).

sleep_hours

Typical hours of sleep per night; contains missing values.

exercise_days

Days of exercise per week (0-7); contains missing values.

life_satisfaction

Life satisfaction (1-7); contains missing values.

Source

Simulated; see data-raw/generate_datasets.R.

Details

The data are synthetic, generated by data-raw/generate_datasets.R with a fixed seed; they do not describe any real individuals.