# Phylogenetic dependent variables: ANOVA?

I understand deriving a covariance matrix from phylogenetic data to make $cov(X,Y) = 0$ for two variables you're making a regression on. But what happens if you have one continuous variable, that you've previously shown to be dependent on phylogeny, and one ordinal variable? The latter being ordinal, I'm not sure how to relate this to the way in which phylogenetic dependence results in biased test statistics.

Is it meaningful to calculate Felsenstein's Phylogenetic Independent Contrasts on your continuous variable and use these for your ANOVA?

The PIC value is: $$C_{ij} = \frac{(X_i - X_j)}{\sqrt{d_{ij}}}$$

Where $X_i$ is $X$ for species $i, X_j$ is $X$ for species $j$, and $d_{ij}$ is the pairwise distance between species $i$ and $j$ on the phylogenetic tree.

• There are enough applied statisticians at CrossValidated that we may want to consider migrating this to the stats site. – Daniel Standage Feb 1 '12 at 20:32
• I'd recommend the r-sig-phylo mailing list (stat.ethz.ch/mailman/listinfo/r-sig-phylo). Even if you are not using R for your analysis, you will get very good answers to your question. – kmm Feb 1 '12 at 21:38

The first step I would recommend is introduce a dummy variable for each of the ordinal class (see comments at https://www.google.com/url?sa=t&source=web&rct=j&ei=B9r5U67pH8vfsASwq4GADQ&url=http://www.uta.edu/faculty/kunovich/Soci5304_Handouts/Topic%25208_Dummy%2520Variables.doc&cd=2&ved=0CCAQFjAB&usg=AFQjCNEX-TD7RjSYZ-ej32_5tgPTxVVdvQ&sig2=9hkDU6Y2mpKcGzBTIK8jog ) and plot the respective means from the dummy variable regression analysis. You can also test for a trend in the dummy variables themselves. You also also re-order the ordinal variable category per the respective estimated magnitude of the dummy variables for subsequent analysis if there is a prior (to seeing the current data) justification for so doing.

Assuming the prior analysis is missing an increasing trend effect ( not necessarily linear) and incorporating any supportable ordering in the ordinal variable itself, an interesting approach that also addresses possible normality issues, is to perform a regression analysis in which all variables are assigned ranks, including the ordinal variable. A rationale for this madness, to quote from Wikipedia on Spearman's Rank Correlation Coefficient (link: http://en.m.wikipedia.org/wiki/Spearman's_rank_correlation_coefficient ):

"Spearman's coefficient, like any correlation calculation, is appropriate for both continuous and discrete variables, including ordinal variables.[1][2]"

Wikipedia presents an example and several ways to assess the standard error of the computed rank correlation for testing. Note, if it is not statistically different from zero, then a scaled version, like in a computed regression based on ranks, is similarly, not significant.

I would further normalize these ranks (dividing by the number of observations), giving a possible sample quantile interpretation (note, there are possible refinements in constructing the empirical distribution for the data in question). I would also perform a simple correlation between y and a given transformed ordinal variable so that the direction of your selected ranking (for example, 1 to 4 versus 4 to 1), produces a sign for the rank correlation that has intuitive meaning in the context of your study.

 Please note that ANOVA models can be presented in regression format with the appropriate design matrix, and with whatever standard regression model you investigate, the central theme is a mean based analysis of Y given X. However, in some disciplines like ecology, a different focus on regression relations implied at various quantiles, including the median, has prove fruitful. Apparently in ecology mean effects can be small, but not necessarily so at other quantiles. This field is called quantile regression. I would suggest you employ it to supplement your current analysis. As a reference, you may find Paper 213-30,"An Introduction to Quantile Regression and the QUANTREG Procedure" by Colin(Lin) Chen at the SAS Institute helpful.

Here also is a source on the use of rank transforms: "The Use of Rank Transforms in Regression" by Ronald L. Iman and W.J. Conover, published in Technometrics, Vol 21, No. 4, November, 1979. The article notes that regressions employing rank transforms appear to work quite well on monotonic data. This opinion is also shared by reliability professionals, who state on an online magazine, to quote: "The rank regression estimation method is quite good for functions that can be linearized". Source: "Reliability Hotwire, Issue 10, December, 2010.

• an anonymous user has been trying to make fairly extensive (IMO) edits to your post. If you don't agree with them, you can roll them back by clicking the "edited __ ago" link, finding the last version you prefer & clicking "rollback". – gung - Reinstate Monica Aug 25 '14 at 17:04

A phylogenetic ANOVA test was developed by Garland et al. (1993), and is implemented in the phy.anova function in the geiger package. The method produces p-values corrected for phylogenetic non-independence by generating a null distribution based on simulating evolution on the phylogeny.