drasys.or.stat.model
Class ReverseLinear
java.lang.Object
|
+--drasys.or.stat.model.LinearRegression
|
+--drasys.or.stat.model.ReverseLinear
- public class ReverseLinear
- extends LinearRegression
- implements LinearRegressionI
A reverse multiple linear regression model.
This algorithm starts by selecting all of the entering and required variables.
A selected varable is a candidate for removal if its p-value exceeds 'exitPValue' and it isn't a required variable.
The algorithm removes the candidate with the highest p-value and solves the model with the new set of variables.
It continues removing candidates until all p-values are below 'exitPValue'.
References:
Applied Linear Statistical Models (Irwin Series in Statistics)
Michael H. Kutner, et al / Hardcover / Published 1996
Numerical Recipes in C : The Art of Scientific Computing
William H. Press, et al / Hardcover / Published 1993
Fields inherited from class drasys.or.stat.model.LinearRegression |
_cfstat,
_coef,
_cov,
_dependent,
_enteringVariables,
_enterPValue,
_exitPValue,
_glm,
_independent,
_lastConfidenceLevel,
_lower,
_m,
_n,
_requiredVariables,
_selectedVariables,
_stdv,
_tpvalue,
_tstat,
_upper,
_zeroIntercept |
Method Summary |
int |
solve()
Solve for the significant variables and coefficients. |
java.lang.String |
toString()
Creates a string representation of this object. |
Methods inherited from class drasys.or.stat.model.LinearRegression |
allVariables,
getCoefficients,
getEnteringThreshold,
getEnteringVariables,
getExitingThreshold,
getF,
getFPV,
getGLM,
getLowerBounds,
getRequiredVariables,
getSelectedVariables,
getT,
getTPV,
getTStatistic,
getUpperBounds,
setEnteringThreshold,
setEnteringVariables,
setExitingThreshold,
setRequiredVarables,
setSelectedVariables |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ReverseLinear
public ReverseLinear(VectorI dependent,
MatrixI independent)
- Initialize the regression with the sample data.
The model will use 'GeneralLinearModel' for the underlying GLM algorithm.
ReverseLinear
public ReverseLinear(GeneralLinearModelI glm)
- Initialize the regression with an explicit general linear model.
The GLM should be initialized with the sample data.
solve
public int solve()
- Solve for the significant variables and coefficients.
Returns the number of independent variables selected in the final model.
This algorithm uses 'setSelectedVariables' to solve the model and will leave the final solution variables selected.
The solution can be retrieved with 'getSelectedVariables' and the column indices will be in ascending order.
- Specified by:
- solve in interface LinearRegressionI
toString
public java.lang.String toString()
- Creates a string representation of this object.
The string is composed of 'super.toString()' followed by the details of the iterations used to solve the regression.
- Overrides:
- toString in class LinearRegression
Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com