| diabetes | R Documentation |
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.
A data frame with 768 observations on the following 9 variables.
Number of times pregnant (0 is a valid value)
Plasma glucose concentration at 2 hours in an oral glucose tolerance test
Diastolic blood pressure (mm Hg)
Triceps skin fold thickness (mm)
2-Hour serum insulin (mu U/ml)
Body mass index (weight in kg/(height in m)^2)
Diabetes pedigree function
Age in years
Diabetes (yes or no)
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.
Matthias Templ matthias.templ@fhnw.ch (synthetic version)
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.
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.)
data(diabetes)
summary(diabetes)
# missingness is structured rather than scattered
aggr(diabetes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.