Logistic Graph Commands

Logistic curves describe growth that begins slowly, accelerates, and then approaches a limiting value. They are useful for adoption rates, population shares, diffusion measures, and other economic series that follow an S-shaped path.

The general logistic equation

RainbowStats uses the four-parameter logistic form:

ŷ(t) = L + U − L 1 + e−r(t − tm)

The fitted curve approaches L on the left and U on the right.

L — lower asymptote, or the long-run minimum
U — upper asymptote, or the long-run maximum
r — growth rate; its sign determines the curve's direction
tm — midpoint, where the curve changes fastest

Each command uses this same equation. The commands differ only in whether L and U are estimated from the data or supplied by the user.

1. Logistic_Graph

Both asymptotes are estimated 4 fitted parameters

internetFit=Logistic_Graph(ITNETUSERP2USA)
ŷ(t) = L̂ + (Û − L̂) / [1 + e−r̂(t − t̂m)]

RainbowStats estimates L, U, r, and tm. Use this form when the data should determine both long-run limits.

2. Logistic_Graph_Lower

The lower asymptote is fixed 3 fitted parameters

internetFit=Logistic_Graph_Lower(ITNETUSERP2USA,0)
ŷ(t) = L0 + (Û − L0) / [1 + e−r̂(t − t̂m)]

The user supplies L0; RainbowStats estimates the upper asymptote, growth rate, and midpoint. Here, internet use cannot fall below zero users per 100 people.

3. Logistic_Graph_Upper

The upper asymptote is fixed 3 fitted parameters

internetFit=Logistic_Graph_Upper(ITNETUSERP2USA,100)
ŷ(t) = L̂ + (U0 − L̂) / [1 + e−r̂(t − t̂m)]

The user supplies U0; RainbowStats estimates the lower asymptote, growth rate, and midpoint. For a series measured per 100 people, 100 is a natural saturation level.

4. Logistic_Graph_Bound

Both asymptotes are fixed 2 fitted parameters

internetFit=Logistic_Graph_Bound(ITNETUSERP2USA,0,100)
ŷ(t) = L0 + (U0 − L0) / [1 + e−r̂(t − t̂m)]

The user supplies both limits; RainbowStats estimates only the growth rate and midpoint. This is the most appropriate specification when the series has known physical or definitional bounds.

Command comparison

Command Lower asymptote Upper asymptote Best used when
Logistic_Graph Estimated Estimated Neither long-run limit is known
Logistic_Graph_Lower Fixed by user Estimated A natural minimum is known
Logistic_Graph_Upper Estimated Fixed by user A natural maximum is known
Logistic_Graph_Bound Fixed by user Fixed by user Both limits are known

Complete RainbowStats example

internet=ITNETUSERP2USA
fitFree=Logistic_Graph(internet)
fitLower=Logistic_Graph_Lower(internet,0)
fitUpper=Logistic_Graph_Upper(internet,100)
fitBound=Logistic_Graph_Bound(internet,0,100)
slideshow(list(fitFree,fitLower,fitUpper,fitBound))

ITNETUSERP2USA is the FRED series for U.S. internet users per 100 people. It is an annual technology-adoption series with natural bounds of 0 and 100.

Choosing bounds: Bounds must use the same units as the original series. A proportion recorded from 0 to 1 needs bounds of 0 and 1; a percentage recorded from 0 to 100 needs bounds of 0 and 100. A logistic curve approaches its bounds asymptotically, so the limits should describe meaningful long-run constraints rather than simply the smallest and largest observations in the sample.