[R] Plot binomial regression line

From: Jörgen Svan <jorgen.svan_at_gmail.com>
Date: Thu, 26 May 2011 10:45:52 +0200


Dear all,

I am quite new with R and I have a problem with plotting a binomial regression line in a plot.

This is what I type in:
> model<-glm(Para~Size,binomial)
> par(mfrow=c(1,1))
> xv<-seq(3.2,4.5,0.01)
> yv<-predict(model,list(area=xv),type="response")
> plot(Size,Para)
> lines(xv,yv)

The error message that I get is:

> Error in xy.coords(x, y) : 'x' and 'y' lengths differ

My txt-file is attached. Could someone please help me to find out what I did wrong.

Thank you on beforehand,
Jörgen



R-help_at_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.
Received on Thu 26 May 2011 - 09:42:42 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 26 May 2011 - 10:20:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive