|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpapaya.Linear.StdErr
public static class Linear.StdErr
Contains methods related to computing the standard errors of the residuals, slope and intercept associated with the best-fit linear line.
Method Summary | |
---|---|
static float |
intercept(float[] x,
float residualStdErr)
Returns the standard error of the computed slope given x and the standard error in the residuals. |
static float |
residual(float[] residuals,
int df)
Returns the standard error of the residuals given the degrees of freedom. |
static float |
slope(float[] x,
float residualStdErr)
Returns the standard error of the computed slope given x and the standard error in the residuals. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float residual(float[] residuals, int df)
residualStdErr = Sqrt ( Sum( (delta[i] - mean(delta))^2 ) / df )where df is the degrees of freedom ( (n-1) if the y-intercept was pre-specified in the best-fit line, (n-2) if neither slope nor intercept were specified.)
residuals
- df
-
public static float slope(float[] x, float residualStdErr)
slopeStdErr = residualStdErr / Sum ( (x[i] - mean(x))^2 ).
x
- the independent variableresidualStdErr
- the standard error of the residual
public static float intercept(float[] x, float residualStdErr)
interceptStdErr = slopeStdErr / Sqrt( Sum(x[i]*x[i])/size ).where the slopeStdErr is computed using the methods specified in
slope(float[], float)
.
x
- the independent variableresidualStdErr
- the standard error of the residual
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |