Best Descriptor for goodness of fit

2 visualizaciones (últimos 30 días)
Hannes Frey
Hannes Frey el 24 de Ag. de 2021
Comentada: Hannes Frey el 24 de Ag. de 2021
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.

Respuesta aceptada

Bjorn Gustavsson
Bjorn Gustavsson el 24 de Ag. de 2021
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"...
  1 comentario
Hannes Frey
Hannes Frey el 24 de Ag. de 2021
Thank you=) that is a very helpfull answer

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by