Goodness of Fit VI

Owning Palette: Advanced Curve Fitting VIs

Requires: Full Development System

Calculates three statistical parameters, SSE, R-square, and RMSE, that describe how well a fitted model matches the original data set.

Details  

 Add to the block diagram  Find on the palette
Y is the array of dependent values of the original data set. The number of elements in Y must be greater than the degree of freedom.
Best Fit is the array of dependent values of the fitted model. Best Fit must be the same size as Y.
Weight is the array of weights for the observations Y. Weight must be the same size as Y. If you do not wire an input to Weight, this VI sets all elements of Weight to 1.

If an element in Weight is less than 0, this VI uses the absolute value of the element.
degree of freedom is the length of Y minus the number of coefficients in the fitted model. The default is –1. If degree of freedom is less than or equal to 0, this VI sets degree of freedom to the length of Y minus 2.
SSE is the summation of square error. The smaller the SSE, the better the fit.
R-square is a normalized parameter to measure the goodness of fit. The closer to 1 the R-square, the better the fit.
RMSE is the root mean square error. The smaller the RMSE, the better the fit.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

Goodness of Fit Details

The statistical parameters SSE, R-square, and RMSE are defined by the following equations:

wi is the ith element of Weight. yi is the ith element of Y. fi is the ith element of Best Fit. , where is the mean value of Y. DOF is the degree of freedom.