PolyFit: A C++ code for polynomial curve fit with calculation of error barsIanik Plante
In radiobiology, many dose-response results are modeled using the so-called linear-quadratic (LQ) model, which means that results are modeled as a function of dose D as R(D)=ß0+ß1D+ß2D2. The coefficients ß0, ß1 and ß2 are obtained from fitting a series of data points (xi,yi), which is usually done using a least-square method. The LQ and more generally the polynomial fit capability is implemented in many software that analyzes data. However, there are some instances where the fitting needs to be done programmatically. Furthermore, depending on the software used, some features may not be implemented. In this mini-review, I discuss the basis of polynomial fitting, including the calculation of errors on the coefficients and results, use of weighting and fixing the intercept value (the coefficient ß0). A simple C++ code to perform the polynomial curve fitting is also provided. This code should be useful not only in radiobiology but in other fields of science as well.