[R] Find position of asymptote
David Winsemius
dwinsemius at comcast.net
Thu Apr 19 14:34:44 CEST 2012
On Apr 19, 2012, at 4:41 AM, Katrina Bennett wrote:
> Hi all,
>
> I would like to find the x position of an two asymptotes.
>
> Here is a sample of what I would like to do:
>
> x <- seq(1, 153,, 153)
> a <- 85
> m <- 65
> s =-1.5
> fn <- function (x, a, m, s) { a * (exp((m - x)/s) * (1/s))/((1 +
> exp((m - x)/s)))^2 }
> plot.deriv1 <- fn(1:153, a, m, s)
>
> I can find the midpoint/minimum of this function easily. However, I
> can not find the start and end of the two asymptote position (along
> the x).
This is not a homework help-line.
> mid.point <- optimize(f=fn.sslogis.deriv1, interval=c(1:153), a=a,
> m=m, s=s)$minimum
>
> Thanks for your assistance,
>
> Katrina
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list