Course Datasets
Every dataset used in PSY 652, with full codebooks
This page lists every dataset used in any of PSY 652’s modules, labs, lectures, or pre-studies — organized by the course Part where the dataset first appears — with the full codebook for each. Two files aren’t listed here because you create or obtain them yourself in lab: pew_atp_w163.sav (you download it from Pew Research in the M05 lab) and social_media.xlsx (you build it by hand in the M03 lab). Each is explained in its own lab.
Part 1 · Foundations of Data Analysis in R
nhanes
The NHANES health-survey extract — systolic blood pressure and demographics for 5,000 U.S. participants. PSY 652’s very first dataset: the running example throughout M01 (describing data) and the hands-on dataset in the M02 tools lab.
Codebook
At a glance
| File | data/nhanes.Rds |
| Rows | 5,000 — one person |
| Columns | 7 |
| Coverage | NHANES 2011–2012 cycle, resampled; ages 0–80 |
| Load it with | nhanes <- read_rds(here("data", "nhanes.Rds")) |
What this file is
Each row is one person — their sex, age, marital status, education, and systolic blood pressure, as measured in the 2011–2012 NHANES cycle. These 5,000 rows are a resample drawn from the full NHANES study, built to behave like a simple random sample of the U.S. population. That is what lets you analyze them with ordinary tools and no survey weights — and it is why this teaching file exists. Missing values were not dropped. Every NA you meet is real and is documented in the table below. That is deliberate: deciding what to do about missingness is part of the work.
Source
The National Health and Nutrition Examination Survey (NHANES) — the CDC’s flagship surveillance program for the health and nutritional status of people living in the United States, running in some form since the early 1960s. Each two-year cycle interviews and physically examines roughly 10,000 people drawn to represent the U.S. civilian non-institutionalized population, then releases the de-identified data into the public domain.
NHANES deliberately oversamples certain groups (by age, income, and race/ethnicity) so there are enough of them to study, which means the raw released data are not a simple random sample — using them correctly requires survey weights. The file shipped here is a version that has been resampled to undo that oversampling, so that it can be analyzed with ordinary tools and no weights. That convenience is the whole reason it exists, and it is why this is a teaching file rather than a file you would use for a real prevalence estimate.
- NHANES program: https://www.cdc.gov/nchs/nhanes/index.html
- Raw data downloads: https://wwwn.cdc.gov/nchs/nhanes/
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
id |
numeric | 62,161 to 71,915; 5,000 unique values | None | Participant identifier. One row per participant, so this uniquely identifies a row. |
sex |
factor | female; male | None | Participant’s sex as recorded by NHANES. |
age |
numeric | 0 to 80 years | None | Age at screening, in completed years. NHANES top-codes everyone 80 and older as 80, so the maximum is a ceiling rather than a real oldest age. |
age_group |
factor | Under 26; 26 to 35; 36 to 45; 46 to 55; 56 to 64; 65 and older | None | Age collapsed into six bands, for tables and grouped comparisons. |
marital_status |
factor | Divorced; Live with Partner; Married; Single; Separated; Widowed | 1,415 NA (28.3%). Structural: NHANES asks marital status only of participants aged 20 and older, so every child is NA by design rather than by nonresponse. | Current marital status, self-reported. |
education |
factor | 8th Grade or Less; 9–11th Grade; High School Graduate or GED; Some College; College Graduate | 1,416 NA (28.3%). Structural: asked only of participants aged 20 and older. | Highest level of education completed. |
SBP |
numeric | 79 to 221 mmHg | 719 NA (14.4%), from two different causes. Structural: NHANES measures blood pressure only from age 8, so all 573 participants under 8 are NA by design – the youngest value in the file is exactly 8. Item nonresponse: a further 146 participants aged 8 or older (3.3% of them) did not complete the examination. | Systolic blood pressure in millimetres of mercury, from the examination component. |
wdi_2022
The cross-section snapshot of World Bank development indicators that the M03 Rosling-style bubble chart is built from.
Codebook
At a glance
| File | data/wdi_2022.Rds |
| Rows | 207 — one per country |
| Columns | 5 |
| Coverage | 207 countries and economies, year 2022 only |
| Load it with | wdi_2022 <- read_rds(here("data", "wdi_2022.Rds")) |
What this file is
Each row is one country in 2022 — its life expectancy, GDP per capita, population, and World Bank region. A country appears exactly once, so country uniquely identifies a row.
- “Country” is the World Bank’s looser sense of the word — its official term is economy. Alongside sovereign states the list includes territories and dependencies that report their own statistics (American Samoa, Aruba, Hong Kong SAR). Do not read the 207 rows as 207 UN member states.
- Regional aggregates are dropped — no World, Low income, or Euro area rows survive.
- Only complete cases are kept, so every column has zero missing values. That tidiness is a choice, not a property of the source: countries missing any of the three indicators for 2022 were dropped rather than kept with
NAs. Four economies that appear in wdi_trends have no 2022 row here at all — Cuba, Eritrea, South Sudan, and Yemen. The ones that drop out of a complete-case file are rarely a random subset. - This is exactly the
year == 2022slice of wdi_trends — same countries, same values, with the constantyearcolumn removed.
Source
The World Bank’s World Development Indicators (WDI) — the Bank’s primary collection of development statistics, compiled from officially recognized international sources. The data were retrieved through the WDI R package, which queries the World Bank’s open API.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
country |
character | 207 unique countries | None | Country or territory name as supplied by the World Bank. |
region |
character | 7 regions | None | World Bank region the country is assigned to. Aggregate rows such as ‘World’ and income groupings were removed, so only real countries remain. |
life_expectancy |
numeric | 18.8 to 85.8 years | None | Life expectancy at birth, in years, for the total population. |
gdp_per_capita |
numeric | $303 to $226,052 | None | Gross domestic product per capita, in current US dollars. |
population |
numeric | 9,992 to 1,425,000,000 | None | Total population. |
wdi_trends
The time-series companion to wdi_2022 — same indicators across many years.
Codebook
At a glance
| File | data/wdi_trends.Rds |
| Rows | 2,477 — one per country-year |
| Columns | 6 |
| Coverage | 211 countries and economies; 14 time points, 1960–2022 |
| Load it with | wdi_trends <- read_rds(here("data", "wdi_trends.Rds")) |
What this file is
Each row is one country in one year — life expectancy, GDP per capita, and population. Together country and year uniquely identify a row.
- The years are sampled, not annual. The file holds 14 time points: every fifth year from 1960 through 2020, plus 2022. The last gap is two years, not five — if you difference consecutive rows to get change-per-period, the 2020→2022 step is not the same width as the others.
- Regional aggregates are dropped — every row is a real country, not a grouping.
- Only complete cases are kept: a country-year appears only if all three indicators were reported. That is what makes the panel unbalanced: only 108 of the 211 countries have all 14 time points, and the rest have between 2 and 13. A world average for 1960 is therefore computed over a different — and better-measured — set of countries than the same average for 2010.
- wdi_2022 is exactly the
year == 2022slice of this file, with the constantyearcolumn removed.
Source
The World Bank’s World Development Indicators (WDI) — the Bank’s primary collection of development statistics, compiled from officially recognized international sources. The data were retrieved through the WDI R package, which queries the World Bank’s open API.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
country |
character | 211 unique countries | None | Country or territory name as supplied by the World Bank. |
region |
character | 7 regions | None | World Bank region the country is assigned to. |
year |
integer | 1960 to 2022 | None | Calendar year of the observation. |
life_expectancy |
numeric | 12.8 to 86.1 years | None | Life expectancy at birth, in years, for the total population. |
gdp_per_capita |
numeric | $15 to $226,052 | None | Gross domestic product per capita, in current US dollars. |
population |
numeric | 5,663 to 1,425,000,000 | None | Total population. |
The three indicator columns carry variable labels attached with labelled::var_label() — for example, life_expectancy is labelled “Life expectancy at birth, total (years)” — so gtsummary and skimr print readable text instead of the bare column name. country, region, and year have no label.
inequality_tidy
Five OECD countries’ after-tax Gini coefficients, 1990 onward — the centerpiece of M03’s lecture on Knaflic’s design moves.
Codebook
At a glance
| File | data/inequality_tidy.Rds |
| Rows | 147 — one per country-year |
| Columns | 3 |
| Coverage | Five OECD countries, 1990–2023 (coverage varies by country) |
| Load it with | inequality_tidy <- read_rds(here("data", "inequality_tidy.Rds")) |
What this file is
Each row is one country in one year — that country’s after-tax household-income Gini coefficient. A country appears at most once per year.
- Five OECD countries: United States, United Kingdom, Germany, France, Sweden — chosen so the U.S. can be read against four European comparators.
- 1990 onward only.
- After-tax Gini only (
gini_dhi, disposable household income, equivalised). The source also carries a before-tax measure; it is not here, so every number in this file is post-redistribution. - The panel is unbalanced — 147 rows rather than the 170 a complete 5 × 34 grid would hold. A missing country-year means the source never measured it, not that your data has an
NA.
Source
TidyTuesday 2025-08-05 release, Income Inequality Before and After Taxes (income_inequality_processed.csv) — https://github.com/rfordatascience/tidytuesday/tree/main/data/2025/2025-08-05
TidyTuesday took the data from Our World in Data, where it was processed and visualised by Joe Hasell in “Income inequality before and after taxes: how much do countries redistribute income?”. Our World in Data in turn builds the series from the Luxembourg Income Study (2025) and the OECD Income and Wealth Distribution Database (2024), with population figures from HYDE, Gapminder, and the UN World Population Prospects.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
country |
factor | United States; United Kingdom; Germany; France; Sweden | None | One of five high-income countries retained for the course example. |
year |
integer | 1990 to 2023 | None | Calendar year of the estimate. |
gini_dhi |
numeric | 0.221 to 0.394 | None | Gini coefficient of equivalised disposable household income, measured after taxes and transfers. 0 would be perfect equality, 1 perfect inequality. |
nsduh_20092019
Eleven annual waves of the National Survey on Drug Use and Health, adolescents aged 12–17 — depression, impairment, and mental-health-care measures with survey-design variables. The dataset behind the M05 module’s reproduction of Daly (2022)’s depression trend and the M07 lab’s confidence intervals.
Codebook
At a glance
| File | data/nsduh_20092019.Rds |
| Rows | 172,183 — one per adolescent respondent |
| Columns | 16 |
| Coverage | U.S. adolescents ages 12–17, survey years 2009–2019 |
| Used in | M05 Module, M07 lab |
| Load it with | nsduh_20092019 <- read_rds(here("data", "nsduh_20092019.Rds")) |
This is the eleven-year NSDUH adolescent file: eleven annual waves of depression, impairment, and mental-health-care measures, with the survey-design variables needed to produce population estimates. It is the dataset behind the reproduction of Daly (2022)’s sex-specific depression trend.
What this file is
Each row is one adolescent who completed the survey in one year. record_id is unique across all 172,183 rows.
- This is a repeated cross-section, not a panel. Each year interviews a fresh sample, so no respondent appears twice and you cannot follow an individual over time.
- Respondents per year range from 13,287 (2018) to 19,264 (2011); the earlier years are noticeably larger than the later ones.
- The design columns (
vestr,verep, weights) are included because NSDUH is a clustered, multistage sample. Treating rows as independent draws understates uncertainty; the M07 lab shows what to do about it.
Source
The National Survey on Drug Use and Health (NSDUH) — the annual U.S. survey of substance use and mental health conducted by the Substance Abuse and Mental Health Services Administration (SAMHSA). This extract pools the public-use adolescent files (ages 12–17) for survey years 2009 through 2019, keeping variables relevant to major depressive episode (MDE), depression-related impairment, mental-health-care use, and substance use disorder.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
record_id |
character | 172,183 unique values, of the form |
None | Unique identifier for one adolescent respondent, built as year plus the NSDUH questionnaire ID so that records stay distinct when waves are stacked. |
year |
integer | 2009 to 2019, eleven annual waves | None | Survey year. This file stacks eleven annual waves, so year identifies which one a record came from and is the x-axis for every trend analysis in the course. |
sex |
factor | Female; Male | None | Respondent’s sex as recorded by NSDUH. |
age |
integer | 12 to 17 years | None | Age in completed years. The file is restricted to adolescents, so the range is 12 to 17 by construction. |
raceeth |
factor | Asian; Black; Hispanic; Multiracial; Native American; Native Hawaiian/Pacific Islander; Non-Hispanic White | None | Race and ethnicity as classified by NSDUH’s recoded race variable. |
mde_lifetime |
factor | Negative; Positive | 3,731 NA (2.2%). Item nonresponse: respondents whose answers were insufficient to classify. | Whether the respondent has ever experienced a major depressive episode, using NSDUH’s DSM-based classification. |
mde_pastyear |
factor | Negative; Positive | 4,400 NA (2.6%). Item nonresponse: respondents whose answers were insufficient to classify. Dropping these leaves 167,783 records, which is exactly the analytic sample Daly (2022) reports. | Whether the respondent experienced a major depressive episode in the past 12 months. This is the primary outcome for the depression-trend analyses in the course. |
mde_pastyear_severe |
factor | Negative; Positive | 4,465 NA (2.6%). Item nonresponse. | Whether the respondent had a past-year major depressive episode with severe role impairment. This is a whole-sample indicator, not a conditional one: everyone negative on mde_pastyear is coded Negative here rather than missing. |
mh_sawprof |
factor | No; Yes | 144,086 NA (83.7%). Structural: the question follows a skip pattern, so most respondents were never asked it. The share missing is close to 80% in every wave, not just overall. | Whether the respondent saw or talked to a professional about depression in the past year. |
severity_chores |
numeric | 0 to 10 | 153,531 NA (89.2%). Structural plus item nonresponse: the four Sheehan items are asked only of respondents positive for past-year MDE, so everyone else is missing by design. NSDUH’s reserved codes above 10 (refused, don’t know, blank) are recoded to NA here, so they are counted in this total. | Sheehan Disability Scale rating of how much past-year depression interfered with household chores, where 0 is no interference and 10 is very severe interference. |
severity_work |
numeric | 0 to 10 | 153,507 NA (89.2%). Structural plus item nonresponse: the four Sheehan items are asked only of respondents positive for past-year MDE, so everyone else is missing by design. NSDUH’s reserved codes above 10 (refused, don’t know, blank) are recoded to NA here, so they are counted in this total. | Sheehan Disability Scale rating of interference with school or work, 0 to 10. |
severity_family |
numeric | 0 to 10 | 153,488 NA (89.1%). Structural plus item nonresponse: the four Sheehan items are asked only of respondents positive for past-year MDE, so everyone else is missing by design. NSDUH’s reserved codes above 10 (refused, don’t know, blank) are recoded to NA here, so they are counted in this total. | Sheehan Disability Scale rating of interference with family relationships, 0 to 10. |
severity_social |
numeric | 0 to 10 | 153,494 NA (89.1%). Structural plus item nonresponse: the four Sheehan items are asked only of respondents positive for past-year MDE, so everyone else is missing by design. NSDUH’s reserved codes above 10 (refused, don’t know, blank) are recoded to NA here, so they are counted in this total. | Sheehan Disability Scale rating of interference with social life, 0 to 10. |
adol_weight |
numeric | 1.04 to 22,960 | None | Person-level analysis weight. Each respondent stands in for this many U.S. adolescents, correcting for NSDUH’s unequal selection probabilities and nonresponse. |
vestr |
numeric | 30,000 to 40,049 | None | Variance estimation stratum. Needed with verep and adol_weight to compute design-based standard errors. |
verep |
numeric | 1 to 2 | None | Variance estimation replicate, the primary sampling unit within a stratum. |
nsduh_2019
A single wave of the National Survey on Drug Use and Health, adolescents aged 12–17 — depression, impairment, mental-health-care, and past-year substance use disorder for each respondent. Because it measures depression and substance use on the same people, it carries the comorbidity cross-tabs in the M05 module and pre-study and the conditional-probability work in the M06 lab.
Codebook
At a glance
| File | data/nsduh_2019.Rds |
| Rows | 13,397 — one per adolescent respondent |
| Columns | 17 |
| Coverage | U.S. adolescents ages 12–17, 2019 survey year |
| Used in | M05 Module (cross-tabs), M05 pre-study, M06 lab |
| Load it with | nsduh_2019 <- read_rds(here("data", "nsduh_2019.Rds")) |
A single-wave NSDUH adolescent file: one year of depression, impairment, mental-health-care, and substance use disorder measures, with the survey-design variables needed to produce population estimates. Because it holds both a depression indicator and a substance-use indicator for the same respondents, it is the file for questions about the two together — comorbidity cross-tabs, conditional probabilities, and joint prevalence.
What this file is
Each row is one adolescent who completed the 2019 survey. record_id is unique across all 13,397 rows.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
record_id |
character | 13,397 unique values, all of the form 2019_ |
None | Unique identifier for one adolescent respondent, built as year plus the NSDUH questionnaire ID so that records stay distinct when waves are stacked. |
year |
integer | 2019 | None | Survey year. Constant in this file, which holds the 2019 wave only. |
sex |
factor | Female; Male | None | Respondent’s sex as recorded by NSDUH. |
age |
integer | 12 to 17 years | None | Age in completed years. The file is restricted to adolescents, so the range is 12 to 17 by construction. |
raceeth |
factor | Asian; Black; Hispanic; Multiracial; Native American; Native Hawaiian/Pacific Islander; Non-Hispanic White | None | Race and ethnicity as classified by NSDUH’s recoded race variable. |
mde_lifetime |
factor | Negative; Positive | 382 NA (2.9%). Item nonresponse: respondents whose answers were insufficient to classify. | Whether the respondent has ever experienced a major depressive episode, using NSDUH’s DSM-based classification. |
mde_pastyear |
factor | Negative; Positive | 447 NA (3.3%). Item nonresponse: respondents whose answers were insufficient to classify. | Whether the respondent experienced a major depressive episode in the past 12 months. This is the primary outcome for the depression-trend analyses in the course. |
mde_pastyear_severe |
factor | Negative; Positive | 461 NA (3.4%). Item nonresponse. | Whether the respondent had a past-year major depressive episode with severe role impairment. This is a whole-sample indicator, not a conditional one: everyone negative on mde_pastyear is coded Negative here rather than missing. |
mh_sawprof |
factor | No; Yes | 10,506 NA (78.4%). Structural: the question follows a skip pattern, so most respondents were never asked it. Note the pattern is not simply ‘MDE-positive only’ – 805 respondents who were not MDE-positive still have a value. | Whether the respondent saw or talked to a professional about depression in the past year. |
severity_chores |
numeric | 0 to 10 | 11,324 NA (84.5%). Structural plus item nonresponse: all 11,299 respondents who were not MDE-positive were never asked, and 25 MDE-positive respondents did not answer. NSDUH’s reserved codes above 10 (refused, don’t know, blank) are recoded to NA here, so they are counted in this total. | Sheehan Disability Scale rating of how much past-year depression interfered with household chores, where 0 is no interference and 10 is very severe interference. |
severity_work |
numeric | 0 to 10 | 11,322 NA (84.5%). Structural plus item nonresponse, as for severity_chores. NSDUH’s reserved codes above 10 (refused, don’t know, blank) are recoded to NA here, so they are counted in this total. | Sheehan Disability Scale rating of interference with school or work, 0 to 10. |
severity_family |
numeric | 0 to 10 | 11,324 NA (84.5%). Structural plus item nonresponse, as for severity_chores. NSDUH’s reserved codes above 10 (refused, don’t know, blank) are recoded to NA here, so they are counted in this total. | Sheehan Disability Scale rating of interference with family relationships, 0 to 10. |
severity_social |
numeric | 0 to 10 | 11,324 NA (84.5%). Structural plus item nonresponse, as for severity_chores. NSDUH’s reserved codes above 10 (refused, don’t know, blank) are recoded to NA here, so they are counted in this total. | Sheehan Disability Scale rating of interference with social life, 0 to 10. |
substance_disorder |
factor | Negative; Positive | None in this file. This variable was pulled for 2019 only, so it is absent from the eleven-year file rather than missing within it. | Whether the respondent met criteria for a past-year alcohol or illicit-drug use disorder (abuse or dependence). |
adol_weight |
numeric | 3.58 to 15,090 | None | Person-level analysis weight. Each respondent stands in for this many U.S. adolescents, correcting for NSDUH’s unequal selection probabilities and nonresponse. |
vestr |
numeric | 40,000 to 40,049 | None | Variance estimation stratum. Needed with verep and adol_weight to compute design-based standard errors. |
verep |
numeric | 1 to 2 | None | Variance estimation replicate, the primary sampling unit within a stratum. |
opioid_counties
DEA ARCOS opioid distribution data, aggregated to U.S. counties (2006–2014). The M04 lab’s wrangling testbed.
Codebook
At a glance
| File | data/opioid_counties.Rds |
| Rows | 26,980 — one per county-year |
| Columns | 6 |
| Coverage | U.S. counties (50 states + DC), 2006–2014 |
| Load it with | opioid_counties <- read_rds(here("data", "opioid_counties.Rds")) |
What this file is
Each row is one county in one year — the number of prescription opioid pills shipped there that year, plus the county’s population. A county is recorded once per year, so most have up to nine rows (2006–2014); not every county appears in every year.
- Aggregated to county-year. The raw ARCOS data has one row per individual shipment; those are summed here.
- 50 states + DC only. Military (APO/FPO) codes and U.S. territories are dropped.
- Pills per capita is not stored.
number_pills / populationis the measure most people want — you compute it yourself, because the file keeps only the raw ingredients.
Source
ARCOS (Automation of Reports and Consolidated Orders System) — the U.S. Drug Enforcement Administration’s database recording every opioid pill shipment to U.S. pharmacies and dispensers. The records became public through The Washington Post’s reporting on the prescription-opioid epidemic and were released as an R package.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
fips |
character | 5-character zero-padded codes; 3,037 unique counties | None | Five-digit Federal Information Processing Standard code identifying the county. This is the key that joins the shipment data to any other county-level file. |
county |
character | 1,782 unique names; not unique on its own, since many names recur across states | None | County name as recorded in the ARCOS release. |
state |
character | 51 values: the 50 states plus the District of Columbia | None | Two-letter postal abbreviation for the state or jurisdiction. |
year |
integer | 2006 to 2014 | None | Calendar year the shipments were recorded. |
number_pills |
integer | 6 to 210,636,747 pills | None | Total oxycodone and hydrocodone pills shipped to retail buyers in that county that year. This counts deliveries to pharmacies and practitioners, not pills consumed by residents. Counted in dosage units (individual pills). |
population |
integer | 489 to 9,974,203 residents | None | County population in that year, used as the denominator for shipment rates. |
appalachia
The Appalachian Regional Commission’s county list with FY 2023 economic-status tiers. A lookup table, joined onto opioid_counties by fips in the M04 lab.
Codebook
At a glance
| File | data/appalachia.Rds |
| Rows | 423 — one per Appalachian county |
| Columns | 2 |
| Coverage | The federally designated Appalachian Region: 423 counties across 13 states, fiscal year 2023 |
| Load it with | appalachia <- read_rds(here("data", "appalachia.Rds")) |
What this file is
Each row is one county the Appalachian Regional Commission designates as part of the Appalachian Region, with the economic-status tier ARC assigned it for fiscal year 2023.
- This is a lookup table, not a dataset to analyze on its own. It exists to be joined onto county-level data — in the M04 lab, onto opioid_counties by
fips. - Absence is information. The file contains only Appalachian counties, so a county with no matching row is not in the region.
fipsis 5-character text, zero-padded. Excel stores it as a number, which drops the leading zero for states like Alabama; without the padding the join silently fails for every county in those states.
Source
The Appalachian Regional Commission (ARC), a federal–state economic development partnership covering the Appalachian Region. ARC classifies every county in the region into one of five economic-status tiers each fiscal year, using three-year averages of the unemployment rate, per-capita market income, and the poverty rate.
- Region and status map: https://www.arc.gov/map/county-economic-status-in-appalachia-fy-2023/
- Data tables (
.xls): https://www.arc.gov/wp-content/uploads/2022/06/CountyEconomicStatusandDistressAreasFY2023DataTables.xls
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
fips |
character | 5-character zero-padded codes; 423 unique counties | None | Five-digit FIPS code identifying an Appalachian Regional Commission county. This is the key that joins to any other county-level file. It matches the column of the same name in opioid_counties. |
county_economic_status |
factor | Attainment; Competitive; Transitional; At-Risk; Distressed | None | ARC’s economic-status tier for the county, from most prosperous to most distressed. ARC assigns tiers using three-year averages of unemployment, per-capita market income, and poverty. |
Counts by tier: Attainment 4, Competitive 10, Transitional 218, At-Risk 109, Distressed 82.
Part 2 · Statistical Inference
fake_news
A 150-article corpus flagged real or fake by professional fact-checkers — drawn from the FakeNewsNet repository (Shu et al., 2018) and distributed via the bayesrules R package — with linguistic features for each. Anchors the M06 probability examples and returns for the chi-square worked example in the M09 lecture.
Codebook
At a glance
| File | data/fake_news.Rds |
| Rows | 150 — one per news article |
| Columns | 6 |
| Coverage | News articles posted to Facebook in September 2016, in the run-up to the U.S. presidential election |
| Load it with | fake_news <- read_rds(here("data", "fake_news.Rds")) |
What this file is
Each row is one news article — its headline, whether fact-checkers judged it genuine or fabricated, and three lightweight text features. Every article appears exactly once.
Source
The FakeNewsNet repository, distributed as the fake_news dataset in the bayesrules R package (v0.0.2). FakeNewsNet pairs news articles with veracity ratings from professional fact-checkers. The bayesrules curators drew a 150-article sample and added the text features used here.
- FakeNewsNet paper: https://arxiv.org/abs/1809.01286
- R package: https://github.com/bayes-rules/bayesrules
Cited by the package as: Shu, K., Mahudeswaran, D., Wang, S., Lee, D., & Liu, H. (2018). FakeNewsNet: A Data Repository with News Content, Social Context and Dynamic Information for Studying Fake News on Social Media.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
article_id |
integer | 1 to 150 | None | Identifier for one news article. One row per article. |
title |
character | 149 unique headlines across 150 articles | None | The article’s headline as published. Two articles share a headline, so this is not a unique key. |
type |
factor | Real; Fake | None | Whether the article was classified as real or fabricated news. The levels are capitalised exactly as Real and Fake, so a filter written against “real” or “fake” silently returns nothing. |
exclamation |
factor | No; Yes | None | Whether the headline contains an exclamation mark. |
caps_pct |
numeric | 0 to 43.75 percent | None | Percentage of words in the headline written in all capitals. |
negative |
numeric | 0 to 8.47 | None | Emotional negativity score for the headline, from a sentiment lexicon. Higher means more negative language. |
college_mobility
Chetty et al.’s college-by-college earnings-mobility dataset — median student earnings + intergenerational income mobility for ~2,000 U.S. colleges. Carries the M07 confidence-interval work and the M08 NHST-logic worked examples.
Codebook
At a glance
| File | data/college_mobility.Rds |
| Rows | 2,199 — one per U.S. college |
| Columns | 15 |
| Coverage | U.S. institutions in 50 states + DC; children born 1980–82, earnings measured in 2014 |
| Load it with | college_mobility <- read_rds(here("data", "college_mobility.Rds")) |
What this file is
Each row is one U.S. college — estimates describing the families its students came from and what those students later earned. Every college appears exactly once (super_opeid is unique across all 2,199 rows).
Source
Chetty, R., Friedman, J. N., Saez, E., Turner, N., & Yagan, D. (2017). Mobility Report Cards: The Role of Colleges in Intergenerational Mobility. Opportunity Insights. The file reproduces the authors’ institution-level table “Preferred Estimates of Access and Mobility Rates by College.” Estimates are built from de-identified federal income tax records linked to college attendance.
- Paper and data: https://opportunityinsights.org/paper/mobilityreportcards/
- Opportunity Insights data library: https://opportunityinsights.org/data/
Cohorts and income definitions (as defined by the authors):
- Children are from the 1980, 1981, and 1982 birth cohorts, with 1983–84 used to fill incomplete college rows.
- Parent income is average annual household total income before taxes and transfers (Adjusted Gross Income), in 2015 dollars, averaged over the five years when the child was 15–19.
- Child income is individual labor earnings (wage plus self-employment) in 2014, when these cohorts were roughly 32–34 years old.
- Percentile ranks are computed within the child’s (or parent’s) birth cohort.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
super_opeid |
integer | 1 to 41,520 | None | Opportunity Insights’ institution identifier, based on the Department of Education’s OPEID. One row per institution. |
name |
character | 2,199 unique names | None | Institution name. |
state |
character | 51 values | None | Two-letter state or jurisdiction abbreviation. |
czname |
character | 475 commuting zones | None | Commuting zone the institution sits in – a labour-market region, broader than a county and narrower than a state. |
par_median |
numeric | $21,200 to $226,700 | None | Median household income of students’ parents, in dollars. |
par_q1 |
numeric | 1.12 to 60.98 percent | None | Percentage of students whose parents are in the bottom fifth of the national income distribution. A measure of access. |
par_top1pc |
numeric | 0 to 21.91 percent | None | Percentage of students whose parents are in the top 1 percent of the income distribution. |
k_median |
numeric | $10,300 to $123,600 | None | Median individual earnings, in 2014 US dollars, among the college’s former students. Each row is a college, so this is a within-college median of individual earnings – averaging it across colleges gives a mean of medians, not a mean of individual earnings. Students are assigned to the institution they attended most in the four calendar years in which they turned 19-22, whether or not they graduated; the 1980-82 birth cohorts were 32-34 when earnings were measured. Opportunity Insights rounds the figure to the nearest $100 and publishes disclosure-safe estimates rather than exact values. |
kq5_cond_parq1 |
numeric | 0 to 91.93 percent | None | Among students from bottom-fifth families, the percentage who reached the top fifth of the earnings distribution. A success rate, conditional on having been admitted. |
ktop1pc_cond_parq1 |
numeric | 0 to 28.83 percent | None | Among students from bottom-fifth families, the percentage who reached the top 1 percent. |
mr_kq5_pq1 |
numeric | 0 to 16.36 percent | None | Mobility rate: the percentage of all students who both came from the bottom fifth and reached the top fifth. This is access multiplied by success, which is why it is far smaller than kq5_cond_parq1. |
mr_ktop1_pq1 |
numeric | 0 to 1.25 percent | None | Upper-tail mobility rate: percentage of all students who came from the bottom fifth and reached the top 1 percent. |
trend_parq1 |
numeric | -32.16 to 31.79 percentage points | None | Change in the percentage of students from bottom-fifth families between the 1980 and 1991 birth cohorts. Negative means the institution became less accessible. |
trend_bottom40 |
numeric | -86.14 to 54.42 percentage points | None | Change in the percentage of students from the bottom two-fifths between the same cohorts. |
count |
integer | 50 to 26,990 students | None | Average number of students per cohort, used as the denominator behind the percentages. |
blorg_exp1
Hofman, Goldstein & Hullman (2020) Experiment 1 — the boulder-sliding visualization study, four-cell factorial. Used as the one-sample-t worked example in M09 and as the practice dataset throughout the M09 pre-study.
Codebook
At a glance
| File | data/blorg_exp1.Rds |
| Rows | 1,743 — one per participant |
| Columns | 6 |
| Coverage | U.S.-based Amazon Mechanical Turk workers; Experiment 1 of Hofman, Goldstein, & Hullman (2020) |
| Load it with | blorg_exp1 <- read_rds(here("data", "blorg_exp1.Rds")) |
What this file is
Each row is one participant who passed the study’s attention check: the condition they were randomly assigned to, the single price they said they would pay to rent the “special boulder”, and their estimated probability that the special boulder would win.
The scenario. Participants imagined themselves as athletes in a boulder-sliding game against an equally skilled opponent named Blorg. The goal was to slide a boulder farther than Blorg’s, with an all-or-nothing 250 Ice Dollar prize for whoever slid farthest. Participants could rent a “special boulder” for one use, which they were told was expected — but not guaranteed — to increase their sliding distance. They saw a visualization comparing the special and standard boulders (either a CI graph or a PI graph) with an accompanying caption (either a caption that explained only the graph they saw, or both CIs and PIs), then reported how much they would pay to rent the special boulder, as well as how likely they thought the special boulder was to win.
- This is the paper’s analysis sample. The authors recruited 2,400 workers, removed 49 who had taken an earlier pilot, then dropped everyone who failed the attention check. No exclusions are left for you to apply.
- Two outcomes are here.
wtp_finalis the outcome used for the M09 worked example. The paper preregistered and analyzes both willingness to pay and probability of superiority, so neither is really the single headline measure.superiorityis that second outcome, included here so you can explore it yourself. condition.fcarries an explicit level order (1 → 4, as in the table below); the two dummies are derived from it.
Source
Hofman, J. M., Goldstein, D. G., & Hullman, J. (2020). How visualizing inferential uncertainty can mislead readers about treatment effects in scientific results. In Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems (pp. 1–12). ACM.
- Paper: https://doi.org/10.1145/3313831.3376454
- Pre-registration, data, and analysis code: https://osf.io/rcfy5/
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
worker_id |
character | 1,743 unique values | None | Anonymized Amazon Mechanical Turk worker identifier. The MTurk worker ID was hashed, so it identifies a participant without revealing the account. |
condition.f |
factor | 1: CI with viz stats only; 2: CI with extra info; 3: PI with viz stats only; 4: PI with extra info | None | Four-level experimental condition crossing visualization format and caption text |
interval_CI |
numeric | 0 = PI; 1 = CI | None | Visualization format shown to the participant |
text_extra |
numeric | 0 = matching text; 1 = extra information | None | Whether the caption supplied information beyond the visualization |
wtp_final |
numeric | Observed range: 0–249 Ice Dollars; instrument slider: 0–250 | None | Willingness to pay to rent the special boulder, in Ice Dollars |
superiority |
numeric | 0 to 1 | None | Participant’s estimate of the probability that the special boulder out-slides the standard one. Collected on a 0–100 scale and rescaled to a 0–1 proportion. Not used in the M09 lab — included so you can explore it yourself. |
interval_CI and text_extra decompose condition.f exactly — they are two views of the same randomization, not extra information.
blorg_exp2
Hofman et al. (2020) Experiment 2 — the same study’s larger follow-on, with four visualization formats (CI, CI rescaled, PI, HOPS) crossed with two effect sizes. Anchors the M08 null-simulation lab and Tests 2–4 in the M09 module.
Codebook
At a glance
| File | data/blorg_exp2.Rds |
| Rows | 1,830 — one per participant |
| Columns | 4 |
| Coverage | U.S.-based Amazon Mechanical Turk workers; Experiment 2 of Hofman, Goldstein, & Hullman (2020) |
| Load it with | blorg_exp2 <- read_rds(here("data", "blorg_exp2.Rds")) |
What this file is
Each row is one participant who passed the study’s attention check: the visualization and effect size they were randomly assigned, and their two judgments — what they would pay for the special boulder, and how likely they thought it was to win.
The scenario. Participants imagined themselves as athletes in a boulder-sliding game against an equally skilled opponent named Blorg. The goal was to slide a boulder farther than Blorg’s, with an all-or-nothing 250 Ice Dollar prize for whoever slid farthest. Participants could rent a “special boulder” for one use, which they were told was expected — but not guaranteed — to increase their sliding distance. They saw a visualization comparing the special and standard boulders, then reported how much they would pay to rent the special boulder. The design is 2 × 4 between subjects: two genuinely different underlying effects (small, d ≈ 0.25, a 4-metre gap; large, d ≈ 1.0, a 16-metre gap) crossed with four ways of displaying them.
- This is the paper’s analysis sample — 1,830 participants after the authors’ attention-check exclusions. Nothing further to apply.
- Two outcomes are here. The paper preregistered and analyzes both:
wtp(willingness to pay) andsuperiority(estimated probability the special boulder wins). - Factor levels are ordered deliberately —
graph_typeasCI,CI rescaled,PI,HOPS;effect_sizeasSmall,Large.
Source
Hofman, J. M., Goldstein, D. G., & Hullman, J. (2020). How visualizing inferential uncertainty can mislead readers about treatment effects in scientific results. In Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems (pp. 1–12). ACM.
- Paper: https://doi.org/10.1145/3313831.3376454
- Pre-registration, data, and analysis code: https://osf.io/rcfy5/
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
graph_type |
factor | CI; CI rescaled; PI; HOPS | None | Which of four uncertainty displays the participant saw. Within each effect-size condition the four displays represent the same underlying data in different ways; across conditions the underlying effect itself differs. |
effect_size |
factor | Small; Large | None | Which underlying effect size the participant’s scenario used. Small is a 4-metre gap between boulders, Large a 16-metre gap. |
wtp |
numeric | 0 to 249 Ice Dollars (slider ran 0 to 250) | None | Willingness to pay to rent the special boulder, in Ice Dollars, entered on a slider. |
superiority |
numeric | 0.01 to 1.00 | None | Participant’s estimate of the probability that the special boulder out-slides the standard one. Collected on a 0-100 scale and rescaled to a 0-1 proportion. |
illusion_medical
Zhang et al. (2023) Experiment 1 — clinicians’ probability-of-superiority estimates by error-bar type. Group A’s dataset in the M09 lab.
Codebook
At a glance
| File | data/illusion_medical.Rds |
| Rows | 163 — one per completed session |
| Columns | 5 |
| Coverage | Medical providers with prescribing privileges at a U.S. regional healthcare system; Experiment 1 of Zhang et al. (2023) |
| Load it with | illusion_medical <- read_rds(here("data", "illusion_medical.Rds")) |
What this file is
Each row is one completed session by one clinician: the chart format they saw first, the medication scenario they were assigned, and the single probability estimate they gave after that first chart. participant_id is unique across all 163 rows.
- The raw release is one row per participant-variable-value triple; it has been reshaped so each clinician is a single row.
- This matches the paper’s primary analysis sample. Of 221 completed sessions, the authors excluded 58 repeat completions caused by a browser incompatibility, leaving these 163 participants. Zhang et al. note that this exclusion was not part of the original preregistered plan — it was the exception to it.
psup_estimatecomes from whichever chart the participant saw first — the SD estimate for those shown SDs first, the SE estimate for those shown SEs first. That is the outcome the paper analyzes and the one you will test.
Source
Zhang, S., Heck, P. R., Meyer, M. N., Chabris, C. F., Goldstein, D. G., & Hofman, J. M. (2023). An illusion of predictability in scientific results: Even experts confuse inferential uncertainty and outcome variability. Proceedings of the National Academy of Sciences, 120(33), e2302491120.
- Paper: https://doi.org/10.1073/pnas.2302491120
- Data and analysis code: https://github.com/jhofman/illusion-of-predictability (raw provider data at
raw-data/providers.tsv)
This is the paper’s Experiment 1: Medical Providers. It extends the boulder-sliding research thread (see blorg_exp1.Rds and blorg_exp2.Rds) from crowdworkers judging a fictional game to working clinicians judging hypothetical clinical-trial results — same theoretical question, expert audience.
Who participated. Medical providers with prescribing privileges employed at a regional healthcare system. Participation was voluntary with no direct payment; the researchers donated Thanksgiving meals to a local food bank for each completion.
What participants saw. Each clinician was assigned one hypothetical pharmaceutical trial — either a blood-pressure medication or a COVID-19 medication — and saw it charted twice, once each way:
- SE error bars (mean ± standard error) — convey how precisely the mean was estimated, but hide how much individual patients differ.
- SD error bars (mean ± standard deviation) — convey the spread of outcomes across patients.
Which format came first was randomized; the second chart was identical except for the error bars. After each chart they answered: what is the probability that a randomly selected patient on the new drug will have a better outcome than a randomly selected patient on the standard drug? This probability of superiority (PSup) is the dependent measure.
The design. The SE/SD contrast is within-subject, but this file keeps only each participant’s first estimate — the response given before they had seen the alternative display. That preserves the randomised between-subjects comparison:
| Factor | Levels |
|---|---|
First visualization seen (condition) |
Saw SEs first vs Saw SDs first (between subjects) |
Medication scenario (scenario) |
Blood pressure scenario vs COVID-19 scenario (between subjects — one per participant) |
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
participant_id |
character | one value per participant, all unique | None | Anonymized identifier for one medical provider. One row per provider. |
condition |
factor | Saw SEs first; Saw SDs first | None | Which figure the provider saw FIRST. Every provider eventually saw both figures, so this records presentation order rather than an exclusive assignment – which is why the lab’s between-groups analysis uses only each provider’s first response. |
psup_estimate |
numeric | 50 to 100 (a floor of 50 is built into the question: below 50 would mean the new treatment is worse) | None | The participant’s estimate of the probability, as a percentage, that a patient on the new treatment does better than one on the standard treatment. |
scenario |
factor | Blood pressure scenario; COVID-19 scenario | None | Which medication context the provider saw. Randomized between providers; each provider saw only one medication context. |
study |
factor | medical; datasci; faculty | None | Which of the three audience studies the row comes from. Constant within a file; present so the three can be stacked. |
illusion_medical_paired
The same 163 clinicians as illusion_medical, but keeping both superiority estimates each one gave — the SE-figure answer and the SD-figure answer. Supports the paired t-test and a direct test of the order effect. Used by the M09 bonus activity.
Codebook
At a glance
| File | data/illusion_medical_paired.Rds |
| Rows | 163 — one per clinician |
| Columns | 6 |
| Coverage | Same clinicians as illusion_medical.Rds; Experiment 1 of Zhang et al. (2023) |
| Load it with | illusion_medical_paired <- read_rds(here("data", "illusion_medical_paired.Rds")) |
What this file is
Each row is one clinician, carrying both superiority estimates they gave — the one after the SE figure and the one after the SD figure. participant_id is unique across all 163 rows.
- These are the same 163 clinicians as illusion_medical — identical exclusions, identical parsing — restructured for a paired analysis. If your group uses both files, the participants match one for one.
Same people, same session, different slice — and the difference matters:
illusion_medical.Rds |
illusion_medical_paired.Rds |
|
|---|---|---|
| Shape | one estimate per clinician | both estimates per clinician (wide) |
| Which estimate | only the first one given | both, labelled by figure type |
| Supports | between-subjects Welch’s t | paired t, and a test of the order effect |
| Used by | the M09 lab | the M09 bonus activity |
The main lab file keeps only each clinician’s first estimate, which preserves the randomised between-subjects comparison — the response given before that participant had seen the alternative display.
Source
Zhang, S., Heck, P. R., Meyer, M. N., Chabris, C. F., Goldstein, D. G., & Hofman, J. M. (2023). An illusion of predictability in scientific results: Even experts confuse inferential uncertainty and outcome variability. Proceedings of the National Academy of Sciences, 120(33), e2302491120.
- Paper: https://doi.org/10.1073/pnas.2302491120
- Data and analysis code: https://github.com/jhofman/illusion-of-predictability (raw provider data at
raw-data/providers.tsv)
The design that makes this file possible. Every clinician saw their assigned trial charted twice — once with SE error bars, once with SD error bars — and gave a probability-of-superiority estimate after each. Which format came first was randomized, and the second scenario was, in the paper’s words, “identical to the first except for the accompanying figure.” So the SE-vs-SD contrast is available within each clinician, not only between clinicians.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
participant_id |
character | 163 unique providers | None | Anonymized identifier for one medical provider. One row per provider, holding both of that provider’s estimates. |
scenario |
factor | Blood pressure scenario; COVID-19 scenario | None | Which clinical scenario the provider was shown. Randomized between providers. |
first_condition |
factor | Saw SEs first; Saw SDs first | None | Which figure the provider saw first. Order was randomized, and it matters: the size of the within-person difference depends on it. |
psup_se |
numeric | 50 to 100 | None | The provider’s superiority estimate for the standard-error figure. |
psup_sd |
numeric | 50 to 100 | None | The provider’s superiority estimate for the standard-deviation figure. |
study |
factor | medical; datasci; faculty | None | Which audience study the row comes from. Constant in this file. |
⚠️ psup_se and psup_sd are keyed to the figure, not to the order. For a clinician who saw SDs first, psup_sd is their first answer and psup_se their second. Use first_condition when order is what you care about.
illusion_datasci
Zhang et al. (2023) Experiment 2 — data scientists’ probability-of-superiority estimates by visualization. Group B’s dataset in the M09 lab.
Codebook
At a glance
| File | data/illusion_datasci.Rds |
| Rows | 175 — one per completed editorial task |
| Columns | 4 |
| Coverage | Professional data scientists at a large software company; Experiment 2 of Zhang et al. (2023) |
| Load it with | illusion_datasci <- read_rds(here("data", "illusion_datasci.Rds")) |
What this file is
Each row is one completed editorial task: the chart format the respondent saw, and the single probability-of-superiority estimate they gave for it. This is the unit the paper’s headline test analyzes.
- One row per person — 175 rows, 175 distinct
participant_idvalues, matching the 175 data scientists the paper reports as completing part 1, the editorial-judgment task. (The paper also reports a smaller part-2 sample; that is a different task and not this file.) conditionis already recoded to readable labels (SE Only,SE + Points), and every row has an estimate.- Four analytic columns are kept out of the source’s seventeen; editorial ratings, timing, and platform IDs are not here.
- This file contains all 175 participants who completed Part 1. The paper then reports excluding 2 of them under its preregistered background-experience screen (statistical training, comfort with RCTs, past statistical activities). Those background variables are in a separate file and are not included here, so that exclusion has not been reproduced. Our prep script independently checks that the 175-row file still reproduces the published Welch statistic, t(159.4) = 6.34, and aborts if it drifts — but 175 is not literally the paper’s post-exclusion n.
Source
Zhang, S., Heck, P. R., Meyer, M. N., Chabris, C. F., Goldstein, D. G., & Hofman, J. M. (2023). An illusion of predictability in scientific results: Even experts confuse inferential uncertainty and outcome variability. Proceedings of the National Academy of Sciences, 120(33), e2302491120.
- Paper: https://doi.org/10.1073/pnas.2302491120
- Data and analysis code: https://github.com/jhofman/illusion-of-predictability (tidy data at
tidy-data/datascientists-tidy-editorial.csv)
This is the paper’s Experiment 2: Data Scientists — the same question as Experiment 1, put to people whose daily work involves reading error-bar figures.
Who participated. Professional data scientists at a large software company. Participation was voluntary with no direct payment; the researchers donated a set of personal protective equipment to the United Nations COVID-19 relief effort for each participant.
What participants saw. The experiment had two parts. This file holds Part 1, the editorial-judgment task, which came first:
- Part 1 — the editorial task (this file). Participants reviewed a single hypothetical “paper A” as though refereeing it, and were shown its central result as either a chart with only standard-error bars (the publishing convention) or a chart with standard-error bars plus the individual data points overlaid. Among other judgments, they estimated the probability that a randomly selected treatment case would outperform a randomly selected control case.
- Part 2 — the “psup game” (not in this file). A calibration task in which participants estimated probability of superiority across a series of randomly generated figures with varying true effect sizes.
The manipulation asks whether showing individual outcomes alongside the inferential error bars pulls readers back toward the true effect.
The design.
| Factor | Levels |
|---|---|
Visualization (condition) |
SE Only vs SE + Points (between subjects) |
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
participant_id |
character | one value per participant, all unique | None | Anonymized identifier for one data scientist. One row per participant. |
condition |
factor | SE + Points; SE Only | None | Which display the participant was shown. This is the randomized factor. |
psup_estimate |
numeric | 50 to 100 (a floor of 50 is built into the question: below 50 would mean the new treatment is worse) | None | The participant’s estimated probability, as a percentage, that a randomly selected person in the violent-video-game condition would have a higher aggressiveness score than a randomly selected person in the nonviolent-video-game condition. |
study |
factor | medical; datasci; faculty | None | Which of the three audience studies the row comes from. Constant within a file; present so the three can be stacked. |
illusion_faculty
Zhang et al. (2023) Experiment 3 — academic faculty’s probability-of-superiority estimates by visualization. Group C’s dataset in the M09 lab.
Codebook
At a glance
| File | data/illusion_faculty.Rds |
| Rows | 368 — one per completed editorial task |
| Columns | 4 |
| Coverage | U.S. tenure-track faculty at PhD-granting institutions; Experiment 3 of Zhang et al. (2023) |
| Load it with | illusion_faculty <- read_rds(here("data", "illusion_faculty.Rds")) |
What this file is
Each row is one completed editorial task: the chart format the respondent saw, and the single probability-of-superiority estimate they gave for it. This is the unit the paper’s headline test analyzes.
- One row per person — 368 rows, 368 distinct
participant_idvalues, matching the 368 faculty the paper reports as completing part 1, the editorial-judgment task. (The paper also reports a smaller part-2 sample; that is a different task and not this file.) conditionis already recoded to readable labels (SE Only,SE + Points), and every row has an estimate.- Four analytic columns are kept out of the source’s seventeen.
- This file contains all 368 faculty who completed Part 1. Zhang et al. state that 63 participants were excluded on preregistered background criteria (tenure-track status, statistics coursework, analysis experience, peer-review experience). Note an inconsistency in the published paper itself: the degrees of freedom on its primary Welch test, t(363.9) = 4.52, are consistent with roughly the full 368-person sample, not with 368 − 63 = 305. This teaching file therefore retains all Part 1 completers, and our prep script verifies it reproduces that published statistic.
Source
Zhang, S., Heck, P. R., Meyer, M. N., Chabris, C. F., Goldstein, D. G., & Hofman, J. M. (2023). An illusion of predictability in scientific results: Even experts confuse inferential uncertainty and outcome variability. Proceedings of the National Academy of Sciences, 120(33), e2302491120.
- Paper: https://doi.org/10.1073/pnas.2302491120
- Data and analysis code: https://github.com/jhofman/illusion-of-predictability (tidy data at
tidy-data/faculty-tidy-editorial.csv)
This is the paper’s Experiment 3: Faculty — the same paradigm as Experiment 2, run on academics who produce original research.
Who participated. U.S. tenure-track faculty at PhD-granting institutions in psychology, sociology, physics, biology, business, and computer science. Participation was voluntary with no direct payment; the researchers donated personal protective equipment to the United Nations COVID-19 relief effort for each participant.
What participants saw. The same two-part structure as Experiment 2. This file holds Part 1, the editorial-judgment task, which came first:
- Part 1 — the editorial task (this file). Faculty reviewed a hypothetical “paper A” as though refereeing it, seeing its central result as either a chart with only standard-error bars or a chart with standard-error bars plus the individual data points overlaid, then estimated the probability that a randomly selected treatment case would outperform a randomly selected control case.
- Part 2 — the “psup game” (not in this file). A calibration task across a series of randomly generated figures with varying true effect sizes.
The design.
| Factor | Levels |
|---|---|
Visualization (condition) |
SE Only vs SE + Points (between subjects) |
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
participant_id |
character | one value per participant, all unique | None | Anonymized identifier for one tenure-track faculty member. One row per participant. |
condition |
factor | SE + Points; SE Only | None | Which display the participant was shown. This is the randomized factor. |
psup_estimate |
numeric | 50 to 100 (a floor of 50 is built into the question: below 50 would mean the new treatment is worse) | None | The participant’s estimated probability, as a percentage, that a randomly selected person in the violent-video-game condition would have a higher aggressiveness score than a randomly selected person in the nonviolent-video-game condition. |
study |
factor | medical; datasci; faculty | None | Which of the three audience studies the row comes from. Constant within a file; present so the three can be stacked. |
Part 3 · Model Building
reach_analysis
Ho et al. (2024) REACH Forgiveness intervention trial — multisite waitlist-controlled RCT, N = 4,598, with baseline and 2-week follow-up TRIM-18 subscales. The single dataset that anchors all three Part 3 modules (M10 simple linear regression → M11 multiple regression → M12 model assumptions and diagnostics).
Codebook
At a glance
| File | data/reach_analysis.Rds |
| Rows | 4,598 — one per participant |
| Columns | 53 |
| Coverage | Six sites in five countries (Colombia, Hong Kong, Indonesia, South Africa, Ukraine ×2); recruited 11 Feb 2020 – 30 Sep 2021 |
| Load it with | reach_analysis <- read_rds(here("data", "reach_analysis.Rds")) |
What this file is
Each row is one participant in the International REACH Forgiveness randomised controlled trial — study site, randomly assigned condition, demographics, and TRIM-18 responses at baseline (t1_*) and two-week follow-up (t2_*). The data are wide: one row per person, not one row per person-timepoint.
- The 4,598 rows are the paper’s analytic sample, not everyone who enrolled. The trial screened 7,837 and randomised 4,786; the authors then removed 55 participants at Ukraine site 2 (suspected fraudulent online participation), 51 under 18, and 82 who did not report an age: 4,786 − 55 − 51 − 82 = 4,598. That last exclusion is why
agehas no missing values. - What the TRIM-18 is. The Transgression-Related Interpersonal Motivations inventory: 18 items, each rated 1–5 (strongly disagree to strongly agree), asking how a person is motivated to act toward someone who hurt them. It has three subscales, and every item belongs to exactly one:
- Revenge — items 1–5 (“I’ll make him or her pay”)
- Avoidance — items 6–12 (“I’d keep as much distance between us as possible”)
- Benevolence — items 13–18 (“Despite what he/she did, I want us to have a positive relationship again”)
t1_trim1–t1_trim18at baseline andt2_trim1–t2_trim18at follow-up. The three subscale scores are pre-computed ast1_revenge,t1_avoidance,t1_benevolenceand theirt2_counterparts, so you can work with either the items or the scales. - Benevolence items are reverse-coded so higher = more benevolence. The TRIM-18 is conventionally scored so every item points at unforgiveness; items 13–18 are flipped back. You can confirm it in the file:
t1_benevolencecorrelates −0.42 witht1_revengeand −0.55 witht1_avoidance. - Subscale scores are the mean of available items, so a subscale is
NAonly when all its items are missing. At T2, 635 participants are missing at least one benevolence item, 633 are missing all six, and exactly those 633 areNAont2_benevolence.
Source
Ho, M. Y., Worthington, E. L., Cowden, R. G., Bechara, A. O., Chen, Z. J., Gunatirin, E. Y., Joynt, S., Khalanskyi, V. V., Korzhov, H., Kurniati, N. M. T., Rodriguez, N., Salnykova, A., Shtanko, L., Tymchenko, S., Voytenko, V. L., Zulkaida, A., Mathur, M. B., & VanderWeele, T. J. (2024). International REACH forgiveness intervention: a multisite randomised controlled trial. BMJ Public Health, 2(1), e000072. https://doi.org/10.1136/bmjph-2023-000072 · PDF
Trial registration: NCT04257773. Preregistration and materials: https://osf.io/f34jp/
The merged dataset this file is built from is at https://osf.io/5vhu6/files/f34jp — that is the link to use if you want the raw data rather than the study materials.
What participants did
Adults (18+) who reported an interpersonal transgression they had not yet forgiven were recruited from six community-based sites. The countries were selected because each had experienced civil conflict or unrest in the recent past. Within each site, participants were randomised to one of two arms:
- Immediate treatment — received the self-directed REACH forgiveness workbook right away. The workbook is a 2–3 hour condensation of a previously tested 7-hour workbook, built around the five-step REACH acronym (Recall the hurt, Empathise with the offender, give an Altruistic gift of forgiveness, Commit to the forgiveness experienced, Hold onto forgiveness).
- Delayed treatment (waitlist) — received the workbook after a two-week delay.
Participants were surveyed three times: before randomisation (T1), after the initial two-week period but before the delayed group received the workbook (T2), and two weeks after the delayed group received the workbook (T3). This file contains T1 and T2 only.
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
uid |
integer | 1 to 4,598 | None | Unique participant identifier. One row per participant. Anonymised: it carries no information about the participant. |
site |
factor | Colombia; Hong Kong; Indonesia; South Africa; Ukraine (Realis); Ukraine (UISA) | None | Which of six international study sites the participant was recruited at. Sites differ in language, culture, and in which demographic questions were asked – which is why some demographics are missing for entire sites. |
treat |
factor | Control; Treatment | None | Randomized condition: the REACH forgiveness workbook intervention, or waitlist control. Assignment was randomised within each site. |
treat_dummy |
numeric | 0 = Control; 1 = Treatment | None | Numeric 0/1 version of treat, for models that want a number rather than a factor. |
sex |
factor | Female; Male; Other | 2 NA (0.04%). Item nonresponse. | Participant’s self-reported sex. |
eth |
factor | Asian; Black African; Coloured; Indian; Other; White | 1,937 NA (42.1%). Structural, by site: the question was not asked in a comparable form in Colombia (all 1,177 participants) or Ukraine (UISA) (all 759), so those sites are missing entirely rather than at random. Treating this as ordinary missingness would silently drop two whole sites. | Participant’s self-reported ethnicity, using categories drawn from the South African context. |
educ |
factor | College graduate; High school graduate; Less than highschool | 7 NA (0.15%). Item nonresponse. | Highest level of education completed. |
income |
factor | 1 SD above average; 3 SD above average; Average; Less than average | 23 NA (0.5%). Item nonresponse. | Self-reported household income relative to the local average, rather than in currency – which is what makes it comparable across six countries. |
hasReligAffil |
factor | No; Yes | 23 NA (0.5%). Item nonresponse. | Whether the participant reports a religious affiliation. |
maritalStat |
factor | Divorced; In relationship; Married; Separated; Single; Widowed | 9 NA (0.2%). Item nonresponse. | Marital status. |
age |
numeric | 18 to 82 years | None | Age in years at baseline. |
t1_trim1 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I’ll make him or her pay. [revenge] |
t1_trim2 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I wish that something bad would happen to him/her. [revenge] |
t1_trim3 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I want him/her to get what he/she deserves. [revenge] |
t1_trim4 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I’m going to get even. [revenge] |
t1_trim5 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I want to see him/her hurt and miserable. [revenge] |
t1_trim6 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I’d keep as much distance between us as possible. [avoidance] |
t1_trim7 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I’d live as if he/she doesn’t exist, isn’t around. [avoidance] |
t1_trim8 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I wouldn’t trust him/her. [avoidance] |
t1_trim9 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I’d find it difficult to act warmly toward him/her. [avoidance] |
t1_trim10 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 2 NA (0.04%). Item nonresponse: a few participants skipped this baseline item. | TRIM-18 item at baseline. Item wording: I’d avoid him/her. [avoidance] |
t1_trim11 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 2 NA (0.04%). Item nonresponse: a few participants skipped this baseline item. | TRIM-18 item at baseline. Item wording: I’d cut off the relationship with him/her. [avoidance] |
t1_trim12 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I’d withdraw from him/her.[avoidance] |
t1_trim13 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: Even though his/her actions hurt me, I still have goodwill for him/her. [benevolence] |
t1_trim14 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 3 NA (0.07%). Item nonresponse: a few participants skipped this baseline item. | TRIM-18 item at baseline. Item wording: I want us to bury the hatchet and move forward with our relationship. [benevolence] |
t1_trim15 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 1 NA (0.02%). Item nonresponse: a few participants skipped this baseline item. | TRIM-18 item at baseline. Item wording: Despite what he/she did, I want us to have a positive relationship again. [benevolence] |
t1_trim16 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I have given up my hurt and resentment. [benevolence] |
t1_trim17 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 1 NA (0.02%). Item nonresponse: a few participants skipped this baseline item. | TRIM-18 item at baseline. Item wording: Although he/she hurt me, I put the hurt aside so we could resume our relationship. [benevolence] |
t1_trim18 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | None | TRIM-18 item at baseline. Item wording: I have released my anger so I could work on restoring our relationship to health. [benevolence] |
t2_trim1 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 634 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I’ll make him or her pay. [revenge] |
t2_trim2 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 634 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I wish that something bad would happen to him/her. [revenge] |
t2_trim3 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 635 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I want him/her to get what he/she deserves. [revenge] |
t2_trim4 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 636 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I’m going to get even. [revenge] |
t2_trim5 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 634 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I want to see him/her hurt and miserable. [revenge] |
t2_trim6 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 636 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I’d keep as much distance between us as possible. [avoidance] |
t2_trim7 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 635 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I’d live as if he/she doesn’t exist, isn’t around. [avoidance] |
t2_trim8 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 635 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I wouldn’t trust him/her. [avoidance] |
t2_trim9 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 634 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I’d find it difficult to act warmly toward him/her. [avoidance] |
t2_trim10 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 636 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I’d avoid him/her. [avoidance] |
t2_trim11 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 635 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I’d cut off the relationship with him/her. [avoidance] |
t2_trim12 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 633 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I’d withdraw from him/her.[avoidance] |
t2_trim13 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 633 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: Even though his/her actions hurt me, I still have goodwill for him/her. [benevolence] |
t2_trim14 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 635 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I want us to bury the hatchet and move forward with our relationship. [benevolence] |
t2_trim15 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 633 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: Despite what he/she did, I want us to have a positive relationship again. [benevolence] |
t2_trim16 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 634 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I have given up my hurt and resentment. [benevolence] |
t2_trim17 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 633 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: Although he/she hurt me, I put the hurt aside so we could resume our relationship. [benevolence] |
t2_trim18 |
numeric | 1 to 5 (1 = strongly disagree, 5 = strongly agree) | 633 NA (13.8%). Mostly attrition: 633 participants completed no follow-up items at all; the remainder skipped this individual item. | TRIM-18 item at follow-up. Item wording: I have released my anger so I could work on restoring our relationship to health. [benevolence] |
t1_revenge |
numeric | 1 to 5 | None | Revenge subscale of the TRIM-18 at baseline, the mean of t1_trim1; t1_trim2; t1_trim3; t1_trim4; t1_trim5. Computed as the mean of whichever items the person answered, so it is NA only when every item in the subscale is missing. |
t1_avoidance |
numeric | 1 to 5 | None | Avoidance subscale of the TRIM-18 at baseline, the mean of t1_trim6; t1_trim7; t1_trim8; t1_trim9; t1_trim10; t1_trim11; t1_trim12. Computed as the mean of whichever items the person answered, so it is NA only when every item in the subscale is missing. |
t1_benevolence |
numeric | 1 to 5 | None | Benevolence subscale of the TRIM-18 at baseline, the mean of t1_trim13; t1_trim14; t1_trim15; t1_trim16; t1_trim17; t1_trim18. Higher scores mean more benevolence, so the items are reverse-coded relative to revenge and avoidance. Computed as the mean of whichever items the person answered, so it is NA only when every item in the subscale is missing. |
t2_revenge |
numeric | 1 to 5 | 634 NA (13.8%). Attrition, as for the items it averages. | Revenge subscale of the TRIM-18 at follow-up, the mean of t2_trim1; t2_trim2; t2_trim3; t2_trim4; t2_trim5. Computed as the mean of whichever items the person answered, so it is NA only when every item in the subscale is missing. |
t2_avoidance |
numeric | 1 to 5 | 633 NA (13.8%). Attrition, as for the items it averages. | Avoidance subscale of the TRIM-18 at follow-up, the mean of t2_trim6; t2_trim7; t2_trim8; t2_trim9; t2_trim10; t2_trim11; t2_trim12. Computed as the mean of whichever items the person answered, so it is NA only when every item in the subscale is missing. |
t2_benevolence |
numeric | 1 to 5 | 633 NA (13.8%). Attrition, as for the items it averages. | Benevolence subscale of the TRIM-18 at follow-up, the mean of t2_trim13; t2_trim14; t2_trim15; t2_trim16; t2_trim17; t2_trim18. Higher scores mean more benevolence, so the items are reverse-coded relative to revenge and avoidance. Computed as the mean of whichever items the person answered, so it is NA only when every item in the subscale is missing. |
Identifiers and design
TRIM-18 items and subscales
The TRIM-18 (Transgression-Related Interpersonal Motivations Inventory) is eighteen 1–5 Likert items with three subscales: revenge (items 1–5), avoidance (items 6–12), and benevolence (items 13–18). All 18 items appear at each timepoint, plus the three subscale scores.
Direction matters, and it is not uniform across the three subscales:
The course modules use t1_benevolence and t2_benevolence (the mean of items 13–18 at each timepoint). Higher benevolence means more forgiveness; the intervention is designed to raise it.
Demographics
bread_peace
Hibbs’s (2000) Bread and Peace presidential-vote-share dataset — 17 U.S. presidential elections from 1952 through 2016, with the incumbent party’s two-party vote share, weighted-average per-capita real disposable income growth over the term, and cumulative U.S. military fatalities per million population over the term. The running scenario for all three Part 3 labs (M10 simple linear regression → M11 multiple regression → M12 model assumptions). The modules use REACH; the labs use bread_peace — same statistical territory, two distinct datasets, deeper engagement.
Codebook
At a glance
| File | data/bread_peace.Rds |
| Rows | 17 — one per presidential election |
| Columns | 8 |
| Coverage | U.S. presidential elections, 1952–2016 (every four years, no gaps) |
| Load it with | bread_peace <- read_rds(here("data", "bread_peace.Rds")) |
What this file is
Each row is one U.S. presidential election — the incumbent party’s share of the two-party popular vote, plus the two things Hibbs’s “Bread and Peace” model says explain it: income growth over the term, and U.S. military fatalities during it. Every election from 1952 through 2016 appears exactly once, with no missing values.
Source
Hibbs, D. A. (2000). Bread and Peace voting in U.S. presidential elections. Public Choice, 104(1), 149–180. https://doi.org/10.1023/A:1005292312412
Hibbs’s claim is that U.S. presidential elections are largely explained by two term-aggregated fundamentals — bread (growth in per-capita real disposable personal income over the term) and peace (cumulative U.S. military fatalities from hostile foreign deployments during the term) — leaving candidate charisma, campaign strategy, and scandal to the residual.
The specific numerical values packaged here are the version of the dataset prepared by Drew M. Thomas in “Bread-in-pandemic voting: forecasting the 2020 United States presidential election with the Bread and Peace model” (2020), archived at https://osf.io/p67347/. Thomas replicates Hibbs’s methodology on independently-pulled data from the BEA (per-capita real disposable personal income, FRED series A229RX0Q048SBEA), the U.S. Census Bureau (population), the DCAS public-use file (military fatalities before 2001), iCasualties (Afghanistan and Iraq fatalities), and Dave Leip’s Atlas (presidential vote totals).
Variables
| Variable | Type | Values | Missing | Description |
|---|---|---|---|---|
year |
integer | 1952 to 2016, every fourth year | None | U.S. presidential election year. One row per election. |
vote |
numeric | 44.55 to 61.79 percent | None | The incumbent party’s share of the two-party popular vote, as a percentage. This is the outcome the Bread and Peace model predicts. |
growth |
numeric | 0.169 to 4.39 percent | None | Weighted-average per-capita real disposable income growth over the incumbent’s term, annualized and expressed as a percentage. Hibbs weights recent quarters more heavily than early ones. |
fatalities |
numeric | 0 to 205.6 per million | None | Cumulative U.S. military fatalities per million population over the incumbent’s term. Hibbs’s measure of the political cost of war. |
wars |
character | 6 distinct entries, including none for peacetime terms | None | The major conflict or conflicts contributing to the fatalities figure, named for readability. |
inc_party_candidate |
character | 15 unique names across 17 elections | None | The incumbent party’s candidate. Not always the sitting president. |
other_party_candidate |
character | 17 unique names | None | The challenging party’s candidate. |
inc_party |
character | 2 values: dem and rep | None | Which party held the presidency going into the election. |