lmsglm {forward} | R Documentation |
Forward Search in Generalized Linear Models
Description
This function computes the Least Median Square robust fit for generalized linear models using deviance residuals.
Usage
lmsglm(x, y, family, weights, offset, n.samples = 100, max.samples = 200,
epsilon = 1e-04, maxit = 50, trace = FALSE)
Arguments
x |
a matrix or data frame containing the explanatory variables. |
y |
the response: a vector of length the number of rows of |
family |
a description of the error distribution and link function to be used in the model. See |
weights |
an optional vector of weights to be used in the fitting process. |
offset |
optional, a priori known component to be included in the linear predictor during fitting. |
n.samples |
number of good subsets to fit. It can be a numeric value or |
max.samples |
maximal number of subsets to fit. By default is set to twice |
epsilon |
positive convergence tolerance epsilon. See |
maxit |
integer giving the maximal number of IWLS iterations. See |
trace |
logical, if |
Details
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.
Value
The function returns a list with the following components:
bsb |
a vector giving the best subset found |
dev.res |
a vector giving the deviance residuals for all the observations |
message |
a short message about the status of the algorithm |
model |
the model provided by |
Author(s)
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
References
Atkinson, A.C. and Riani, M. (2000), Robust Diagnostic Regression Analysis, First Edition. New York: Springer, Chapter 6.
See Also
fwdglm
, fwdlm
, lmsreg
, fwdsco
.