# How to account for phylogenetic autocorrelation in a model with continuous, ordinal, and categorical predictor variables (and ideally account for intraspecific variation too)

### How to account for phylogenetic autocorrelation in a model with continuous, ordinal, and categorical predictor variables (and ideally account for intraspecific variation too)

Posted by JayFitzsimmons at October 24. 2011I am studying Canadian butterfly species' northward range shifts with climate change. Specifically, I'm trying to determine which traits are related to species' rates of northward range expansion. My predictor variables include continuous, ordinal, and categorical traits. This combination of traits seems to make some things I'd like to do impossible.

WHAT I'D LIKE TO DO, IDEALLY:

Having read Blomberg & Garland (2003), I want to account for phylogenetic autocorrelation.

Having read Revell (2010), I want to account for the appropriate level of phylogenetic autocorrelation rather than assume a rigid evolutionary model (e.g., Brownian motion).

Having read Garamszegi & Moller (2010), I want to account for intraspecific variation in inter-species comparisons.

If anyone knows a program that allows this combination of factors in an analysis, or even two out of the three ideal factors, please let me know.

REFERENCES:

Blomberg, S.P., Garland, T.J. & Ives, A.R. (2003) Testing for phylogenetic signal in comparative data: behavioral traits are more labile. Evolution, 57, 717-745.

Garamszegi, L.Z. & MÃ¸ller, A.P. (2010) Effects of sample size and intraspecific variation in phylogenetic comparative studies: a meta-analytic review. Biological Reviews, 85, 797-805.

Revell, L.J. (2010) Phylogenetic signal and linear regression on species data. Methods in Ecology and Evolution, 1, 319-329.

### Re: How to account for phylogenetic autocorrelation in a model with continuous, ordinal, and categorical predictor variables (and ideally account for intraspecific variation too)

Posted by garamszegi at October 24. 2011Indeed, it is challenging to account for all of these error terms in one model. What I would do is to do separate analyses accounting for different kinds of bias, and then check if the results are robust across different corrections.

- for example you can use Freckleton's PGLS models to assess simultaneously the effect of different predictors (continuous, categorical ) on a continuous variable. These are implemented in the caic package in R.

- you can use the ouch or geiger packages for example to test adaptive hypotheses using variations of the Ornstein-Uhlenbeck process

- to account for intraspecific variations, first you may want to check if the repeatability of your traits is high enough. If you have r>0.8 I would not care too much about it (see Harmon & Losos 2005 Evolution). If this is not the case, you may want to try one of the methods we recommend in our paper.

see more on http://www.r-phylo.org/wiki/Main_Page and http://www2.hawaii.edu/~mbutler/Rquickstart/Rcomparative.pdf

### Re: How to account for phylogenetic autocorrelation in a model with continuous, ordinal, and categorical predictor variables (and ideally account for intraspecific variation too)

Posted by JayFitzsimmons at October 25. 2011Thank you for your advice Laszlo. I'll look into these options, and I'll come back to this forum if I have any problems. I'll try to remember to come back here regardless, in fact, to say how I did my analysis in case anyone else has a similar problem.

Jay