How to solve the parameters of a diffusion model?
Show older comments

t= 0 5 10 15 20 30 45 60 75 90 105 120
qt= 0 3.87 4.62 4.98 5.21 5.40 5.45 5.50 5.51 5.52 5.54 5.53
6 Comments
Alex Sha
on 19 Apr 2023
1: First of all, from your second equation, there are series solutions for qn, for example qn=[4.35378367056498, 7.48808641357782, 10.5751624468592, 13.6511427168261,...], so taking different value of qn will lead to different result in the next step.
2: if taking qn=4.35378367056498 into first equation, the fitting result will be:
Sum Squared Error (SSE): 0.23048903563446
Root of Mean Square Error (RMSE): 0.138590835325446
Correlation Coef. (R): 0.99579970928735
R-Square: 0.99161706101677
Parameter Best Estimate
--------- -------------
n 15
qe 5.43511155362024
d 0.0114940264188371

3: if taking qn=7.48808641357782 into first equation, the fitting result will be:
Sum Squared Error (SSE): 0.231537368020569
Root of Mean Square Error (RMSE): 0.138905653838787
Correlation Coef. (R): 0.995797614899306
R-Square: 0.991612889839147
Parameter Best Estimate
--------- -------------
n 15
qe 5.43578699037023
d 0.00386345002066533

Alex Sha
on 20 Apr 2023
Hi, Torsten, you are right, I miss understanding the meanings of qn, after modification, the result will be:
Sum Squared Error (SSE): 0.110928562180473
Root of Mean Square Error (RMSE): 0.0961459663655878
Correlation Coef. (R): 0.998042020290086
R-Square: 0.996087874264717
Parameter Best Estimate
--------- -------------
n 16
qe 5.77455887169259
d 0.000526273425478496
Qili Hu
on 20 Apr 2023
Alex Sha
on 21 Apr 2023
Hi, Hu:
Step 1: finding the series root of qn (n=1,2,3...,) using fsolve or vpasolve one by one,alternatively, you may think other methods to quickly find solutions for different intervals together;
Step 2: based on the solutions from step 1, it is easy to use command, for example lsqcurvefit, to achieve the next fitting procedure.
The first 33 roots are given below, obtained very easy by using 1stOpt (a math package other than Matlab)
n=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33];
qn=[4.35378367052701,7.48808641354398,10.5751624468592,13.6511427168261,16.7257079845738,19.8025583223684,22.8832678483399,25.9684490866884,29.0582237629463,32.1524537034099,35.2508675693218,38.3531340595364,41.4589045596711,44.5678374146667,47.6796109564883,50.7939296792504,53.9105263205883,57.0291615831204,60.1496225761141,63.2717206388126,66.3952889411584,69.520180089537,72.6462638614857,75.7734251293724,78.9015619953762,82.0305841384314,85.1604113617219,88.2909723238772,91.4222034345828,94.5540478954731,97.6864548680592,100.819378752091,103.952778559431];
You may then try the remain fitting process yourself.
Accepted Answer
More Answers (0)
Categories
Find more on Nonlinear Optimization 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!