[R] partitioning variation using the Vegan CCA routine?

Gavin Simpson gavin.simpson at ucl.ac.uk
Fri Apr 27 15:32:18 CEST 2007

On Fri, 2007-04-27 at 16:03 +1000, Matthew McArthur wrote:
> Hello
> I am using Jari Oksanen's CCA routine from the Vegan package on some estuary
> data, following a technique applied in (Anderson, M.J. & Gribble, N.A.,
> 1998, Partitioning the variation among spatial, temporal and environmental
> components in a multivariate data set, Australian Journal of Ecology 23,
> 158-167).
> Some steps in the process require that the dependent matrix be constrained
> by one independent matrix, given the affect of another independent matrix.
> eg: CCA of species matrix, constrained by the environmental matrix, with
> spatial variables treated as covariables
> or:  CCA of species matrix, constrained by the temporal matrix, with
> environmental and spatial variables treated as covariables
> Does anyone know of a partitioning routine able to perform this feat or have
> suggestions on how I might approach the problem from scratch?

If you can survive with using RDA ( rda() ), then vegan has function
varpart() to do this automagically for you. If you really need CCA, then
perhaps try a standardisation of the raw data so that when you use rda()
via varpart(), what you get is close to something that cca() would
return or is a good compromise for species data - see ?decostand with
method == "chi.square" or "method = "hellinger" in vegan and the cited
reference to see what I'm talking about here.

If you want to do things by hand the old fashioned way, then look at
using Condition(var_x) in your formula:

res <- cca(spp ~ var1 + var2 + Condition(spatial.vars), data = my.data)

see ?cca



> Cheers
> Matt
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
 Gavin Simpson                 [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk

More information about the R-help mailing list