Learn R Programming

gamair (version 1.0-2)

wesdr: Diabetic retinopathy in Wisconsin

Description

The data, originally from the gss package, record whether or not diabetic patients developed retinopathy along with three possible predictors.

Usage

data(wesdr)

Arguments

Format

The wesdr data frame has the following columns

ret

binary variable: 1 = retinopathy, 0 = not.

bmi

Body mass index (weight in kg divided by square of height in metres)

gly

Glycosylated hemoglobin - the percentage of hemoglobin bound to glucuse in the blood. This reflects long term average blood glucose levels: less than 6% is typical of non-diabetics, but is only rarely acheived by diabetic patients.

dur

Duration of disease in years.

Details

Retinopathy is a common problem in diabetic patients and the interst is in predicting the risk using the measured predictors.

Examples

Run this code
# NOT RUN {
require(gamair);require(mgcv)
data(wesdr)
## Smooth ANOVA model...
k <- 5
b <- gam(ret~s(dur,k=k)+s(gly,k=k)+s(bmi,k=k)+ti(dur,gly,k=k)+
         ti(dur,bmi,k=k)+ti(gly,bmi,k=k),select=TRUE,
         data=wesdr,family=binomial(),method="ML")
ow <- options(warn=-1) ## avoid complaint about zlim 
plot(b,pages=1,scheme=1,zlim=c(-3,3))
options(ow)
# }

Run the code above in your browser using DataLab