Polynomial Regression in CoStat
Polynomial equations have the general form:
y = b0 + b1x1 + b2x2 + b3x3 + b4x4 + b5x5 + ... bnxn
where b0 is an optional constant term and b1 through bn are coefficients of increasing powers of x. You must specify the order of the polynomial to which you wish to fit your data.
A linear equation (y = b0 + b1x) is called a first order polynomial.
A quadratic polynomial equation (y = b0 + b1x + b2x2) is called a second order polynomial.
A cubic polynomial equation (y = b0 + b1x + b2x2 + b3x3) is called a third order polynomial.
Higher (4th or 5th) order polynomials are useful for attempts to describe data points as fully as possible, but the terms generally cannot be meaningfully interpreted in any biological or physical sense. Higher order terms can lead to odd and unreasonable results, especially beyond the range of the x values.
If your goal is to describe a smooth curve through a large number of data points, consider splines (see Graph : Dataset : Representations in CoPlot) or other methods (for example, "Transformations : Smooth"), too.
Data Format
There must be at least two numeric columns of data; you can designate any column as the x column and any column as the y column. Rows of data with missing values in the x or y column are rejected.
Options on the Statistics : Regression : Polynomial dialog box:
X Column:Choose the x column from a list of the columns.Y Column:Choose the y column (the dependent variable) from a list of the columns.Degree:Specify the polynomial order. For example, Degree=2 will generate a quadratic equation (for example, y = 0.32 + 0.15*x + 0.02*x^2).Keep If:lets you enter a boolean expression (for example, (col(1)>50) and (col(2)<col(3))). Each row of the data file is tested. If the equation evaluates to true, that row of data will be used in the calculations. If false, that row of data will be ignored. See "Using Equations", "the A button", and "the f() button".Calculate Constant:In most cases checked is appropriate. Not checked will produce a curve passing through the origin (x=0, y=0).Print Residuals: prints the X values, Y observed, Y expected, and Residual (Y observed - Y expected). These are commonly printed so you can see if the residuals appear to be random (that's good) or if there is some trend (that's bad; maybe some other type of equation is more suitable).Save Residuals:This lets you optionally insert two new columns in the data file with the expected Y's and the residuals. You can then use CoPlot to plot X vs. Y Observed and Y Expected, or plot X vs. the residuals.OKPress this to run the procedure when all of the settings above are correct.CloseClose the dialog box.