Why fitting a logistic is nearly impossible from early data
Nothing grows exponentially forever. What appears to be an exponential curve often turns out to be some sort of S curve, such as a logistic curve.
Suppose you're collecting data on the left side of the curve. If there's even a small amount of error in your data, you won't be able to predict the asymptotic value with any accuracy. But if you have data on both sides of the inflection point, you can make a good prediction of the limiting value.
I've written about this before, explaining that the problem is hard, but I didn't saywhy it's hard. Here I'd like to give an idea why it's hard.
Suppose you want to fit a logistic equation
to three distinct values of t and the corresponding values of y. There is a unique solution, but in general you cannot find a solution in closed form. However, if the values of t are evenly spaced
there is a method [1] to solve for the parameters L, k, and t0. For this post we're only interested in the limiting value L, and it can be found by
independent ofh.
To find out how small changes in theys change the estimate ofL, we take the partial derivatives ofL with respect to theys and find
and
All three derivatives have the same expression in the denominator: y1^2 - y0 y2.
If the functiony(t) were an exponential, this expression would be exactly zero [2]. The function y(t) is not exactly exponential, but it is approximately exponential when the ts are in the left or right tail of the logistic curve. The further out in either tail the ts are, the closer the expression is to zero.
So when all the ts come from the same side of the inflection point, y(t) is nearly exponential the partial derivatives are huge and so the fitted value of L is extremely sensitive to changes in the ys.
As a concrete example, setL =k = 1 and t0 = 0. Evaluatey(t) at -2, -1.5, and -1. Then the values ofy are
y0 = 0.11920292
y1 = 0.18242552
y2 = 0.26894142
If you forecast L using exactly these three values you'll get L = 1.
But if you change y0 to 0.12374097, the forecasted value of L is infinite. Values of y0 in the interval [0.11920292, 0.12374097] predict values of K in [1, ].
[1] Raymond Pearl and Lowell J. Reed. On the Rate of Growth of the Population of the United States Since 1790 and its Mathematical Representation. Proceedings of the National Academy of Sciences of the United States of America, Vol. 6, No. 6 (Jun. 15, 1920), pp. 275-288
[2] exp(x +h)^2 = exp(x)^2 exp(h)^2 = exp(x) exp(x + 2h)
The post Why fitting a logistic is nearly impossible from early data first appeared on John D. Cook.