|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.regression.linear.Residuals
com.numericalmethod.suanshu.stats.regression.linear.ols.Residuals
public class Residuals
Residual analysis of the results of an Ordinary Least Square linear regression model.
Once a regression model has been constructed, it may be important to confirm the goodness of fit of the model and the statistical significance of the estimated parameters. Commonly used checks of goodness of fit include the R-squared, analysis of the pattern of residuals and hypothesis testing. Statistical significance can be checked by an F-test of the overall fit, followed by t-tests of individual parameters.
| Field Summary | |
|---|---|
double |
AR2
diagnostic measure: the adjusted R-squared |
double |
f
diagnostic measure: F statistics mean of regression / mean squared error = sum((y_i_hat-y_mean)^2) / mean squared error [(TSS-RSS)/n] / [RSS/(m-n)] y_i_hat are the fitted values of the regression. |
ImmutableMatrix |
hHat
projection matrix H-hat |
ImmutableVector |
leverage
leverage; the bigger the leverage for an observation, the bigger influence on the prediction |
double |
R2
diagnostic measure: the R-squared |
double |
RSS
diagnostic measure: the sum of squared residuals, Σ(ε^2) |
double |
stderr
the standard error of the residuals |
double |
TSS
diagnostic measure: the total sum of squares, Σ((y-y_mean)^2) |
ImmutableVector |
wFitted
the weighted, fitted values |
ImmutableVector |
wResiduals
the weighted residuals |
| Fields inherited from class com.numericalmethod.suanshu.stats.regression.linear.Residuals |
|---|
fitted, problem, residuals |
| Method Summary | |
|---|---|
ImmutableVector |
standardized()
standard residual = residual / v1 / RSS / (m-n) |
ImmutableVector |
studentized()
studentized residual = standardized * sqrt((m-n-1) / (n-m-standardized)) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final ImmutableVector wFitted
public final ImmutableVector wResiduals
public final double stderr
public final double RSS
public final double TSS
public final double R2
public final double AR2
public final double f
mean of regression / mean squared error = sum((y_i_hat-y_mean)^2) / mean squared error [(TSS-RSS)/n] / [RSS/(m-n)]y_i_hat are the fitted values of the regression.
public final ImmutableMatrix hHat
public final ImmutableVector leverage
| Method Detail |
|---|
public ImmutableVector standardized()
public ImmutableVector studentized()
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||