National Data System · Diabetes guide

The files, the models and their limits

A transparent look at the uploaded 2015 BRFSS-derived files and the exploratory analysis behind these pages.

Purpose: This is an exploratory, historical study of self-reported survey answers. It does not diagnose diabetes, forecast future disease, measure undiagnosed diabetes, or establish health outcomes for Black communities or ZIP codes.

Three related files

FileRecordsWhat it contains
Three-category file253,680213,703 no diabetes or pregnancy-only; 4,631 prediabetes; 35,346 diabetes.
Full binary file253,680218,334 coded 0; 35,346 coded 1. Its features match the three-category file row for row.
Balanced binary file70,69235,346 in each class; intentionally balanced for research. It is not a population prevalence sample.

Label correction: Matching the first two files row by row shows binary 1 corresponds to the three-category diabetes group. Binary 0 includes both the no-diabetes/pregnancy-only group and the prediabetes group. It would be incorrect to describe binary 1 as “prediabetes or diabetes” in these files.

Why comparison figures can differ: High blood pressure appears in 37.1% of the three-category no-diabetes/pregnancy-only group. It appears in 37.7% of binary class 0, which also includes the prediabetes group. These use different comparison groups; neither is a population estimate.

All balanced-file rows match values in the full binary file; the positive-class row-value counts match the full binary positive class. Because there are no person identifiers and repeated values occur, row matches alone do not prove individual identity.

How the research test worked

We used the full, unbalanced binary file once, split into 80% training and 20% testing with a stratified random split (seed 42). We fitted logistic regression after scaling the inputs. The five-factor version selected its five features on the training set using a univariate F-test, then was evaluated on the same held-out test set. Categorical codes were treated as numeric; other methods could give different results.

Exploratory modelTest ROC-AUCTest sensitivity at 0.5 cutoffTest specificity at 0.5 cutoff
All 21 factors0.81915.8%97.6%
Five selected factors0.80113.7%98.0%

ROC-AUC describes how well the model orders positive and negative records in this held-out sample; it is not the percentage of people accurately diagnosed. Sensitivity at this cutoff is the share of reported-diabetes records that the model flagged. Neither model is a validated screening tool.

The five selected fields were reported high blood pressure, high cholesterol, body-mass index, general health, and difficulty walking. These are associated survey fields, not proof of causal factors or the best questions for future risk. The test set includes 50,736 records; 6,836 have the same 21 input values as at least one training record. That does not establish duplicate individuals, but it limits independence of this split. No external, prospective, age-group, race-specific or geographic validation was done.

Why the limits matter

  • No race or place: The uploaded fields do not identify Black respondents, states, counties or ZIP codes.
  • No survey weights or design variables: Sample percentages cannot be generalized as U.S. rates. CDC says BRFSS population estimates require appropriate weights and design. CDC weighting guidance ↗
  • Diabetes type: The cleaned target does not distinguish type 1 from type 2 diabetes. These results cannot be interpreted as a type 2–only analysis.
  • Self-report and timing: The files reflect answers from 2015, not current clinical tests. People may change habits or experience changes in health after a diagnosis; the snapshot cannot establish what came first or explain why. Undiagnosed diabetes is not a separately observed outcome, and associations do not establish cause.
  • Undiagnosed diabetes: Excluding people who reported a diagnosis would not identify people with undiagnosed diabetes in these files. Studying that question needs an independent measure of diabetes status, such as an appropriate clinical test.
  • Related files: Do not train on one file and treat another as an independent test set; they share record values.

The 21 available factors

High blood pressure; high cholesterol; cholesterol check; BMI; smoking; stroke; heart disease or heart attack; physical activity; fruit; vegetables; heavy alcohol use; health coverage; cost-related inability to see a doctor; general health; mental-health days; physical-health days; difficulty walking; sex; age group; education; and income group. These are coded survey fields; definitions and missing-value handling depend on the original cleaning process.

Reproduce the analysis

Download the script and run it with Python, pandas and scikit-learn using a folder containing the three uploaded ZIP files. It reads the files and writes a local aggregate JSON report. It does not publish patient predictions.

Download the analysis script ↓ · Download the aggregate results and source hashes ↓

Sources

← Back to the diabetes guide · All health topics