How to optimize a curve fit to data in terms of amount of x-data included based on the R^2 values?

2 views (last 30 days)
I have a curve fit to data, but I want to find out where along the curve the fit is the most successful in terms of a parameter such as the R^2 value. Therefore, if ages are along the x-axis, I want to know at what age I should cut off the curve in order for the fit to be the most successful. I would greatly appreciate any suggestions.
  1 Comment
dpb
dpb on 23 Mar 2016
Use N+1 points for a polynomial of degree N and R^2 is identically one with zero residuals.
Need a better criterion for "most successful" -- a sample dataset to see the issue and why one would want to censor it arbitrarily also might add some context that could strongly influence choices.

Sign in to comment.

Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!