[R] Applying ME in spdep to phylogenetic autocorrelation

Megan Bartlett mkbartl at gmail.com
Sat Oct 24 02:11:44 CEST 2015


Hi all,

I want to fit a model with the form:

trait 1 ~ trait 2 + environmental variable

while controlling for the phylogenetic relatedness in my study species. I
would use phylogenetic least squares regression, but I want to apply an
independent effects analysis to partition the effects of trait 2 and
environment on trait 1. (Partial correlation doesn't work here since all 3
variables are correlated).

It looks like the ME function in the spdep package does exactly what I
would like to do for phylogenetic autocorrelation, but for spatial
autocorrelation. Is there a way to apply ME to phylogenetically structured
instead of spatially structured data? I can use the mat2listw function to
convert the phylogenetic distance matrix to a listw object, but I'm not
sure I'm representing the neighbor relationships correctly. Should each
taxa be connected to every other taxa by a weight that reflects the
phylogenetic distance, or should only the most closely related tips be
counted as neighbors? Should the phylogenetic distance matrix itself go
into the mat2listw function, or should the values be converted to
1/distance, to be analogous to spatial weights? How can I use the S0, S1,
and S2 values from the summary() of the listw object to figure out whether
I've represented the neighbors correctly?

Thanks very much for your help!

Best,

Megan Bartlett

	[[alternative HTML version deleted]]



More information about the R-help mailing list