Is the relationship a curve rather than a straight line? (nonlinear regression, four fixed formulas)
In brief
Is the relationship a curve rather than a straight line? Nonlinear regression fits one of four fixed formulas: Michaelis-Menten, exponential, logistic or power. The target is a number, predicted from exactly one number. The formula must be justified by the subject.
How it works in Statable
- "New analysis", then choose the card "Can something be predicted?".
- Choose the target column and exactly one predictor column with numbers.
- "More options" → "Model" → "Nonlinear regression (fixed formula)", then choose the formula.
- The result shows the parameters with intervals; there is no R².
The four formulas
- Michaelis-Menten: y = a · x / (b + x). The curve rises and approaches an upper limit a (saturation).
- Exponential: y = a · exp(b · x). Growth or decline by the same percentage per step.
- Logistic: y = a / (1 + exp((c − x) / b)). An S-shaped curve with upper limit a and midpoint at c.
- Power: y = a · x^b. The curve rises or falls with the power b.
There is no free formula. The formula is a decision based on subject matter and should not be chosen by which one fits best.
What the table looks like
One row per case, a target column with numbers and exactly one predictor column with numbers. Rows with a gap in one of the two columns are left out; the number is shown in the result. Depending on the formula, the calculation needs positive values for the starting values: for Michaelis-Menten and power x and y above 0, for exponential and logistic y above 0. Otherwise Statable blocks the calculation and says in how many cases this does not hold.
Reading the result
- For each parameter (a, b, with the logistic formula also c) the estimate b, SE, t, p and two 95% intervals are shown: the Wald interval (with the t distribution and the degrees of freedom df given) and the profile interval. If the profile interval cannot be calculated, a sentence says so, and the Wald interval remains.
- The model: n, df, the residual sum of squares (RSS), the residual standard deviation σ and AIC.
- The picture shows the points and the fitted curve; a table shows the fitted values and the residuals.
When the calculation fails
If the calculation finds no result (no convergence), Statable shows no numbers but a sentence. Then the formula probably does not fit the data, or the starting values are not enough. Fitting a straight line as a Michaelis-Menten curve fails, for example.
Trap: what the numbers do not say
- There is no R². In nonlinear models the apparent R² cannot be read as in linear regression; that is why Statable gives none.
- The formula must be justified by subject matter. That a curve fits well does not yet show that the relationship runs that way.
- The calculation finds a local optimum. With other starting values a different solution can result.
- Statements for x outside the range of the data are not covered: the curve can run quite differently there.
- The p values and intervals are approximations. The Wald interval and the profile interval can differ considerably. The residuals should be inspected.
- If R reports a warning during the calculation, it is shown in the result; the numbers are then to be read with caution.
Requirements and limits
- The cases are independent of each other, and the spread around the curve is roughly equal. The table of the residuals helps with checking.
- More cases and more different x values than parameters are needed.
Reporting the result
nonlinear regression (Michaelis-Menten), a = 212.68, b = 0.06, RSS = 1195.45, df = 10
Typical examples
- How fast does a reaction run depending on the concentration (Michaelis-Menten)?
- How does a stock grow over time (exponential or logistic)?
For specialists
R (stats): nls(formula, start = s, control = nls.control(maxiter = 200, tol = 1e-7, minFactor = 1/4096)). The starting values s come automatically from linear auxiliary regressions. The profile interval is confint() on the nls model. Checked on Puromycin (Michaelis-Menten), ChickWeight (exponential), DNase (logistic) and cars (power) against independent calculations: parameters, standard errors and residual sum of squares agree.