| DoubleLeastSqWeightingFunctionAdjustedResiduals Method |
Returns a vector of adjusted residuals for the weighted least
squares problem:
Ax = b.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public DoubleVector AdjustedResiduals(
DoubleVector residuals
)
Public Function AdjustedResiduals (
residuals As DoubleVector
) As DoubleVector
public:
DoubleVector^ AdjustedResiduals(
DoubleVector^ residuals
)
member AdjustedResiduals :
residuals : DoubleVector -> DoubleVector
Parameters
- residuals DoubleVector
- Actual residuals.
Return Value
DoubleVectorAdjusted 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.
See Also