library(Epi) data(births) births<-transform(births, hyp=factor(hyp,labels=c("normal","hyper")), sex=factor(sex,labels=c("M","F")), gest4=cut(gestwks,breaks=c(20,35,37,39,45),right=FALSE)) m<-lm(bweight~gestwks,data=births) coef(m) summary(m) resid(m) gm<-glm(bweight~gestwks,family="gaussian",data=births) m2<-lm(bweight~hyp,data=births) summary(m2) m3<-lm(bweight~-1+hyp,data=births) summary(m3) h<-glm(lowbw~hyp,family="binomial",data=births) summary(h) ci.lin(gm, Exp=T )[,5:7] h2<-glm(lowbw~hyp+sex,family="binomial",data=births) summary(h2) ci.lin(gm, Exp=T )[,5:7]