Skip to contents

The weight is the ratio psi(r)/r of Huber's score function to the residual, so an IRLS step with these weights solves the Huber M-estimating equation. Weights are scale-equivariant.

Usage

Huberw(y, k = 1.345)

Arguments

y

Residuals, already scaled if a scale estimate is used.

k

Tuning constant; 1.345 gives 95 percent normal efficiency.

Value

List with estimate (mean weight), weights, psi, n_downweighted, k, n, method.

Details

Formula: w(r) = 1 if |r| <= k, else k/|r|.

References

Huber (1964), Robust estimation of a location parameter, Annals of Mathematical Statistics 35(1):73-101. doi:10.1214/aoms/1177703732

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Huberw(V)
#> $estimate
#> [1] 0.4138147
#> 
#> $weights
#> [1] 1.0000000 0.6725000 0.4483333 0.3362500 0.2690000 0.2241667 0.1921429
#> [8] 0.1681250
#> 
#> $psi
#> [1] 1.000 1.345 1.345 1.345 1.345 1.345 1.345 1.345
#> 
#> $n_downweighted
#> [1] 7
#> 
#> $k
#> [1] 1.345
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "w(r) = min(1, k/|r|), Huber (1964)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"