| birthwt {MASS} | R Documentation |
The birthwt data frame has 189 rows and 10 columns.
The data were collected at Baystate Medical Center, Springfield, Mass
during 1986.
birthwt
This data frame contains the following columns:
lowindicator of birth weight less than 2.5 kg.
agemother's age in years.
lwtmother's weight in pounds at last menstrual period.
racemother's race (1 = white, 2 = black,
3 = other).
smokesmoking status during pregnancy.
ptlnumber of previous premature labours.
hthistory of hypertension.
uipresence of uterine irritability.
ftvnumber of physician visits during the first trimester.
bwtbirth weight in grams.
Hosmer, D.W. and Lemeshow, S. (1989) Applied Logistic Regression. New York: Wiley
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
attach(birthwt)
race <- factor(race, labels = c("white", "black", "other"))
ptd <- factor(ptl > 0)
ftv <- factor(ftv)
levels(ftv)[-(1:2)] <- "2+"
bwt <- data.frame(low = factor(low), age, lwt, race,
smoke = (smoke > 0), ptd, ht = (ht > 0), ui = (ui > 0), ftv)
detach("birthwt")
options(contrasts = c("contr.treatment", "contr.poly"))
glm(low ~ ., binomial, bwt)