Diabetes | R Documentation |
These data are courtesy of Dr John Schorling, Department of Medicine, University of Virginia School of Medicine.
The data contains information on 403 subjects from 1046 subjects who were interviewed in a study to understand the prevalence of obesity, diabetes, and other cardiovascular risk factors in central Virginia for African Americans. According to Dr John Hong, Diabetes Mellitus Type II (adult onset diabetes) is associated most strongly with obesity. The waist/hip ratio may be a predictor in diabetes and heart disease. DM II is also associated with hypertension - they may both be part of "Syndrome X". The 403 subjects were the ones who were actually screened for diabetes. Glycosylated hemoglobin > 7.0 is usually taken as a positive diagnosis of diabetes.
Diabetes
A data frame with 403 rows and 22 variables (See "Note"):
Subject id
Total cholesterol
Stabilized glucose
High density lipoprotein
Cholesterol/hdl ratio
Glycosylated hemoglobin
A factor with levels Buckingham
and Louisa
Age (years)
Gender, male
or female
Height (inches)
Weight (pounds)
A factor with levels small
,
medium
and large
First systolic blood pressure
First diastolic blood pressure
Second systolic blood pressure
Second diastolic blood pressure
Waist (inches)
Hip (inches)
Postprandial time when labs were drawn in minutes
Body mass index
An indicator whether glyhb
is greater than 7 or not
Waist to hip ratio
The last three variables (bmi
, dtest
, whr
)
were created. For bmi
, following formula was used:
bmi = 703 * (weight_lbs) / (height_inches)^2
staff.pubhealth.ku.dk/~tag/Teaching/share/data/Diabetes.html#sec-2
Willems, James P., J. Terry Saunders, Dawn E. Hunt, and John B. Schorling. "Prevalence of coronary heart disease risk factors among rural blacks: a community-based study." Southern medical journal 90, no. 8 (1997): 814-820.
Schorling, John B., Julienne Roach, Marjorie Siegel, Natalie Baturka, Dawn E. Hunt, Thomas M. Guterbock, and Herbert L. Stewart. "A trial of church-based smoking cessation interventions for rural African Americans." Preventive Medicine 26, no. 1 (1997): 92-101.
data("Diabetes")
plot(Diabetes$hdl~Diabetes$weight, pch = 16,
col =ifelse(Diabetes$gender=="male",1,2))
#------------------------------------------
## density plot
femaleBMI <- density(subset(Diabetes, gender == "female")$bmi, na.rm = TRUE)
maleBMI <- density(subset(Diabetes, gender == "male")$bmi, na.rm = TRUE)
## -------
plot(NULL, ylim = c(0,0.08), xlim = c(10,60),
xlab = "BMI", ylab = "Density", main = "")
grid(col = 1)
polygon(maleBMI, col = rgb(0,0,1,0.2), border = 4)
polygon(femaleBMI, col = rgb(1,0,0,0.2), border = 2)
abline(h = 0)
legend("topright", c("Male", "Female"), pch = 15,
col = c(rgb(0,0,1,0.2), rgb(1,0,0,0.2)), bty = "n")
#------------------------------------------
logistic.model <- glm(as.factor(dtest)~chol+age+bmi,
data = Diabetes,family = "binomial")
summary(logistic.model)
#------------------------------------------
class <- logistic.model$y
score <- logistic.model$fitted.values
rocit_object <- rocit(score = score, class = class)
summary(rocit_object)
plot(rocit_object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.