Polynomial Regression

Top  Previous  Next

How To... > Work with Statistical Objects > Build a Linear Model > Multiple Regression > Polynomial Regression

polynomialregressiongraph

 

polynomialregressioninsp

Suppose you have some bivariate data and you have some reason to believe that the right model for the data is a third-degree polynomial. You can use the multiple regression model to find the coefficients for each term.

At right are some fictitious data that look vaguely cubic. The trick is to realize that by adding attributes for xSquared and xCubed, you can reduce the problem of polynomial regression to multiple linear regression.

1.Drag a model object from the shelf or choose Object | New | Linear Model and choose Multiple Regression from its pop-up menu.
2.Make attributes for powers of x.

polynomialregressionmodel

Now build up the linear model as shown here. Notice in the ribbon chart that each term contributes significantly to the model.

Finally, show the model’s inspector, copy the regression equation, and plot it on top of the original scatter plot.

Note: You have to edit the equation, replacing xSquared and xCubed with x^2 and x^3 before the function will plot.

The resulting plot, with the cubic on top of the data, is shown here.

polynomialregressiongraphweqn