Best Descriptor for goodness of fit

1 次查看(过去 30 天)
Dear all
I am trying to fit experimental data to a linear model of the form of y =B*x using fitlm. I have multiple datasets in x but only one dataset y and i am trying to figure out wich dataset x archives the best linear fit with y obliging the formular y=x*B.
I wonder now what is the best statistical measure to determine which dataset x fits the best (x and y are 1D arrays with roughly 1000 rows)
Can i use the coeficient standart deviation to do that? I am not great in statistics unfortunaltey.
Thank you for you help.

采纳的回答

Bjorn Gustavsson
Bjorn Gustavsson 2021-8-24
The best descriptor for goodness of fit is some measure of the divergence between the distribution of residuals of your fit and the distribution of residuals you expect knowing "the statistical characteristics of your measurements". If you for example have normal-distributed measurements with variance 1, you should have residuals with a standard-deviation of 1. This is a necessary condition for a good fit, but since a set of alternating residuals of +1 and -1 will give you a standard deviation of 1 too, it is not a sufficient condition. If you instead look at the distribution of the residuals (histogram or something similar) it should be consistent with comming from a normal-distribution. That was a very birds-eye view of this.
My practical advice is to save away the residuals and then calculate the histograms of their distribution and pick the narrowest one with a "nice shape"...

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Analysis of Variance and Covariance 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by