This function computes the Least Median Square robust fit for generalized linear models using deviance residuals.
lmsglm(x, y, family, weights, offset, n.samples = 100, max.samples = 200,
epsilon = 1e-04, maxit = 50, trace = FALSE)
The function returns a list with the following components:
a vector giving the best subset found
a vector giving the deviance residuals for all the observations
a short message about the status of the algorithm
the model provided by glm.fit
using the units in the best subset found
a matrix or data frame containing the explanatory variables.
the response: a vector of length the number of rows of x
.
a description of the error distribution and link function to be used in the model. See family
for details.
an optional vector of weights to be used in the fitting process.
optional, a priori known component to be included in the linear predictor during fitting.
number of good subsets to fit. It can be a numeric value or "all"
.
maximal number of subsets to fit. By default is set to twice n.samples
.
positive convergence tolerance epsilon. See glm.control
for details.
integer giving the maximal number of IWLS iterations. See glm.control
for details.
logical, if TRUE
a message is printed for every ten iterations completed during the search.
Originally written for S-Plus by:
Kjell Konis kkonis@insightful.com and Marco Riani mriani@unipr.it
Ported to R by Luca Scrucca luca@stat.unipg.it
This function is used by fwdglm
to select the
starting subset for the forward search. For this reason, users do not
generally need to use it.
Atkinson, A.C. and Riani, M. (2000), Robust Diagnostic Regression Analysis, First Edition. New York: Springer, Chapter 6.
fwdglm
, fwdlm
, lmsreg
, fwdsco
.