The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_math2
Class: TCurveFit
Declaration: procedure CalcAnovaReg (NumVars: integer; IncludeConst: boolean; var dfreg, dfres, dftotal: integer; var SSE, SSR, SST, MSE, MSR, F: double);

The procedure CalcAnovaReg performs the analysis of variances (ANOVA) for linear models. The parameter NumVars has to contain the number of variables used for the model (i.e. NumVar is 1 for simple linear regression, or contains the number of descriptors used for multiple regression). The IncludeConst parameter indicates whether the model contains an intercept or not (a constant which is estimated by the regression procedure).

The data of the TCurveFit component (entered by EnterStatValue) has to contain the actual y-values and the estimated y-values of the regression model.

The method CalcAnovaReg returns the following parameters:

dfreg, dfres, and dftotal The number of degrees of freedom for the regression model, the residuals, and the entire model.
SSE, SSR, and SST The sum of squares of the errors (residuals), the regression model and the total model.
MSE and MSR The mean squares of the errors (residuals) and the regression.
F The F statistic of the model, indicating the reliability of the model.

Example: This property is used in the following example program (see for downloading the code): multilinreg

Last Update: 2014-Sep-03