Learn R Programming

Rfit (version 0.09)

irlsweights: Function for Iterated Reweighted Least Squares R-type estimates

Description

Function returns the rank-based weights for the IRLS algorithm.

Usage

irlsweights(e, scores, eps = 1e-04)

Arguments

e
residuals
scores
object of class scores
eps
residuals less than this have weights set to 0

Value

  • A vector of weights to used in irls

References

Cheng, K. S. and Hettmansperger, T. P. (1983), Weighted Least-Squares Rank Regression, Communications in Statistics, Part A - Theory and Methods, 12, 1069-1086.

Sievers, J. and Abebe, A. (2004), Rank Estimation of Regression Coefficients Using Iterated Reweighted Least Squares, Journal of Statistical Computation and Simulation, 74, 821-831.

See Also

rfit, jaeckel

Examples

Run this code
##  This is a internal function.  See rfit for user-level examples.

## The function is currently defined as
function (e, scores = wscores, eps = 1e-04) 
{
    r <- rank(e, ties.method = "first")/(length(e) + 1)
    t <- scores@phi(r)
    m <- median(e)
    w <- t/(e - m)
    w[(abs(e - m) < eps) == T] <- 0
    w
  }

Run the code above in your browser using DataLab