Mreg | R Documentation |
Mreg computes the M-estimates of regression using an auxiliary scale estimate. It uses the iterative reweighted least squares (IRWLS) algorithm
Mreg(y, X, lossfun = "huber", b0 = NULL, verbose = F)
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. |
b1 : regression parameters
sig: scale
Mreg(1:5, matrix(-1:3)) Mreg(1:5, matrix(-1:3), lossfun = 'tukey')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.