formula for nonlinear regression model

1 回表示 (過去 30 日間)
Maura E. Monville
Maura E. Monville 2019 年 8 月 14 日
Dear MatLab Experts,
I have four column vectors with 14 elements representing respectively:
Area, Max.Diameter, Min.Diameter, Field Size Factor (FSF) of custom-made collimators.
I believe the FSF depends somehow on the other three quantities. The dependence is not linear.
I woud like to tryto model the FSF as a power law involving products of the other quantities.
For instance, FSF ~a*(Max.Diam*Min.Diam)^b + c*(Area/Max.Diam)^d + e*(Area/Min.Diam)^f + g*(Max.Diam/Min.Diam)^h + i
where a, b,c,d,e,f,g,h,i are the unknown model coefficients.
I am pretty sure most of the terms are useless. Perobably just one is necessary for the model. However, I do not know which one is the most important term. I expect the modeling function will figure that out.
My problem is that I do not know how to write the above formula in the proper format expected by the nonlinear regression functions.
I need some help to set up the above outlined particular model.
Thank you very much in advance.
Best regards,
Maura E. M.

採用された回答

SYED IMTIAZ ALI SHAH
SYED IMTIAZ ALI SHAH 2019 年 8 月 14 日
Is this what you want?
x = MaxFDiam .* MinFDiam + Area ./ MaxFDiam + Area ./ MinFDiam + MaxFDiam ./ MinFDiam; % your formula
Linear model Poly7:
Your resultant equation with coefficients.
f(x) = p1*x^7 + p2*x^6 + p3*x^5 + p4*x^4 + p5*x^3 +
p6*x^2 + p7*x + p8
Coefficients (with 95% confidence bounds):
p1 = 2.961e-18 (-5.495e-18, 1.142e-17)
p2 = -6.914e-15 (-2.189e-14, 8.064e-15)
p3 = 6.708e-12 (-4.044e-12, 1.746e-11)
p4 = -3.496e-09 (-7.522e-09, 5.297e-10)
p5 = 1.054e-06 (2.132e-07, 1.895e-06)
p6 = -0.0001832 (-0.0002798, -8.656e-05)
p7 = 0.01691 (0.01138, 0.02244)
p8 = 0.3618 (0.2454, 0.4782)
Goodness of fit:
SSE: 5.048e-06
R-square: 0.9998
Adjusted R-square: 0.9995
RMSE: 0.0009173
1.PNG
2.PNG
  4 件のコメント
Maura E. Monville
Maura E. Monville 2019 年 8 月 14 日
Yes. The coefficients are very small. But the fit is close to perfection.
I have sdeveloped a Monte Carlo simulation that reproduces the trend of the experimental measurements but not as accurately as your model.
I tried to fit a much simpler linear model using 'fitlm'. The result was bad although the R^2 was more than 0.9. But some P_values were 'NaN'.
I am going to accept your very good solution. Although I really would like to learn how to play with nonlinear models.
Thank you.
Regards,
maura E. M.
SYED IMTIAZ ALI SHAH
SYED IMTIAZ ALI SHAH 2019 年 8 月 14 日
You are welcome.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRegression についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by