family <- "binomial"
eta <- seq(from=-3,to=3,length.out=100)
mu <- mean_function(eta=eta,family=family)
graphics::plot(x=eta,y=mu,type="l",main=family)
graphics::abline(v=0,lty=2)
h <- ifelse(family=="binomial",0.5,0)
graphics::abline(h=h,lty=2)
Run the code above in your browser using DataLab