### Exercise logistic regression menarche in Warsaw (data originally frm Milicer, H. and Szczotka, F. (1966) Age at Menarche in Warsaw girls in 1965. Human Biology 38, 199–203). library(MASS) data(menarche) with(menarche,plot(Age, Menarche/Total,pch=19,col="blue")) Mprob <- glm(cbind(Menarche,Total - Menarche) ~ Age,binomial(link = probit),data = menarche) xv<-seq(min(menarche$Age),max(menarche$Age),length.out=500) yv<-predict(Mprob,list(Age =xv),type="response") lines(xv,yv,lwd=2,col="red") dose.p(Mprob,cf=c(1,2),p=c(0.1,0.5,0.9))