Compute Allowed Changes in Adding to or Dropping from a Formula
drop.scope compute those terms that can be
individually added to or dropped from a model while respecting the
hierarchy of terms.
- the terms or formula for the base model.
- the terms or formula for the upper (
add.scope) or lower (
drop.scope) scope. If missing for
drop.scopeit is taken to be the null formula, so all terms (except any intercept) are candidates to be dropped.
"factor"attribute of the terms of the base object.
- a list with one or both components
"factor"attribute of the lower and upper scopes respectively.
factor.scope is not intended to be called directly by users.
drop.scope a character vector of
terms labels. For
factor.scope, a list with components
add, character vectors of terms labels.
add.scope( ~ a + b + c + a:b, ~ (a + b + c)^3) #  "a:c" "b:c" drop.scope( ~ a + b + c + a:b) #  "c" "a:b"