Description Usage Arguments Details Value Author(s) See Also Examples
Compute all single terms that can be added to or dropped from a constrained ordination model.
1 2 3 4 5 6  ## S3 method for class 'cca'
add1(object, scope, test = c("none", "permutation"),
permutations = how(nperm=199), ...)
## S3 method for class 'cca'
drop1(object, scope, test = c("none", "permutation"),
permutations = how(nperm=199), ...)

object 
A constrained ordination object from

scope 
A formula giving the terms to be considered for adding
or dropping; see 
test 
Should a permutation test be added using 
permutations 
a list of control values for the permutations
as returned by the function 
... 
Other arguments passed to 
With argument test = "none"
the functions will only call
add1.default
or drop1.default
. With
argument test = "permutation"
the functions will add test
results from anova.cca
. Function drop1.cca
will
call anova.cca
with argument by = "margin"
.
Function add1.cca
will implement a test for single term
additions that is not directly available in anova.cca
.
Functions are used implicitly in step
,
ordiR2step
and ordistep
. The
deviance.cca
and deviance.rda
used in
step
have no firm basis, and setting argument test
= "permutation"
may help in getting useful insight into validity of
model building. Function ordistep
calls alternately
drop1.cca
and add1.cca
with argument
test = "permutation"
and selects variables by their permutation
Pvalues. Meticulous use of add1.cca
and
drop1.cca
will allow more judicious model building.
The default perm.max
is set to a low value, because
permutation tests can take a long time. It should be sufficient to
give a impression on the significances of the terms, but higher
values of perm.max
should be used if P values really
are important.
Returns a similar object as add1
and drop1
.
Jari Oksanen
add1
, drop1
and
anova.cca
for basic methods. You probably need these
functions with step
and ordistep
. Functions
deviance.cca
and extractAIC.cca
are used
to produce the other arguments than test results in the
output. Functions cca
, rda
and
capscale
produce result objects for these functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  data(dune)
data(dune.env)
## Automatic model building based on AIC but with permutation tests
step(cca(dune ~ 1, dune.env), reformulate(names(dune.env)), test="perm")
## see ?ordistep to do the same, but based on permutation Pvalues
## Not run:
ordistep(cca(dune ~ 1, dune.env), reformulate(names(dune.env)), perm.max=200)
## End(Not run)
## Manual model building
##  define the maximal model for scope
mbig < rda(dune ~ ., dune.env)
##  define an empty model to start with
m0 < rda(dune ~ 1, dune.env)
##  manual selection and updating
add1(m0, scope=formula(mbig), test="perm")
m0 < update(m0, . ~ . + Management)
add1(m0, scope=formula(mbig), test="perm")
m0 < update(m0, . ~ . + Moisture)
##  included variables still significant?
drop1(m0, test="perm")
add1(m0, scope=formula(mbig), test="perm")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.