drasys.or.stat.model
Interface GeneralLinearModelI

All Known Implementing Classes:
GeneralLinearModel

public interface GeneralLinearModelI

The interface implemented by general linear models.


Method Summary
 VectorI getCoefficients()
          Returns the solution coefficients.
 VectorI getDependent()
          Returns the dependent vector.
 int getDFE()
          Returns the number of degrees of freedom for the errors.
 int getDFR()
          Returns the number of degrees of freedom for the regression.
 int getDFT()
          Returns the total number of degrees.
 MatrixI getIndependent()
          Returns the independent matrix.
 MatrixI getInverseXX()
          Returns the X'X inverse matrix.
 double getMSE()
          Returns the mean of the squares of the error terms.
 double getMSR()
          Returns the mean of the squares of the computed dependent values.
 double getMST()
          Returns the mean of the squares of the sampled dependent values.
 double getRSquared()
          Returns R^2.
 double getSSE()
          Returns the sum of the squares of the error terms.
 double getSSR()
          Returns the sum of the squares of the computed dependent values.
 double getSST()
          Returns the sum of the squares of the sampled dependent values.
 VectorI getStandardErrors()
          Returns the standard errors of the fitted independent variables.
 VectorI solve()
          Solve for the fitting coefficients using all of the independent variables.
 VectorI solve(boolean forceZeroIntercept)
          Solve for the fitting coefficients using all of the independent variables.
 VectorI solve(boolean forceZeroIntercept, int[] columnSelection)
          Solve for the coefficients using only the dependent columns listed in 'columnSelection'.
 

Method Detail

solve

public VectorI solve()
Solve for the fitting coefficients using all of the independent variables. This is equivalent to 'columnSelection' = {0,1,2,...}. The fitting line is allowed to cross the dependent axis away from the origin. and the intercept term will be the last value in the solution vector.

solve

public VectorI solve(boolean forceZeroIntercept)
Solve for the fitting coefficients using all of the independent variables. This is equivalent to 'columnSelection' = {0,1,2,...}. If 'forceZeroIntercept' is true, the fitted line will be forced to cross the dependent axis at the origin and the intercept value will NOT appear at the end of the solution vector. Otherwise; The fitting line is allowed to cross the dependent axis away from the origin. and the intercept term will be the last value in the solution vector.

solve

public VectorI solve(boolean forceZeroIntercept,
                     int[] columnSelection)
Solve for the coefficients using only the dependent columns listed in 'columnSelection'. The resluting coefficients will be ordered to match 'columnSelection'. If 'forceZeroIntercept' is true, the fitted line will be forced to cross the dependent axis at the origin and the intercept value will NOT appear at the end of the solution vector. Otherwise; The fitting line is allowed to cross the dependent axis away from the origin. and the intercept term will be the last value in the solution vector.

getDependent

public VectorI getDependent()
Returns the dependent vector.

getIndependent

public MatrixI getIndependent()
Returns the independent matrix.

getCoefficients

public VectorI getCoefficients()
Returns the solution coefficients. The coefficient at index 'n' corresponds to the column indexed by 'columnSelection[n]'. If a constant intercept term is included, its value will be in the last element.

getStandardErrors

public VectorI getStandardErrors()
Returns the standard errors of the fitted independent variables. If a constant intercept term is included, its standard error will be in the last element.

getInverseXX

public MatrixI getInverseXX()
Returns the X'X inverse matrix. If a constant intercept term is included, it will occupy the last row and column.

getRSquared

public double getRSquared()
Returns R^2. R^2 = ModelSumOfSquares()/TotalSumOfSquares();

getSST

public double getSST()
Returns the sum of the squares of the sampled dependent values. SST = SSR + SSE.

getSSE

public double getSSE()
Returns the sum of the squares of the error terms. The error terms are the differences between the sampled and computed dependent values. SST = SSR + SSE.

getSSR

public double getSSR()
Returns the sum of the squares of the computed dependent values. SST = SSR + SSE.

getDFR

public int getDFR()
Returns the number of degrees of freedom for the regression.

getDFE

public int getDFE()
Returns the number of degrees of freedom for the errors.

getDFT

public int getDFT()
Returns the total number of degrees.

getMST

public double getMST()
Returns the mean of the squares of the sampled dependent values. MST = SST/DFT.

getMSE

public double getMSE()
Returns the mean of the squares of the error terms. The error terms are the differences between the sampled and computed dependent values. MSE = SSE/DFE.

getMSR

public double getMSR()
Returns the mean of the squares of the computed dependent values. MSR = SSR/DFR.


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com