Trying something new for me: using the blog to get help with a technical issue.

Briefly, I did an microcosm metacommunity experiment in which inter-patch dispersal was experimentally controlled. So I know the rates at which species dispersed from any given patch (microcosm) to any other patch. Some of those rates were zero–not all pairs of patches were connected by dispersal. And dispersal was asymmetrical–the rate of dispersal from patch A to B wasn’t the same as the rate from B to A.

I’d like to code up up the dispersal rates in the form of a “distance” matrix. But the problem is, it wouldn’t be a metric distance matrix since it’d be asymmetrical. It’d just play the same role as a metric distance matrix in the analysis I have in mind. That analysis being a partial redundancy analysis, partitioning the variance in species abundances attributable to environmental variation from that attributable to “space” (here, dispersal). Basically, I want to do the same analysis as in Cottenie 2005 EcoLetts (and many subsequent papers by various authors), the difference being that the “distance” between any two of my patches isn’t determined by their geographic coordinates (since they don’t have any), it’s determined by the experimentally-imposed dispersal rates.

But I can’t figure out how to code up my asymmetrical “distance” matrix in a form that works with the rda function in the vegan package in R. Note that I’m pretty sure partial redundancy analysis can be done with a non-metric distance matrix (right?), so I *think* my question here is just a matter of how to get R to do what I want it to do. But I’ve never done any sort of ordination besides PCA, and I only started reading up on redundancy analysis yesterday, and so maybe the problem is that I’m trying to do the impossible. Googling and searching Stack Overflow hasn’t helped, hence my resort to this post.

There’s a beer at the ESA* in it for you if you can help me out, whether in the comments or via email (jefox@ucalgary.ca). Thanks!

*Or equivalent reward

### Like this:

Like Loading...

And Gavin Simpson answers the bell!

The problem is that you don’t have a distance matrix, rather its a directed matrix like a food web with nonsymmetric interaction coefficients. I don’t know that any kind of ordination of that kind of matrix would be useful. But maybe someone else has a better idea.

Yeah, I’m not sure if somehow reducing its dimensionality would help, even if it could be done. I’ll look into it a bit more, but I think I’m going to have to go for some other analysis rather than a constrained ordination.

Dear Jeremy,

I don’t know if will help, but following Peter’s comment, and your idea of reducing the dimensionality, maybe you can calculate each node importance following this procedure: http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1000494, based on Googles search algorithm.

However you will not have a dominant eigenvector because the matrix will probably be not irreducible. Something that you may have to consider is using a damping factor representing passive dispersal for example….or fix the matrix somehow (setting a sink)…. the other problem is that this method only evaluates topology but not the interaction strength (the dispersal rate in your case). You may add this feature following modification of the page Rank Algorithm that gives weights to your nodes. I have been working on this but is still in the very beginning.

Anyway, this may be not what you looking for but I think it may serve as tool to reduce the dimensionality of this kind of matrix.

Cheers

Thanks. A creative idea, but not really suited to what I’m trying to do.

I’m not entirely clear on your goals but it seems that you have three matrices. A distance or similarity matrix computed from the species abundances in each patch, a distance/similarity matrix based on environmental variables measured in each patch, and the asymmetric dispersal matrix. Call these A, E, and D. Effectively it sounds like you want to predict or explain A with E and D. What if you decomposed D into symmetric and asymmetric matrices where D.s is the average of the two cells and D.a is the magnitude of the asymmetry, abs(Dij – Dji). Now just vectorize the lower triangle of the matrices and you have a model A = E + D.s + D.a + interactions. I borrowed the decomposition idea from this paper http://link.springer.com/article/10.1007/s004420000620#page-1.

obviously this doesn’t answer your question but I suggested this as an alternative method for “partitioning the variance in species abundances attributable to environmental variation from that attributable to “space” (here, dispersal)”

+1 Jeff. If Jeremy is only interested in repeating Karl’s analysis, I think the Olden et al approach (or a modification I suggest below [currently awaiting moderation]) would answer the question even if interpretation of the eigenfunctions representing the asymmetric spatial structure, i.e. dispersal, is not straightforward. If all that is needed is a decomposition of variation into spatial (dispersal) and environmental components then what you describe seems like a useful and pragmatic way to address the asymmetric spatial weight matrix problem.

That’s the goal, Jeff. Thanks for the suggested analytical approach. I’d need to think more about how to interpret the output of that analysis in light of the scientific question. This is a new area for me.

Having just had a quick read of the methods in Cottenie (2005), I think that representing your setup as a network with nodes and edges in the sense of spatial eigenfunctions would result in a close analogue to what Karl did. (In one sense, the spatial eigenfunction work superseded the original spatial polynomial ideas of Daniel Borcard & Pierre Legendre, allowing for more flexible modelling of spatial processes.) Techniques to look at and PCNMs (Principal Coordinates of Neighbour Matrices) and MEMs (Moran Eigenvector Maps), plus the Asymmetric Eigenvector Maps (AEMs) of Guillaume Blanchet et al (2008) (references therein will get you to the relevant literature on PCNMs and MEMs).

The complication however is the asymmetry of the edge weighting matrix, W, (the equivalent or your asymmetrical distance). Dray et al (2006) mention that MEMs are for

symmetricW. Furthermore, Blanchet et al’s AEM is defined for avectorof edge weights indicating a one-way process, not the two-way you describe. I am not aware of a solution that has been published that allows for MEMs with an asymmetric spatial weight matrix or AEMs with two-way edge weights.The approach of Olden, Jackson, & Peres-Neto (2001) could be adapted to your situation; they distinguish between upstream (A -> B) and downstream (A B and B -> A, which goes in it’s own matrix. The asymmetric component(Wasym) is the difference between distance A -> B (d(A -> B) and the average distance of (A -> B and B -> A) ( dbar(A, B) ). You can take the absolute value of this as the compliment d(B -> A) – dbar(A, B) is the same in absolute terms. The authors then use separate Principal Coordinates Analyses to reduce the dimensionality of the two distance matrices created into major components of variation. Once you have the low rank principal coordinates of each matrix you can analyse them separately in RDA to model symmetric spatial components and the asymmetrical spatial components. In your case you may want to include the selected principal coordinates from

bothmatrices (symmetric component and asymmetric component) as constraints in the RDA so as to include both aspects of the spatial pattern you are attempting to control for. This assumes that the number of selected coordinates is low(-ish) relative to the dimensionality of the species matrix.This decomposition is interesting as in essence they are doing something very similar to the PCNMs and MEMs (principal coordinates on a symmetric matrix of distance or spatial weights). Olden et al avoid the complication of the asymmetric distance (spatial weight) matrix by decomposing that matrix into two symmetric ones. It occurs to me that you might wish to compute separately MEMs (PCNMs) on Wsym and Wasym, retain the important and relevant eigenfunctions for each and include these together into the RDA. This should be similar to what Olden et al did and I mentioned above, but you’d pick up the benefits and interpretability of the MEM/PCNM eigenfunctions which may be easier to work with than the principal coordinates of the raw Wsym and Wasym matrices.

Thanks for your further thoughts Gavin. You’re going above and beyond thinking about this as much as you have–I think you’ve earned that beer!

🙂 Confession: I have a sizeable pile of papers on eigenfunctions on my desk that I’ve been working through lately as they relate to some time series work I’m doing. It’s fair to say this material is currently etched into my brain (daresay soon to be half forgotten). Glad it’s proving useful.

Hi Jeremy,

I don’t know the answer but I know this has also been an issue in dealing with connectivity in marine ecosystems where currents often result in asymmetric connectivity patterns. You might check out this ref and papers that cite it:

Treml, E. A., Halpin, P. N., Urban, D. L., & Pratson, L. F. (2008). Modeling population connectivity by ocean currents, a graph-theoretic approach for marine conservation. Landscape Ecology, 23(1), 19-36.

eg

Acevedo, M. A., Fletcher Jr, R. J., Tremblay, R. L., & Meléndez-Ackerman, E. J. (2015). Spatial asymmetries in connectivity influence colonization− extinction dynamics. Oecologia, 1-10.

Thanks!