Remi
Remi

Reputation: 11

variable forward selection for partial ordination with vegan

Is there a way to perform a variable reduction for a partial canonical ordination (either redundancy analysis or correspondence analysis) with the function ordistep from the package vegan ? I checked Borcard et al. (2011) Numerical Ecology with R and I could not find an answer. I tried the following syntax and it returned the next error :

Error in formula.default(prda1) : invalid formula

prda1 <- rda(spp.h, env.partial, avu.rda)

rda.ordistep <- ordistep(rda(spp ~ 1, data = env), 
scope = formula(partial.rda), 
direction= "forward", 
pstep=10000, 
trace = FALSE)

?

Upvotes: 1

Views: 922

Answers (1)

Jari Oksanen
Jari Oksanen

Reputation: 3682

When you have partial ordination in ordistep, you must have the partial term in the lower scope. The following example will work with data(dune, dune.env) in vegan

require(vegan)
data(dune, dune.env)
m0 <- rda(dune ~ Condition(Management), dune.env)
m1 <- rda(dune ~ Condition(Management) + ., dune.env)
m <- ordistep(m0, scope = list(lower=m0, upper=m1))

If you do not have Condition(Management) in the lower scope, it would be treated as any other variable and considered for removal, or if starting model does not have Condition(Management), it is treated as any other candidate, but can never be added.

Upvotes: 1

Related Questions