Should I modify x-values for curve fitting with response variable?
1 view (last 30 days)
Show older comments
I am trying to fit concentration (in x-axis) and approach rate (in y-axis) using a logistic equation. The real values of x are [0.5, 2, 5, 9]. Should I fit real_x vs y? I think I saw somewhere that one should use equidistant points (like x = [1,2,3,4]) for fitting. What is your opinion?
0 Comments
Accepted Answer
Matt J
on 31 May 2024
Edited: Matt J
on 31 May 2024
Matlab's fitting solvers do not require the x data to be equidistant.
I'm not sure why it would be a matter of opinion, though. Since you do not have equidistant x, what choice do you have but to use the non-equidistant ones?
3 Comments
Matt J
on 31 May 2024
You are quite welcome, but please Accept-click the answer if your question has been resolved.
John D'Errico
on 31 May 2024
+1 of course, but I would add that spacing/placement can be a significant factor.
For example, given a tight cluster of points, and one point out in the weeds. Now that one point on the edge of tomorrow will often have a high influence on the result.
Another case is the simple one where you have points at exactly 2 levels, with multiple replicates. In this extreme case of a non-uniform sampling, you really only have 2 pieces of information, and a linear fit would pass through the average of the two clusters. This even applies to a case where you have two very tight clusters of points. Again, you have essentially only two pieces of information due to the non-uniform sampling.
All of this gets into things like influence matrices, the hat matrix, and an entire course or book on the subject.
More Answers (0)
See Also
Categories
Find more on Curve Fitting Toolbox 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!