Xbin<-read.table('bindata.dat') parity.gt.0<-Xbin[,2] parity.gt.2 <-Xbin[,3] age.gt.35 <-Xbin[,4] boy <-Xbin[,5] smoking <-Xbin[,6] n<-Xbin[,7] y<-Xbin[,8] ### n= number of children in each class ### y= number of pre term (PT) children in each class ### y_i ~ Bin(n_i,theta_i)