Drop All Possible Single Terms from or Add Terms to a Model Fitted by regr

Share:

Description

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

Usage

1
2
3
4
5
6
## 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, ...)

Arguments

object

a fitted model object

scope

a formula giving the terms to be considered for dropping or adding.
Defaults to the terms in the 'object's formula for drop1 and to all first order interactions between these and squared terms in the continuous variables for add1 (see terms2order)

scale

an estimate of the error variance if applicable. Will be recalculated from the fit if ==0 or NULL

test

see drop1

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 drop1.regr into an add1 method

...

further arguments passed to the model specific methods

Value

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

Author(s)

Werner A. Stahel, ETH Zurich

See Also

drop1, add1

Examples

1
2
3
4
  data(d.blast)
  t.r <- regr(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast)
  drop1(t.r)
  add1(t.r)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.