# How do I interprete the estimates given by a quadratic formula in the linear regression tool

Initially I thought this meant -45791.17X^2 + 13593.55x + 38747.11 was the equation of the model, however this is not the case. For example when X = 53.3I, the fitted point was 34598.84, However using the above equation yields -129470460.8 which is way off. I was wondering how to inteprete these estimates.

Thanks

### (5) Answers

You can vote to improve this functionality under Regression Modeling under the TIBCO ideas portal. https://ideas.tibco.com/ideas/TS-I-6207

## 0 Comments

+ Add a CommentI had the same problem trying to show in a class how to fit polynomial degree 2 and polynomial degree 4 to some data. If you add a scatterplot visualization, when you right-click to get Properties > Lines & Curves, you can fit a polynomial to degree 2 or 4 and get the correct coefficients. But if you do the same thing in Regression Modeling, you get totally different coefficients. In Regression Modeling under the formula expression it looks like this: `y_predictor` ~ **poly**(`x_factor`, 2) or `y_predictor` ~ **poly**(`x_factor`, 4). The problem is the use of the R function **poly**. It is designed for orthogonal polynomials. To work in other cases, have to add condition **raw=TRUE**, so you have to edit your formula expression: `y_predictor` ~ poly(`x_factor`, 2, **raw=TRUE**) or `y_predictor` ~ poly(`x_factor`, 4, **raw=TRUE**). Then you get the correct coefficients!! The default is raw=FALSE.

Excerpt from the R documenation on **poly():**

Returns or evaluates orthogonal polynomials of degree 1 to degree over the specified set of points x: these are all orthogonal to the constant polynomial of degree 0. Alternatively, evaluate raw polynomials.

I also have a case submitted to TIBCO Support to see if there is some way to change this without having to always type in raw=TRUE.

## 0 Comments

+ Add a CommentI'm having the same issue. Has there been a solution to this? The solution provided does not calculate the appropriate expected output.

## 0 Comments

+ Add a Comment## 0 Comments

+ Add a CommentThose still are the coefficients and I think your equation looks ok. With a linear regression with quadratic terms, you will need to use an equation like the following. Assuming our table of coefficients like this:

Name Estimate StdError t.value p.value

(Intercept) 44.89226838 1.25515744521594 35.7662447456162 3.21592953988048E-07

poly(Xdata, 2)1 140.94612345 55.1769515320471 2.55443839383754 0.0509900964358136

poly(Xdata, 2)2 -21.04295539 18.5516939664705 -1.13428754446426 0.308109547939634

etc...

The equation would be like:

= 44.89226838 + 140.94612345*Xdata - 21.04295539*Xdata^2 ...etc...

You will notice that each input has 2 coefficients: one for its base term ("poly(Xdata, 2)1") and the second for its squared term ("poly(Xdata, 2)2").

For reference, here is one article which helps describe this:

- http://blog.minitab.com/blog/adventures-in-statistics/how-to-interpret-r...
- How Do I Interpret the Regression Coefficients for Curvilinear Relationships and Interaction Terms?

## 1 Comment

I tried the equation and it was not giving me the fitted data. Predicting data using the model and fitting a line through the predicted data showed that my equation should have been 45936+44.37X-4.82X^2. I dont know why the regression tool is showing coefficients that dont seem to be right.

### Similar Questions

## Haven't found what you are looking for?

## Existing Best Answer

This Question already has a 'Best Answer'. If you believe this answer is better, you must first uncheck the current **Best Answer**