Michael Dewey
2016-Aug-04 12:32 UTC
[R] Odds ratios in logistic regression models with interaction
Laviolette, Michael <Michael.Laviolette at dhhs.nh.gov> wrote :> I'm trying to reproduce some results from Hosmer & Lemeshow's "Applied Logistic > Regression" second edition, pp. 74-79. The objective is to estimate odds ratios > for low weight births with interaction between mother's age and weight > (dichotomized at 110 lb.). I can get the point estimates, but I can't find an > interval option. Can anyone provide guidance on computing the confidence > intervals?There is always confint. Not sure if you need MASS first from memory, not got a copy of R running to hand. Thanks. -Mike L.> > library(dplyr) > data(birthwt, package = "MASS") > birthwt % > mutate(low = factor(low, 0:1, c("Not low", "Low")), > lwd = cut(lwt, c(0, 110, Inf), right = FALSE, > labels = c("Less than 110", "At least 110")), > lwd = relevel(lwd, "At least 110")) > > # p. 77, Table 3.16, Model 3 > fit3.16