diabetes: Synthetic Pima Indians Diabetes Data

diabetesR Documentation

Synthetic Pima Indians Diabetes Data

Description

A synthetic replacement for the Pima Indians Diabetes data: 768 observations on 9 variables, a binary target (Outcome) and medical predictors such as the number of pregnancies, plasma glucose, BMI, insulin level and age. Every value is synthetic; no row corresponds to a real person.

Format

A data frame with 768 observations on the following 9 variables.

Pregnancies

Number of times pregnant (0 is a valid value)

Glucose

Plasma glucose concentration at 2 hours in an oral glucose tolerance test

BloodPressure

Diastolic blood pressure (mm Hg)

SkinThickness

Triceps skin fold thickness (mm)

Insulin

2-Hour serum insulin (mu U/ml)

BMI

Body mass index (weight in kg/(height in m)^2)

DiabetesPedigreeFunction

Diabetes pedigree function

Age

Age in years

Outcome

Diabetes (yes or no)

Details

The original data were collected by the National Institute of Diabetes and Digestive and Kidney Diseases from female patients of Pima Indian heritage aged at least 21. The team that collected them has stated that the data should not have been distributed and has asked for redistribution to stop, while a large body of teaching material and package examples depends on them. This synthetic version exists so that such material keeps working without real patient records being circulated.

The schema follows PimaIndiansDiabetes2 from package mlbench: physically impossible values (a zero glucose level, blood pressure, skin fold thickness, insulin level or BMI) are coded as NA, whereas 0 pregnancies is a valid value. Column names, types and the levels of Outcome are those VIM has used since version 6, so existing code runs unchanged; only the values differ from the real data shipped before VIM 7.3.0.

Missing values in the original are not scattered at random: BloodPressure, SkinThickness and Insulin are frequently missing together, and the pattern is age-related. The pattern itself was synthesised as a variable and the missing values imposed from it, so that complete-case and imputation examples behave as they did before (placing missing values independently would produce the joint pattern about five times instead of the observed 19 to 24).

Results computed on these data resemble published analyses of the original without matching them: a logistic regression reaches an AUC of 0.868 against 0.862 on the original, and a model fitted only on the synthetic data reaches 0.854 on the real records. Individual correlations are less reliable – most come out slightly weaker than in the original, but the association between number of pregnancies and age is considerably stronger (0.74 against 0.54). Use the data for teaching, examples and method demonstrations; any result computed on them describes the synthesis, not the Pima population, and must not be read as evidence about diabetes.

Author(s)

Matthias Templ matthias.templ@fhnw.ch (synthetic version)

Source

Synthetic. Generated by Matthias Templ from PimaIndiansDiabetes2 (package mlbench) with the synvey package – sequential robust synthesis with a random-forest backend and the missingness pattern treated as a structural variable (synvey 0.1.0, R 4.5.2, seed 20260804):

SynthDiabetes <- synvey::robsynth(PimaIndiansDiabetes2,
                                  method      = "robust_rf",
                                  missingness = "structural",
                                  coarsen     = "age",
                                  target      = "sample",
                                  seed        = 20260804)$synth

This configuration was selected from a comparison of five synthesis packages under two designs for the missingness mechanism. Candidates reproducing any original record verbatim were excluded; the data set contains no such record. synvey is not on CRAN; it is available from https://github.com/matthias-da/synvey. For VIM the columns were renamed to the historical names (pregnant, glucose, pressure, triceps, insulin, mass, pedigree, age, diabetes became Pregnancies, Glucose, BloodPressure, SkinThickness, Insulin, BMI, DiabetesPedigreeFunction, Age, Outcome), counts are stored as integers and the Outcome levels neg/pos as no/yes. The original data are neither distributed with VIM nor needed to use this data set.

References

Smith, J.W., Everhart, J.E., Dickson, W.C., Knowler, W.C., & Johannes, R.S. (1988). Using the ADAP learning algorithm to forecast the onset of diabetes mellitus. In Proceedings of the Symposium on Computer Applications and Medical Care (pp. 261–265). IEEE Computer Society Press. https://pmc.ncbi.nlm.nih.gov/articles/PMC2245318/ (The study behind the original data; the original data are not redistributed here.)

Examples


data(diabetes)
summary(diabetes)

# missingness is structured rather than scattered
aggr(diabetes)


VIM documentation built on Sept. 2, 2026, 5:07 p.m.