Choose a Model by Permutation Tests in Constrained Ordination
Automatic stepwise model building for constrained ordination methods
ordistep is modelled after
can do forward, backward and stepwise model selection using permutation tests.
ordiR2step performs forward model choice solely on adjusted
R2 and P-value, for ordination objects created by
1 2 3 4 5 6
ordistep(object, scope, direction = c("both", "backward", "forward"), Pin = 0.05, Pout = 0.1, permutations = how(nperm = 199), steps = 50, trace = TRUE, ...) ordiR2step(object, scope, direction = c("both", "forward"), Pin = 0.05, R2scope = TRUE, permutations = how(nperm = 499), trace = TRUE, R2permutations = 1000, ...)
Defines the range of models examined in the stepwise search.
This should be either a single formula, or a list containing
The mode of stepwise search, can be one of
Limits of permutation P-values for adding (
Use adjusted R2 as the stopping criterion: only models with lower adjusted R2 than scope are accepted.
a list of control values for the permutations as
returned by the function
Maximum number of iteration steps of dropping and adding terms.
If positive, information is printed during the model building. Larger values may give more information.
Number of permutations used in the estimation of
adjusted R2 for
Any additional arguments to
The basic functions for model choice in constrained ordination are
drop1.cca. With these functions,
ordination models can be chosen with standard R function
step which bases the term choice on AIC. AIC-like
statistics for ordination are provided by functions
similar functions for
rda). Actually, constrained
ordination methods do not have AIC, and therefore the
may not be trusted. This function provides an alternative using
ordistep defines the model,
scope of models
direction of the procedure similarly as
step. The function alternates with
add steps and stops when the model was not changed during one
+ signs in the summary
table indicate which stage is performed. The number of permutations
is selected adaptively with respect to the defined decision limit. It
is often sensible to have
Pin in stepwise
models to avoid cyclic adds and drops of single terms.
ordiR2step builds model so that it maximizes
adjusted R2 (function
RsquareAdj) at every
step, and stopping when the adjusted R2 starts to
decrease, or the adjusted R2 of the
exceeded, or the selected permutation P-value is exceeded
(Blanchet et al. 2008). The second criterion is ignored with option
R2step = FALSE, and the third criterion can be ignored
Pin = 1 (or higher). The
"both", but it is very
exceptional that a term is dropped with the adjusted R2
criterion. Adjusted R2 cannot be calculated if the number
of predictors is higher than the number of observations, but such
models can be analysed with
R2scope = FALSE. The
cca is based on simulations (see
RsquareAdj) and different runs of
can give different results.
ordistep (based on P values) and
(based on adjusted R2 and hence on eigenvalues) can select
variables in different order.
Functions return the selected model with one additional
anova, which contains brief information of steps
taken. You can suppress voluminous output during model building by
trace = FALSE, and find the summary of model history
Blanchet, F. G., Legendre, P. & Borcard, D. (2008) Forward selection of explanatory variables. Ecology 89, 2623–2632.
The function handles constrained ordination methods
capscale. The underlying functions
drop1.cca, and the
function is modelled after standard
step (which also can
be used directly but uses AIC for model choice, see
ordiR2step builds upon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
## See add1.cca for another example ### Dune data data(dune) data(dune.env) mod0 <- rda(dune ~ 1, dune.env) # Model with intercept only mod1 <- rda(dune ~ ., dune.env) # Model with all explanatory variables ## With scope present, the default direction is "both" ordistep(mod0, scope = formula(mod1), perm.max = 200) ## Example without scope. Default direction is "backward" ordistep(mod1, perm.max = 200) ## Example of ordistep, forward ## Not run: ordistep(mod0, scope = formula(mod1), direction="forward", perm.max = 200) ## End(Not run) ### Mite data data(mite) data(mite.env) mite.hel = decostand(mite, "hel") mod0 <- rda(mite.hel ~ 1, mite.env) # Model with intercept only mod1 <- rda(mite.hel ~ ., mite.env) # Model with all explanatory variables ## Example of ordiR2step with default direction = "both" ## (This never goes "backward" but evaluates included terms.) step.res <- ordiR2step(mod0, mod1, perm.max = 200) step.res$anova # Summary table ## Example of ordiR2step with direction = "forward" ## Not run: step.res <- ordiR2step(mod0, scope = formula(mod1), direction="forward") step.res$anova # Summary table ## End(Not run)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.