Learn R Programming

RobRSVD (version 1.0)

huberWeightLS: Huber's function

Description

This function provides the usual Huber's weight function in Robust estimation context. See Huber (1981) for details. Let $\rho(x)$ be the usual Huber's function, this function is $\rho'(x)/x$, where $\rho'(x)$ is the derivative of $\rho(x)$.

Usage

huberWeightLS(data, k)

Arguments

Value

the weight vector or matrix for Huber-type robust regression

Details

See details of the huber weights in iterative least squares in the references

References

Huber, P. J. (1981). Robust statistics. Wiley series in probability and mathematical statistics.

Examples

Run this code
#generate a t distrbution matrix
x<-matrix(rt(100, 1), nrow=10)

#generate the huber weight matrix with k=1.345
y=huberWeightLS(x, k=1.345)

Run the code above in your browser using DataLab