ladreg: ladreg

View source: R/Regression.R

ladregR Documentation

ladreg

Description

ladreg computes the LAD regression estimate

Usage

ladreg(y, X, intcpt = T, b0 = NULL, printitn = 0)

Arguments

y:

numeric response N vector (real/complex)

X:

numeric feature N x p matrix (real/complex)

intcpt:

(logical) flag to indicate if intercept is in the model

b0:

numeric optional initial start of the regression vector for IRWLS algorithm. If not given, we use LSE (when p>1).

printitn:

print iteration number (default = 0, no printing) and other details

Value

b1: (numberic) the regression coefficient vector

iter: (numeric) # of iterations (given when IRWLS algorithm is used)

Note

file location: Regression.R

Examples

ladreg(rnorm(5), matrix(rnorm(5)))

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