data(basketball)
## Not run:
# bb <- glm(cbind(Andy, 6-Andy) ~ sqrt(Distance),
# family = binomial, data = basketball)
# with(basketball, (plot(Distance, Andy/6, main = "Andy's Success Rate") ))
# lines(basketball$Distance, predict(bb, type = "response"))## End(Not run)
Run the code above in your browser using DataLab