Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Business Analysis Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

5.4 Regression Analysis Classes

The Business Analysis Module provides classes for performing analyses of overall model significance for linear and logistic regressions. These classes are RWLinearRegressionANOVA, RWLogisticFitAnalysis, and RWLinearRegressionFTest. Let's discuss these in more detail in the following sections.

5.4.1 Class RWLinearRegressionANOVA

Class RWLinearRegressionANOVA may be used to conduct an analysis of variance for a linear regression. The quantities calculated include: overall F statistic, residual sum of squares, regression sum of squares, degrees of freedom for the regression and residuals, mean square error, coefficient of determination, and adjusted coefficient of determination.

Using the class is fairly easy. You simply specify a linear regression object, either at construction time or via the member function setLinearRegression(), and query the object for the various ANOVA quantities. Here is a simple example:

5.4.2 Class RWLogisticFitAnalysis

Class RWLogisticFitAnalysis is similar to class RWLinearRegression, which was described above. To use RWLogisticFitAnalysis, you specify a logistic regression, either at construction time or via the setLogisticRegression() member function, and query the object for the various fit analysis quantities. The following example demonstrates the procedure.

5.4.3 Class RWLinearRegressionFTest

Suppose that we have the linear regression model:

Y = β0 + β1x1 + β2x2 + β3x3 + β4x4

and we want to test the hypothesis Ha2 = β4 = 0 and the hypothesis Hb1 = β3.

We can express each of these hypotheses in the matrix form Aβ = c, where β = [β0, β1, β2, β3, β4], c = 0, for Ha, and A = [0 1 0 –1 0] for Hb.

The RWLinearRegressionFTest class can be used for testing hypotheses of the above form Aβ = c, where β is the vector of p parameters for the linear regression model, A is a known matrix of rank q, and c is a known vector. The following is an example that tests both types of hypotheses.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.