When a relationship curves but you do not have a mechanistic equation for it, a polynomial is a pragmatic fit. Magic Stat estimates polynomials up to degree 6, with the coefficient table, the R², the F test and prediction intervals that let you judge whether the curve is justified.
Polynomial regression adds powers of the predictor — x, x², x³ and so on — and fits them by least squares. It is still a linear model: linear in the coefficients, which is why the usual coefficient table, confidence intervals and F test apply. What it buys is curvature: a single-peaked response, a U-shape, a saturating trend.
The trap is degree. A higher degree will always fit the sample a little better, and past a point it is fitting noise. Magic Stat lets you go from degree 2 to degree 6, but the honest advice, printed in no uncertain terms, is to start low and only add a term when the data justify it.
Polynomials also extrapolate badly. Outside the range of the observed predictor, powers can swing to values that have no basis in the data. If your relationship has a mechanism, nonlinear regression usually gives a more defensible model than a high-degree polynomial.
poly() call or term-by-term formula to write.Polynomial degree: 2 to 6, set with a spin box.
Several predictors: each predictor contributes its own polynomial block (y ~ x1 + x1² + x2 + x2² + …) in a single model — not one curve per predictor.
Start at 2. Add a higher power only when it captures a feature the lower-degree fit visibly misses and the extra term is worth its loss of degrees of freedom. Chasing the highest R² is a reliable way to overfit.
No. The curve is nonlinear in the predictor, but the model is linear in the coefficients, which is why ordinary least-squares inference — the t tests, the F test, the intervals — applies directly.
You should not. High powers diverge outside the observed range of the predictor, so a prediction there is an artefact of the equation, not a finding. Keep interpretation inside the data range.
If a mechanistic equation describes the process — Michaelis–Menten, exponential, logistic — nonlinear regression gives a model whose parameters mean something. Use a polynomial when you want a flexible curve and have no mechanism to propose.
No. The analysis runs locally. The only automatic signal is an anonymous installation counter with no data in it.