lmsglm: Forward Search in Generalized Linear Models

lmsglmR 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 x.

family

a description of the error distribution and link function to be used in the model. See family for details.

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 "all".

max.samples

maximal number of subsets to fit. By default is set to twice n.samples.

epsilon

positive convergence tolerance epsilon. See glm.control for details.

maxit

integer giving the maximal number of IWLS iterations. See glm.control for details.

trace

logical, if TRUE a message is printed for every ten iterations completed during the search.

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 glm.fit using the units in the best subset found

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.


forward documentation built on May 9, 2022, 9:05 a.m.

Related to lmsglm in forward...