[R] Find position of asymptote

Katrina Bennett kebennett at alaska.edu
Thu Apr 19 10:41:42 CEST 2012


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).
mid.point <- optimize(f=fn.sslogis.deriv1, interval=c(1:153), a=a,
m=m, s=s)$minimum

Thanks for your assistance,

Katrina



More information about the R-help mailing list