Re: [R] Problem with predict and lines in plotting binomial glm

2011-09-21 Thread Eik Vettorazzi
Hi Anina, predict.glm returns predicted probabilities, when used with type="response", so you have to either scale the probs to the number of trials for any x or you plot probs from start: par(mfcol=c(1,2)) plot(x, successes) lines(x, (successes+failures)*predict(glm1, type= "response"), lwd=2) pl

[R] Problem with predict and lines in plotting binomial glm

2011-09-21 Thread Heystek, A, Me <15418...@sun.ac.za>
Problems with predict and lines in plotting binomial glm Dear R-helpers I have found quite a lot of tips on how to work with glm through this mailing list, but still have a problem that I can't solve. I have got a data set of which the x-variable is count data and the y-variable is proportional