Polynomial regression

Two columns must be selected (x and y values). A polynomial of up to the fifth order is fitted to the data. The algorithm is based on a least-squares criterion and singular value decomposition (Press et al. 1992), with mean and variance standardization for improved numerical stability.

The polynomial is given by

y = a5x5 + a4x4 + a3x3 + a2x2 + a1x + a0.

The chi-squared value is a measure of fitting error - larger values mean poorer fit. The Akaike Information Criterion has a penalty for the number of terms. The AIC should be as low as possible to maximize fit but avoid overfitting.

R2 is the coefficient of determination, or proportion of variance explained by the model. Finally, a p value, based on an F test, gives the significance of the fit.


Press, W.H., S.A. Teukolsky, W.T. Vetterling & B.P. Flannery. 1992. Numerical Recipes in C. Cambridge University Press.

Published Aug. 31, 2020 9:24 PM - Last modified Aug. 31, 2020 9:24 PM