Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWLinearRegressionFTest



Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/math/genmat.h>
#include <rw/math/mathvec.h>
#include <rw/analytics/linregress.h>
#include <rw/analytics/lrftest.h>

RWGenMat<double> predictorMatrix;
RWMathVec<double> observationVector;
RWLinearRegression lr(predictorMatrix, observationVector);
RWLinearRegressionFTest ftest(lr);

Description

Class RWLinearRegressionFTest can be used to test that the estimated parameters in a linear regression model are equal to a hypothesized vector of values. For example, it can test the hypothesis that all parameters are equal to 0. To be completely precise, the class tests the hypothesis that the estimated parameters are the solution to some specified system of linear equations. The test is based on the F statistic described in Section 3.2.4.

Example

The following example creates a linear regression object and tests the hypothesis that all parameters are equal to 0 at a confidence level of
99 percent.

Public Constructors

RWLinearRegressionFTest();
RWLinearRegressionFTest(const RWLinearRegressionFTest<T>& t);
RWLinearRegressionFTest(const RWLinearRegression<T>& lr);
RWLinearRegressionFTest(const RWLinearRegression& lr,
                        const RWGenMat<double>& A, 
                        const RWMathVec<double>& c);

Public Member Functions

double 
criticalValue(double alpha) const;
double
FStatisticPValue() const;
double 
FStatisticValue() const;
RWBoolean 
reject(double alpha=.05);
void 
setHypothesis(const RWGenMat<double>& A,
              const RWMathVec<double>& c);
void 
setLinearRegression(const RWLinearRegression& lr);

Public Member Operator

RWLinearRegressionFTest& 
operator=(const RWLinearRegressionFTest& ft);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.