fwdsco: Forward Search Transformation in Linear Regression In forward: Robust Analysis using Forward Search

 fwdsco R Documentation

Forward Search Transformation in Linear Regression

Description

This function applies the forward search approach to the Box-Cox transformation of response in linear regression models.

Usage

```fwdsco(formula, data, nsamp = "best", lambda = c(-1, -0.5, 0, 0.5, 1),
x = NULL, y = NULL, intercept = TRUE, na.action, trace = TRUE)
```

Arguments

 `formula` a symbolic description of the model to be fit. The details of the model are the same as for lm. `data` an optional data frame containing the variables in the model. By default the variables are taken from the environment from which the function is called. `nsamp` the initial subset for the forward search in linear regression is found by fitting the regression model with the R function `lmsreg`. This argument allows to control how many subsets areused in the Least Median of Squares regression. The choices are: the number of samples or `"best"` (the default) or `"exact"` or `"sample"`. For details see `lmsreg`. `lambda` a vector (or a single numerical value) of lambda values for the response transformation. `x` A matrix of predictors values (if no formula is provided). `y` A vector of response values (if no formula is provided). `intercept` Logical for the inclusion of the intercept (if no formula is provided). `na.action` a function which indicates what should happen when the data contain `NA`'s. The default is set by the `na.action` setting of `options`, and is `na.fail` if that is unset. The default is `na.omit`. `trace` logical, if `TRUE` a message is printed for every ten iterations completed during the forward search.

Value

The function returns an object of class`"fwdsco"` with the following components:

 `call` the matched call. `Likelihood` a ((n-p+1) x n.lambda) matrix of likelihood values. `ScoreTest` a ((n-p+1) x n.lambda) matrix of score test statistic values. `Unit` a list with an element for each lambda values. Each element provides a matrix of units added (to a maximum of 5 units) at each step of the forward search. `Input` a list with n, p and the vector of lambda values used. `x` The design matrix. `y` The vector for the response.

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 4.

`summary.fwdsco`, `plot.fwdsco`, `fwdlm`, `fwdglm`.

Examples

```data(wool)
mod <- fwdsco(y ~ x1 + x2 + x3, data = wool)
summary(mod)
plot(mod, plot.mle=FALSE)
plot(mod, plot.Sco=FALSE, plot.Lik=TRUE)
```

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