###################################################################### # R function for fitting a binomial regression with a log link, # using Fisher scoring. ###################################################################### log.binomial<-function(x,y,n,maxits=20,eps=1e-10,beta.start){ if( missing(beta.start) ){ emp.log<-log((y+.5)/(n+1)) # add 1/2 success, 1/2 failure newbeta<-lsfit(x,emp.log,intercept=F)$coef} else{newbeta<-beta.start} iter<-0 converged<-F while( (!converged) & (iter