|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.stat.model.LinearRegression
A multiple linear regression model abstract class. This class provides the basic functionality for multiple linear regression. It is an abstract class which must be subclassed to implement a specific solution search algorithm.
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
Field Summary | |
protected double |
_cfstat
|
protected VectorI |
_coef
|
protected MatrixI |
_cov
|
protected VectorI |
_dependent
|
protected int[] |
_enteringVariables
|
protected double |
_enterPValue
|
protected double |
_exitPValue
|
protected GeneralLinearModelI |
_glm
|
protected MatrixI |
_independent
|
protected double |
_lastConfidenceLevel
|
protected VectorI |
_lower
|
protected int |
_m
|
protected int |
_n
|
protected int[] |
_requiredVariables
|
protected int[] |
_selectedVariables
|
protected VectorI |
_stdv
|
protected VectorI |
_tpvalue
|
protected VectorI |
_tstat
|
protected VectorI |
_upper
|
protected boolean |
_zeroIntercept
|
Constructor Summary | |
LinearRegression(GeneralLinearModelI glm)
Initialize the regression with an explicit general linear model. |
|
LinearRegression(VectorI dependent,
MatrixI independent)
Initialize the regression with the sample data. |
Method Summary | |
int[] |
allVariables()
A convenience method that returns an array that selects all of the independent variables. |
VectorI |
getCoefficients()
Returns the selected variable coefficients. |
double |
getEnteringThreshold()
Returns the p-value threshold used to select entering variables. |
int[] |
getEnteringVariables()
Returns the internal array describing entering variable set. |
double |
getExitingThreshold()
Returns the p-value threshold used to select exiting variables. |
double |
getF()
Returns the 'F' statistic for the currrent model. |
double |
getFPV()
Returns the one-sided p-value for the current 'F' statistic. |
GeneralLinearModelI |
getGLM()
Returns the underlying general linear model used for solving the regression. |
VectorI |
getLowerBounds(double confidenceLevel)
Returns the selected variable lower bounds. |
int[] |
getRequiredVariables()
Returns the internal array describing required variable set. |
int[] |
getSelectedVariables()
Returns the internal array describing current variable set. |
VectorI |
getT()
Returns the 'T' statistics for the selected variables. |
VectorI |
getTPV()
Returns the two-sided p-values for the 'T' statistics of the selected variables. |
double |
getTStatistic(double pValue)
Returns the the 'T' statistic for a given p-value; |
VectorI |
getUpperBounds(double confidenceLevel)
Returns the selected variable upper bounds. |
void |
setEnteringThreshold(double pValue)
Sets the p-value threshold used to select entering variables. |
void |
setEnteringVariables(int[] variables)
Selects the set of variables allowed to enter the model. |
void |
setExitingThreshold(double pValue)
Sets the p-value threshold used to select exiting variables. |
void |
setRequiredVarables(int[] variables)
Selects the set of variables that are forced into the final model. |
void |
setSelectedVariables(int[] variables)
Selects the current variable set and and solves the model. |
java.lang.String |
toString()
Creates a report describing fit of the current variables. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected int _m
protected int _n
protected int[] _selectedVariables
protected int[] _requiredVariables
protected int[] _enteringVariables
protected VectorI _dependent
protected VectorI _coef
protected VectorI _upper
protected VectorI _lower
protected VectorI _stdv
protected VectorI _tstat
protected VectorI _tpvalue
protected MatrixI _independent
protected MatrixI _cov
protected GeneralLinearModelI _glm
protected double _exitPValue
protected double _enterPValue
protected double _lastConfidenceLevel
protected double _cfstat
protected boolean _zeroIntercept
Constructor Detail |
public LinearRegression(VectorI dependent, MatrixI independent)
public LinearRegression(GeneralLinearModelI glm)
Method Detail |
public GeneralLinearModelI getGLM()
public int[] allVariables()
public void setEnteringVariables(int[] variables)
public void setRequiredVarables(int[] variables)
public void setEnteringThreshold(double pValue)
public double getEnteringThreshold()
public void setExitingThreshold(double pValue)
public double getExitingThreshold()
public int[] getSelectedVariables()
public int[] getEnteringVariables()
public int[] getRequiredVariables()
public void setSelectedVariables(int[] variables)
public double getF()
public double getFPV()
public VectorI getCoefficients()
public VectorI getLowerBounds(double confidenceLevel)
public VectorI getUpperBounds(double confidenceLevel)
public VectorI getT()
public VectorI getTPV()
public double getTStatistic(double pValue)
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |