Setting good lower and upper bounds on and exponential fit.
2 views (last 30 days)
Show older comments
Hi all, I am trying to get an optimal fit for some data. It seems it fits a double exponential fit quite well, however......the confidence intervals seem too big. How can I set appropriate upper and lower bounds? I have seen it said many times while searching on websites that the bounds should be set "according to your data." What does this mean? How can I actually decide what good bounds are? Here is my data:
x are time points, and y is the data
x =
0
1
3
5
7
10
20
30
40
50
60
180
300
1080
1440
y =
14.7311
16.4375
16.9743
17.6971
17.8000
17.9643
18.1380
18.4612
18.4525
19.1260
19.0100
19.9080
20.0220
21.5480
21.1938
the fit I used was:
s2 = fitoptions('Method','NonlinearLeastSquares','StartPoint',[3 1 15 2 0.1])
pmexp2 = fittype('a*(1-exp(-x/b))+c+d*(1-exp(-x/e))','options',s2);
figure(2) [fo1 go1] = fit(x,y,pmexp2) hold on plot(x,y, 'o')
A professor gave me this equation and the startpoints(I dont totally understand these). Like I said the fit does look pretty good.
Result of fit:
fo1 =
General model:
fo1(x) = a*(1-exp(-x/b))+c+d*(1-exp(-x/e))
Coefficients (with 95% confidence bounds):
a = 3.085 (2.395, 3.775)
b = 2.362 (1.029, 3.696)
c = 14.93 (14.32, 15.55)
d = 3.308 (2.727, 3.888)
e = 231.7 (107.5, 355.9)
go1 =
sse: 0.8727
rsquare: 0.9801
dfe: 10
adjrsquare: 0.9721
rmse: 0.2954
the e term is what I am most concerned about. That confidence interval seems very large? Any help much appreciated. Thanks!
0 Comments
Answers (1)
Walter Roberson
on 18 Oct 2013
You have exp(-x/e) with x as a maximum of 1440. exp(-1440/231.7) is only on the order of 0.002, not a very big contribution. exp(-1440/107.5) has several more leading zeros; exp(-1440/355.9) is about 0.02 which is still not a big contribution compared to other parts.
See Also
Categories
Find more on Linear and Nonlinear Regression 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!