rlm: rlm

Description Usage Arguments Details Value Examples

Description

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

Usage

1
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

1
2
3
4
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)

Example output

          [,1]      [,2]
[1,]  1.878947 0.5631579
[2,] -1.747368 3.0421053

rlm documentation built on May 1, 2019, 6:50 p.m.

Related to rlm in rlm...