public class Residuals extends Residuals
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.
| Modifier and Type | Field and Description |
|---|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
ImmutableVector |
standardized()
standard residual = residual / v1 / sqrt(RSS / (n-m))
|
Vector |
studentized()
studentized residual = standardized * sqrt((n-m-1) / (n-m-standardized^2))
|
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
public ImmutableVector standardized()
public Vector studentized()