- Nonlinear regression model - MATLAB - MathWorks India
- Evaluating Goodness of Fit - MATLAB & Simulink - MathWorks India
fitnlm interpretation of results
3 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone
I have fitted a regression curve to my data using weighted least square method by fitnlm. The question is :
According to the properties below, how can I realize if the results from fitnlm are reasonable? The R-Squared and Coefficients are as attached below. The result of my fit is also shown below.
Thanks
Pooneh
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1521301/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1521306/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1521311/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1521326/image.jpeg)
0 件のコメント
回答 (1 件)
Avadhoot
2023 年 10 月 30 日
Hi Pooneh,
I understand that you have fitted a non-linear model to your data, and you want to analyse the goodness of fit for the model using its parameters.
As you have used a non-linear model, the residual equation,
SST = SSR + SSE
does not hold true. As a result of that the value of R2 comes out to be negative. Hence R2 cannot be used as a metric for measuring goodness of fit. You can use the values of MSE and RMSE to get an idea of the variance of the error. But it is useful only if the error term is Gaussian in nature.
Other parameters like “tStat”, “pValue” and “SE” indicate that the model is poorly fitting the data as the "pValue" is very low and "tStat" and "SE" are high.
Lastly, you can use the plot of actual vs predicted values to understand if the fit is optimal or not. From the plot it can be seen that the model is a poor fir for the data.
You can refer to the following documentation for more information about non-linear models and goodness of fit:
I hope it helps.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!