Skip to content
Prev 139458 / 398503 Next

Fit a logit curve to the data

On 13-Mar-08 22:56:16, Alfonso P?rez wrote:
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) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 14-Mar-08                                       Time: 00:40:59
------------------------------ XFMail ------------------------------