|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jet.regression.estimators.AbstractMultipleLinearRegressionEstimator
org.codehaus.jet.regression.estimators.GLSMultipleLinearRegressionEstimator
public class GLSMultipleLinearRegressionEstimator
The GLS implementation of the multiple linear regression GLS assumes a general covariance matrix Omega of the error
u ~ N(0, Omega)Estimated by GLS,
b=(X' Omega^-1 X)^-1X'Omega^-1 ywhose variance is
Var(b)=(X' Omega^-1 X)^-1
Field Summary |
---|
Fields inherited from class org.codehaus.jet.regression.estimators.AbstractMultipleLinearRegressionEstimator |
---|
X, Y |
Constructor Summary | |
---|---|
GLSMultipleLinearRegressionEstimator()
|
Method Summary | |
---|---|
protected void |
addCovarianceData(double[][] omega)
Add the covariance data |
void |
addData(double[] y,
double[][] x,
double[][] covariance)
Adds sample and covariance data |
protected org.apache.commons.math.linear.RealMatrix |
calculateBeta()
Calculates beta by GLS: |
protected org.apache.commons.math.linear.RealMatrix |
calculateBetaVariance()
Calculates the variance on the beta by GLS: |
protected double |
calculateYVariance()
Calculates the variance on the y by GLS: |
Methods inherited from class org.codehaus.jet.regression.estimators.AbstractMultipleLinearRegressionEstimator |
---|
addXSampleData, addYSampleData, calculateResiduals, estimateRegressandVariance, estimateRegressionParameters, estimateRegressionParametersVariance, estimateResiduals |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GLSMultipleLinearRegressionEstimator()
Method Detail |
---|
public void addData(double[] y, double[][] x, double[][] covariance)
MultipleLinearRegressionEstimator
y
- the [n,1] array representing the y samplex
- the [n,k] array representing x samplecovariance
- the [n,n] array representing the covariance matrix or null
if not appropriate for the
specific implementationprotected void addCovarianceData(double[][] omega)
omega
- the [n,n] array representing the covarianceprotected org.apache.commons.math.linear.RealMatrix calculateBeta()
b=(X' Omega^-1 X)^-1X'Omega^-1 y
calculateBeta
in class AbstractMultipleLinearRegressionEstimator
protected org.apache.commons.math.linear.RealMatrix calculateBetaVariance()
Var(b)=(X' Omega^-1 X)^-1
calculateBetaVariance
in class AbstractMultipleLinearRegressionEstimator
protected double calculateYVariance()
Var(y)=Tr(u' Omega^-1 u)/(n-k)
calculateYVariance
in class AbstractMultipleLinearRegressionEstimator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |