factor.scope {stats} | R Documentation |
add.scope
and drop.scope
compute those terms that can be
individually added to or dropped from a model while respecting the
hierarchy of terms.
add.scope(terms1, terms2)
drop.scope(terms1, terms2)
factor.scope(factor, scope)
terms1 |
the terms or formula for the base model. |
terms2 |
the terms or formula for the upper ( |
factor |
the |
scope |
a list with one or both components |
factor.scope
is not intended to be called directly by users.
For add.scope
and drop.scope
a character vector of
terms labels. For factor.scope
, a list with components
drop
and add
, character vectors of terms labels.
add1
, drop1
,
aov
, lm
add.scope( ~ a + b + c + a:b, ~ (a + b + c)^3)
# [1] "a:c" "b:c"
drop.scope( ~ a + b + c + a:b)
# [1] "c" "a:b"