How good was a fit ?

1 view (last 30 days)
Andre
Andre on 20 May 2014
Commented: Star Strider on 20 May 2014
Hi,
1) Does Matlab have implemented R, R^2, S, K-S, or other tools that can indicate how good is a fit ?
2) This is a general question: What kind of indicator can I use to see how a small portion of a data set fit explains as good as a whole data set fitting ?
For example: I have, 100% of the data set, fitted (for example, linear). And, 10% (first part of the whole) of the same data set fitted (linearly too). Both of the fitted curves would "try" to explain the "almost" the same thing. Is there any kind of tool that I can use to compare this two data's ?
Andre

Accepted Answer

Star Strider
Star Strider on 20 May 2014
  1. Yes. Look in the Statistics Toolbox functions. There are also functions in the Curve Fitting Toolbox, but I don’t have it. (With the Statistics and Optimization Toolboxes, I don’t need it.)
  2. That’s generally not a good idea, because with fewer data, there are fewer degrees-of-freedom and the parameter confidence limits with a small data set might be non-significant but with a larger data set would be significant. It doesn’t take MATLAB much longer to estimate the parameters of a full data set than a subset, especially for a linear problem. Give the regression functions all your data from the outset.
  3. I would not suggest that approach. If you want to use subsets of your data, there are a number of Resampling Techniques in the Statistics Toolbox that will do that reliably.
  6 Comments
Andre
Andre on 20 May 2014
Thank you very much, I will research the resampling techniques.
Star Strider
Star Strider on 20 May 2014
My pleasure!
I’ll help if I can. It’s probably beneficial for me to review resampling techniques as well. I may ask you to post some of your data and describe what you want to do.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!