I have completed a binomial GLM in R (details attached (finalModel.docx)) and I am trying to create a graph of observed and fitted values using the following commands:
> MyData<-data.frame(time=seq(from=0,to=1323,by=1)) > Pred<-predict(M2,newdata=MyData,type="response") > plot(x=turtle$time,y=turtle$success) > lines(MyData$time,Pred) However, I get the following error when using the <predict> command: > Pred<-predict(M2,newdata=MyData,type="response") Error in eval(expr, envir, enclos) : object 'size' not found I'm not sure why I am getting this error. I have used the same commands on a similar dataset before and was able to produce the attached plot (plot.docx). I've also attached the data I've been using (final.csv). Any pointers would be greatly appreciated!! Thank you for your time, Linda Baker Student - James Cook University http://r.789695.n4.nabble.com/file/n4635573/finalModel.docx finalModel.docx http://r.789695.n4.nabble.com/file/n4635573/plot.docx plot.docx http://r.789695.n4.nabble.com/file/n4635573/final.csv final.csv -- View this message in context: http://r.789695.n4.nabble.com/Graph-showing-fitted-values-obtained-by-binomial-GLM-tp4635573.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.