Click or drag to resize

DoubleLeastSqWeightingFunctionAdjustedResiduals Method

Returns a vector of adjusted residuals for the weighted least squares problem: Ax = b.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public DoubleVector AdjustedResiduals(
	DoubleVector residuals
)

Parameters

residuals  DoubleVector
Actual residuals.

Return Value

DoubleVector
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.
See Also