Skip to content
Prev 1204 / 7420 Next

Two questions about "vegan"

Dear Omid Paknia,
On 20/04/10 18:41 PM, "o paknia" <opaknia at yahoo.com> wrote:

            
Yes, data frame will work (you can try this).
So you have only one dependent variable? You can turn this into
dissimilarities or distances, but this sounds a bit unnatural to my taste.
You could use some other methods that can cope with univariate dependent
variables, such as lm, glm, gam...
Two comments comments:
1) a matrix (but not a data frame!) can be a term in an rda (or cca)
formula: see the example in the documentation of varpart which explicitly
says so.
2) you can have anova.cca(..., by = "axis") in partial models with Condition
in the formula. 

You can try

r <- rda(decostand(com, "hell") ~ as.matrix(environment) +
Condition(as.matrix(space)))
anova(r, by = "axis")

Please remember that data.frame won't work, and therefore you may need the
explicit cast to matrix.

If you have factors in your environmental variables, you need to use

r <- rda(decostand(com, "hell") ~ . + Condition(as.matrix(space)),
environment)

where "." in the rhs of the formula expands to all variables of
data=environment with appropriate handling of factors.
The third argument of rda.formula is 'scale', so that your model expands to

rda(fomrula = decostand(comm, "hell") ~rain+temp+hum, data = environment,
scale = space)

It is this setting scale = space that causes the error message you got from
scale.default. 
 
HTH, Jari Oksanen