Why doesn't adjusting these parameters shift the asymptotes?

17 Views Asked by At

I used R to plot this function:

foo <- function(theta, a, b, c, d, D = (pi / sqrt(3)) * (15 / 16)) {(c + (d - c)) * (exp(D * a * (theta - b)) / (1 + exp(D * a * (theta - b))))}
theta <- theta <- runif(n = 1000, min = 0, max = 1)
plot(x = theta, y = foo(theta = theta, a = 4, b = 0.5, c = 0.25, d = 0.75), xlim = c(0, 1), ylim = c(0, 1))

From this paper: http://apm.sagepub.com/content/early/2013/02/14/0146621613475471 enter image description here

which, according to the paper, when I shift c should change the lower asymptote on the plot and d should change the upper asymptote. But it isn't. Am I doing something wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

Your parentheses are wrong in

(c + (d - c))

The expression adds up to d (effectively wiping out the c), whereas only the

(d - c)

should be multiplied onto what follows.