Chapter 49. Goodness of Fit (.NET, C#, CSharp, VB, Visual Basic, F#)
NMath Stats provides classes GoodnessOfFit and GoodnessOfFitParameter for testing the goodness of fit of least squares model-fitting classes, such as LinearRegression, PolynomialLeastSquares, and OneVariableFunctionFitter:
Available statistics include the residual standard error, the coefficient of determination (R2 and "adjusted" R2), the F-statistic for the overall model with its numerator and denominator degrees of freedom, and standard errors, t-statistics, and corresponding (two-sided) p-values for the model parameters.
This chapter describes how to use the goodness of fit classes.
NOTE—GoodnessOfFit and GoodnessOfFitParameter are a generalization of classes LinearRegressionAnova and LinearRegressionParameter (Chapter 42), respectively. As such, they duplicate the functionality of those classes for testing the goodness of fit of a LinearRegression, with the exception of the beta coefficients.