The Elsmar Cove Wiki More Free Files The Elsmar Cove Forums Discussion Thread Index Post Attachments Listing Failure Modes Services and Solutions to Problems Elsmar cove Forums Main Page Elsmar Cove Home Page
Google
  Web Elsmar.com
*Please be aware that SOME RECENT forum threads may not yet be indexed by Google.

View Full Version : Find the best fit of data: linear or quadratic


patric wessels
31st May 2006, 05:57 AM
Dear all,

I have a set of 10 measured points and I want to know if the best fit of these data is linear or quadratic. Is the best way to do this to compare the R squared? Or should I use the adjusted R squared because I have more degrees of freedom in the quadratic fit? Or is there a better/easier method to find the best fit?

Please give me some advice on this.

Thanx!

Best regards,

Patric

Statistical Steven
31st May 2006, 07:38 AM
Patric -

If you have repeat observations at a given X level you can do a Lack of Fit test for the linear model and again for the quadratic to see if they are appropriate.

If you do not have repeat observations for any X level, the comparison of the adjusted R-squared is a good benchmark. Residual plots help to assess if the linear fit is appropriate.

In addition, I would look at the studentized residuals from the two models to see if any values are excessive (absolute value greater than 3.5).

Hope that helps.

Tim Folkerts
31st May 2006, 10:43 AM
I agree with Steven. Looking at the residuals is important to see how well the various curves fit the data.

One other mathematical note - the most general quadratic fit would be
y = ax^2 + bx + c

This would have fewer degrees of freedom than the general linear fit
y = mx + b

Also, the general quadradic form given above will always be at least as good as the linear fit (because the linear fit is a subset of he quadratic fit). In this case, the main criterion would basically be if the quadratic fit is enough better to warrent the more complicated form. There would also be the question of which form you might expect theoretically.


If you require b=c=0, then the quadratic does indeed have more degrees of freedom and won't necessarily be better than the linear fit. In this case, it might make more sense to compare y=ax^2 to y = mx (b=0 in the linear fit).



Tim F

Michael Walmsley
31st May 2006, 10:58 AM
Attach the data.

patric wessels
1st June 2006, 02:55 AM
First of all thanks for the reactions so far!

I feel that I need to give some detail about this matter. The following is what we want to do:

We have data across a foil (10 samplepoints over 600mm) and this data represents the thickness of a coating layer. Sometimes the coating thickness has a profile from left to right, i.e. linear increase or a parabola. We want to give our operators a tool to help them decide whether they should adjust the process or not based on (amongst other things) a fit of these data points.

It is not a major thing but a minor detail (but a lot of minor details make things also better).

Best regards,

Patric