[R] Graph showing fitted values obtained by binomial GLM

linda.kate linda.kate at gmail.com
Fri Jul 6 05:55:36 CEST 2012

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.

More information about the R-help mailing list