public class LMResiduals extends Object
Constructor and Description |
---|
LMResiduals(LMProblem problem,
Vector fitted)
Performs residual analysis for a linear regression problem.
|
Modifier and Type | Method and Description |
---|---|
double |
AR2()
Gets the diagnostic measure: adjusted R-squared
|
int |
df()
Gets the degree of freedom.
|
ImmutableVector |
fitted()
Gets the fitted values, y^.
|
double |
Fstat()
Gets the diagnostic measure: F statistics
|
LMProblem |
getProblem()
Gets the linear regression problem.
|
ImmutableMatrix |
hHat()
Gets the projection matrix, H-hat.
|
ImmutableVector |
leverage()
Gets the leverage.
|
double |
R2()
Gets the diagnostic measure: R-squared.
|
ImmutableVector |
residuals()
Gets the residuals, ε, the differences between sample and fitted values.
|
double |
RSS()
Gets the diagnostic measure: sum of squared residuals, \(\sum \epsilon^2\).
|
ImmutableVector |
standardized()
standard residual = residual / v1 / sqrt(RSS / (n-m))
|
double |
stderr()
Gets the standard error of the residuals.
|
ImmutableVector |
studentized()
studentized residual = standardized * sqrt((n-m-1) / (n-m-standardized^2))
|
double |
TSS()
Gets the diagnostic measure: total sum of squares, \(\sum (y-y_mean)^2 \).
|
ImmutableVector |
weightedFittedValues()
Gets the weighted, fitted values.
|
ImmutableVector |
weightedResiduals()
Gets the weighted residuals.
|
public LMProblem getProblem()
public ImmutableVector fitted()
public ImmutableVector residuals()
public ImmutableVector weightedFittedValues()
public ImmutableVector weightedResiduals()
public double RSS()
public double TSS()
public double R2()
public double AR2()
public double stderr()
public double Fstat()
y_i_hat are the fitted values of the regression.mean of regression / mean squared error = sum((y_i_hat-y_mean)^2) / mean squared error = [(TSS-RSS)/n] / [RSS/(m-n)]
public ImmutableMatrix hHat()
public ImmutableVector leverage()
public ImmutableVector standardized()
public ImmutableVector studentized()
public int df()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.