Returns a vector of adjusted residuals for the weighted least
squares problem:
Ax = b.
Namespace:
CenterSpace.NMath.MatrixAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public DoubleVector AdjustedResiduals( DoubleVector residuals ) |
| Visual Basic (Declaration) |
|---|
Public Function AdjustedResiduals ( _ residuals As DoubleVector _ ) As DoubleVector |
| Visual C++ |
|---|
public: DoubleVector^ AdjustedResiduals( DoubleVector^ residuals ) |
Parameters
- residuals
- Type: CenterSpace.NMath.Core..::.DoubleVector
Actual residuals.
Return Value
Adjusted residuals.
Remarks
Adjusted residuals are computed according to the following formula:
adjustedResiduals = residuals / (tuningConstant*s*sqrt(1 - h)). Where,
h is the vector of leverage values. The leverage values are the main
diagonal of the hat matrix H = A((A'A)^-1)A'.
s is an estimate of the standard deviation of the error term given by:
s = MAD / 0.6745
where MAD is the median absolute deviation of the residuals from
their median. The constant 0.6745 makes the estimate unbiased for the
normal distribution.
tuningConstant is a tuning constant by which the residuals are divided before
computing weights. Decreasing the tuning constant increases the downweight
assigned to large residuals and increasing the tuning constant decreases
the downweight assigned to large residuals.