drop1.regr {regr} | R Documentation |
drop1.regr
/ add1.regr
performs a test for the suitability
of dropping / adding each term in scope from / to a regression model
fitted by regr
## S3 method for class 'regr' drop1(object, scope = NULL, scale = 0, test = NULL, k = 2, sorted = FALSE, add=FALSE, ...) ## S3 method for class 'regr' add1(object, scope = NULL, scale = 0, test = NULL, k = 2, sorted = FALSE, ...)
object |
a fitted model object |
scope |
a formula giving the terms to be considered for dropping
or adding.
It defaults to the terms in the |
scale |
an estimate of the error variance if applicable. Will be recalculated from the fit if ==0 or NULL |
test |
see |
k |
the penalty constant in AIC / Cp |
sorted |
if TRUE, the result is sorted according to the AIC or, if absent, the p value |
add |
converts |
... |
further arguments passed to the model specific methods |
A data.frame of class '"anova"' summarizing the differences in fit
between the models obtained by dropping or adding the terms and the
original model given by object
Werner A. Stahel, ETH Zurich
data(d.blast, package="plgraphics") t.r <- regr(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast) drop1(t.r) add1(t.r)