[R-sig-eco] correlation between dissimilarity matrices

Martin Weiser weiser2 at natur.cuni.cz
Wed May 21 22:36:21 CEST 2014


Hi, 

If I got it right, you have:
a, dissimilarity ("distance") measures
b, some (noisy?) environmental variables, so you do not want
multivariate regression regression analogue, but you are interested in
multivariate correlation analogue (roles of the predictor matrix and
response matrix can be swapped freely)
c, some grouping factor (localities), which you want to get rid of.

As far as I know (and as you may seen here or in other fora, I am
frequently not the best source of knowledge), there are basically 3 main
ways how to do this:

1-most direct) some "coco-" technique (eg. cocorespondence analysis) -
although I do not know if current implementations (ade4, cocorresp)
handle pure distances and are able to partiall out the effect of groups

2-not so direct (but I would try this first): using vegan (sorry ade
guys, I just know vegan better), run partial ordination of taxonomic
community structure  and another partial ordination of environmental
variables. If you have just distances, you are (AFAIK) bound to use
capscale (constrained PCoA) like this:
ord1 <- capscale(taxodist~1 + Condition(locality))
ord2 <- capscale(envdist~1 + Condition(locality))

Then compare the ordinations using Procrustes test:
result<-protest(ord1,ord2)

Advantage: this can be set to care mainly about main ordination axes.

If you have full matrices ("samples" as rows, env. vars or "species" as
columns), you may use other ordination techniques, like CCA (CA) or RDA
(PCA) instead of CAP. In that case you can just replace "capscale" with
"cca" or "rda" 

3-also direct, but I am not familiar with it: mantel (from the vegan
package) can handle "partial" dissimilarities. In permutation test, this
is simply handled by "strata" argument. There is also something called
partial.mantel - this seems to be useful if you have not just
"factorial" locations, but also their distances and want to get rid of
their effect (?).

HTH (and that someone will correct me if I am wrong).

Best,
Martin





here I see two (three) main options:
option zero: since you have dissimilarities and not 
a, following Paolo's suggestion: run two (partial) ordinations: Paolo
Piras píše v St 21. 05. 2014 v 19:18 +0000:
> Hi Carlos
> Very briefly...
> you could look at rda() in vegan (not that in calibrate)
> partial and constrianed rda seems to be appropriate for your case.
> Maybe you should code a bit for controlling your nested stratification variable even if it is not very clear to me the nature of the data (sites vs location)
> I mean.. how exactly they are structured?
> best
> paolo
> 
> 
> 
> ________________________________________
> Da: r-sig-ecology-bounces at r-project.org <r-sig-ecology-bounces at r-project.org> per conto di Carlos <liuca16 at hotmail.com>
> Inviato: mercoledì 21 maggio 2014 20.57
> A: r-sig-ecology at r-project.org
> Oggetto: [R-sig-eco] correlation between dissimilarity matrices
> 
> Hello, I am working with two dissimilarity matrices containing
> dissimilarities in taxonomic community structure and environmental
> variables, respectively, between different sites. Those sites are grouped in
> three different locations. I know I can obtain the correlation between both
> matices by using a Mantel test. However, I would also like to know the
> correlation between both matrices after removing the effect of the
> dissimilarities between locations, i.e. only considering the dissimilarties
> within locations. How could I do it?
> 
> Thank you very much,
> 
> Carlos
> 
> 
> 
> --
> View this message in context: http://r-sig-ecology.471788.n2.nabble.com/correlation-between-dissimilarity-matrices-tp7578910.html
> Sent from the r-sig-ecology mailing list archive at Nabble.com.
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology




-- 

------------------------------
Pokud je tento e-mail součástí obchodního jednání, Přírodovědecká fakulta 
Univerzity Karlovy v Praze:
a) si vyhrazuje právo jednání kdykoliv ukončit a to i bez uvedení důvodu,
b) stanovuje, že smlouva musí mít písemnou formu,
c) vylučuje přijetí nabídky s dodatkem či odchylkou,
d) stanovuje, že smlouva je uzavřena teprve výslovným dosažením shody na 
všech náležitostech smlouvy.



More information about the R-sig-ecology mailing list