rlm {rlm}R Documentation

rlm

Description

Fit a linear model by robust regression taking response in matrix form.

Usage

rlm(formula, weights, acc = 0.01)

Arguments

formula

a formula of the form y ~ x1 + x2 + ....

weights

a vector of prior weights for each case.

acc

the accuracy for the stopping criterion.

Details

Fitting is done by iterated re-weighted least squares (IWLS).

Value

matrix of coefficients

Examples

y <- matrix( c(2, 4, 3, 1, 5, 7), nrow=3,  ncol=2) 
x <- c(1, 2, 3)
w <- c(0.9, 0.8, 0.7)
rlm::rlm(y~x, weights = w)

[Package rlm version 1.2 Index]