0
$\begingroup$

I would like to carry out variation partitioning to see how landscape variables and local variables contribute to variation in species richness. Do I need to centre my data prior to analysis? Furthermore, my local variables are largely dummy coded factors (0|1) how do I approach this?

$\endgroup$
1
$\begingroup$

You don't need to centre the variables for varpart() (either the response or the predictors). If you have your variables coded as factors and not dummy variables, then vegan will create the correct contrasts for you.

So for a variable colour with three levels red, green, and blue, you'd have this as a single factor variable in R with those levels:

levs <- c("red", "green", "blue")
env <- data.frame(colour = factor(sample(levs, 100, replace = TRUE).
                                  levels = levs))

rather than three hand-coded dummy variables

env <- data.frame(colourRed = ...., colourGreen = ...., colourBlue =, ....)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.