On 13-Mar-08 22:56:16, Alfonso Pérez wrote:
>     Hello, my name is Alfonso. My data are 0 and 1 values in
> the y axis and fish length in the x axis. I'm trying to get
> a graph where it could be fitted a logit curve to my data,
> how could I get it?

Have a look at

  ?glm

In particular (just going on your bare statement of your problem)
let 'y' denote your vector or 0/1 results:

  x <- fishlength
  y <- glm(y ~ fishlength, family=binomial)$fit
  plot(x,y)
  lines(x,y)

would be a start.

However, I'm intrigued by what your variable y (more likely to
be 1 as fishlength increases) might be. "Sexually mature"?

There might be a better model for it than the logistic curve.

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 094 0861
Date: 14-Mar-08                                       Time: 00:40:59
------------------------------ XFMail ------------------------------

______________________________________________
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.

Reply via email to