Why do fit results and parameter confidence intervals depend on magnitude of units? Why are confidence intervals nonsense on a good fit?
2 views (last 30 days)
Show older comments
I have attached a short script which computes group delay vs. frequency from the measured phase of a log-periodic antenna, with the data file also attached. (Sorry tried to use the inline code entry box, but Firefox did not seem to play well with it).
The group delay is fitted to a 4-parameter function using "fit" and I plot the results and the parameter estimatest and confidence intervals.
The problem is this: first, if I use the original units, Hz for frequency and seconds for group delay, the fit will not properly converge to any reasonable values for the parameters. The resulting confidence intervals are also nonsensical.
This problem goes away when I convert to MHz and nanoseconds, which are units that give values falling in a numerical range that is commonly used for antennas. However, even though the fit is excellent by eye, the confidence intervals on the fitted parameters are nonsensical.
So my questions are: why does the fit depend on units and why are the confidence intervals crazy even with a good fit?
curve1 =
General model:
curve1(x) = a.*(x./b).^(-c) + d
Coefficients (with 95% confidence bounds):
a = 7.5e-08 (-0.001166, 0.001166)
b = 1.7e+08 (-2.643e+12, 2.644e+12)
c = 1 (0.9718, 1.028)
d = 1.5e-08 (1.415e-08, 1.585e-08)
curvem =
General model:
curvem(x) = a.*(x./b).^(-c) + d
Coefficients (with 95% confidence bounds):
a = 76.35 (-1.624e+06, 1.624e+06)
b = 171.7 (-2.506e+06, 2.506e+06)
c = 1.457 (1.456, 1.458)
d = 3.091e-08 (-0.01276, 0.01276)
0 Comments
Accepted Answer
Torsten
on 15 Mar 2023
Your model is not adequate because it needs 3 parameters, not 4.
Write it as
curvem(x) = a.*(x./b).^(-c) + d = a/b^(-c) * x^(-c) + d
Now define as independent variables to be fitted
a_tilde = a/b^(-c), c_tilde = -c and d_tilde = d.
Then your model takes the form
curvem(x) = a_tilde * x^(c_tilde) + d_tilde
with 3 parameters instead of 4 and the same explanatory power.
7 Comments
More Answers (0)
See Also
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!