Advertisement

Exponential regression calculator

Fit a straight line to the natural logarithm of positive responses. This models multiplicative variation rather than additive response errors.

Calculator

Scale a
2.000000
Exponential rate b
0.693147
Growth factor exp(b)
2.000000
Predicted response
16.000000
R squared on log scale
1.000000
R squared on original response scale
1.000000
Original-scale residuals
xObserved yPredicted yResidual
0.0000002.0000002.0000000.000000
1.0000004.0000004.000000-0.000000
2.0000008.0000008.000000-0.000000

Advertisement

How this calculator works

Take natural logs of every response and fit ln(y) = ln(a) + bx by least squares. Exponentiate the intercept to recover a. The alternative form a × c^x uses c = exp(b). The reported log-scale R squared describes the actual fitting objective; original-scale R squared describes the back-transformed predictions. These predictions are not bias-corrected estimates of a lognormal arithmetic mean.

Formula

ln(y) = ln(a) + bx; a = exp(intercept); c = exp(b); ŷ = a exp(bx) = a c^x.

Worked example

At x = 0, 1, 2 with y = 2, 4, 8, the fit is y = 2 × 2^x. Thus a = 2, b = ln(2), c = 2 and the prediction at x = 3 is 16.

Advertisement

Frequently asked questions

Can responses be zero or negative?

No. Their real natural logarithms are not defined. Adding an arbitrary offset changes the model.

Is this nonlinear least squares on y?

No. It minimises squared log residuals. Nonlinear least squares on original responses generally gives different coefficients.

What does a negative b mean?

It describes exponential decay, with a growth factor between zero and one per x unit.

Sources

Advertisement