Aliases: birthwt
Keywords: datasets
### ** Examples bwt <- with(birthwt, { race <- factor(race, labels = c("white", "black", "other")) ptd <- factor(ptl > 0) ftv <- factor(ftv) levels(ftv)[-(1:2)] <- "2+" data.frame(low = factor(low), age, lwt, race, smoke = (smoke > 0), ptd, ht = (ht > 0), ui = (ui > 0), ftv) }) options(contrasts = c("contr.treatment", "contr.poly")) glm(low ~ ., binomial, bwt)
Call: glm(formula = low ~ ., family = binomial, data = bwt) Coefficients: (Intercept) age lwt raceblack raceother smokeTRUE 0.82302 -0.03723 -0.01565 1.19241 0.74068 0.75553 ptdTRUE htTRUE uiTRUE ftv1 ftv2+ 1.34376 1.91317 0.68020 -0.43638 0.17901 Degrees of Freedom: 188 Total (i.e. Null); 178 Residual Null Deviance: 234.7 Residual Deviance: 195.5 AIC: 217.5