Mreg: Mreg computes the M-estimates of regression using an...

View source: R/Regression.R

MregR Documentation

Mreg computes the M-estimates of regression using an auxiliary scale estimate. It uses the iterative reweighted least squares (IRWLS) algorithm

Description

Mreg computes the M-estimates of regression using an auxiliary scale estimate. It uses the iterative reweighted least squares (IRWLS) algorithm

Usage

Mreg(y, X, lossfun = "huber", b0 = NULL, verbose = F)

Arguments

y

: (numeric) data vector of size N (output, response vector)

X

: (numeric) data matrix of size N x p (input, feature matrix) If the model has intercept, then first column of X should be a vector of ones.

lossfun

: (string) either 'huber' or 'tukey' to identify the desired loss function. Default is 'huber'

b0

: (numeric) Optional robust initial start (regression vector) of iterations. If not given, we use the LAD regression estimate

verbose:

(logical) true of false (default). Set as true if you wish to see convergence as iterations evolve.

Value

b1 : regression parameters

sig: scale

Examples

Mreg(1:5, matrix(-1:3))
Mreg(1:5, matrix(-1:3), lossfun = 'tukey')

Mufabo/Rrobustsp documentation built on June 11, 2022, 10:41 p.m.