fwdlm | R Documentation |
This function applies the forward search approach to robust analysis in linear regression models.
fwdlm(formula, data, nsamp = "best", x = NULL, y = NULL, intercept = TRUE,
na.action, trace = TRUE)
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 |
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 |
trace |
logical, if |
The function returns an object of class "fwdlm"
with the following components:
call |
the matched call. |
Residuals |
a |
Unit |
a matrix of units added (to a maximum of 5 units) at each step. |
included |
a list with each element containing a vector of units included at each step of the forward search. |
Coefficients |
a |
tStatistics |
a |
CookDist |
a |
ModCookDist |
a |
Leverage |
a |
S2 |
a |
MaxRes |
a |
MinDelRes |
a |
StartingModel |
a |
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
Atkinson, A.C. and Riani, M. (2000), Robust Diagnostic Regression Analysis, First Edition. New York: Springer, Chapters 2-3.
summary.fwdlm
, plot.fwdlm
, fwdsco
, fwdglm
, lmsreg
.
library(MASS)
data(forbes)
plot(forbes, xlab="Boiling point", ylab="Pressure)")
mod <- fwdlm(100*log10(pres) ~ bp, data=forbes)
summary(mod)
## Not run: plot(mod)
plot(mod, 1)
plot(mod, 6, ylim=c(-3, 1000))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.