CSSS 508: Intro to R



CSSS 508: Intro to R

3/10/06

Homework 9 Solutions

Load the MASS library into R. We’re going to look at Pima.te, a data set looking at diabetes in Pima Indian women. The women are at least 21 years old, of Pima Indian heritage, and living near Phoenix, Arizona. They were tested for diabetes according to World Health Organization criteria.

library(MASS)

help(Pima.te)

attach(Pima.te)

The type variable is an indicator (Yes/No) for diabetic status.

table(type)

There are 109 diabetics and 223 non-diabetics.

The other variables are measurements taken by the US National Institute of Diabetes and Digestive and Kidney Diseases: npreg, glu, bp, skin, bmi, ped, and age.

1) Use graphs to illustrate differences between the diabetic group and the non-diabetic group. Discuss what you see.

We’re just comparing the measurements for two groups; boxplots and histograms are easy, simple methods to show the differences in group distributions.

When we use histograms, we keep the same overall x-limits and y-limits so we can compare the groups visually.

gr.label ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download