Hi Karin.

GLS with x as a factor is a generalized ANOVA which assumes [in the case of gls(...,correlation=corBrownian)] that the residual error in the ANOVA model has evolved by Brownian evolution. If you read your data into data frame Z with row names as species names, for instance:

Z<-read.table("filename",header=T,row.names=1)
tree<-read.tree("treefile")

and your column name for the factor is x & the column name for the continuous response variable is y, then you should just be able to do:

fit<-gls(y~x,data=Z,correlation=corBrownian(1,tree))

You can then perform various posthoc analyses from the gls object that is produced. For instance

summary(fit)
anova(fit)
residuals(fit)

As pointed out by Alejandro, you should check for normality of the residuals in residuals(fit) - not the normality of y before analysis. summary(fit) will also give you parameter estimated (fitted means for each factor) and standard errors. These can be used to conduct posthoc comparison of means using t-tests in the standard way.

I hope this helps.

All the best, Liam

--
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com

On 5/30/2012 10:46 AM, Karin Schneeberger wrote:
Hi Alejandro

Thank you for the very quick answer. I tried PGLS before, but then was told 
that GLS is not suitable for multistate categorical variables that can not be 
ranked (otherwise I would treat them as continuous). Also, with GLS it's as far 
as I understood not possible to state statistically whether certain groups are 
greater than others. But I am new into this kind of analysis and am very happy 
for any help and explanation, as I might be totally wrong.

Cheers,
Karin



________________________________
  Von: Alejandro Gonzalez<alejandro.gonza...@ebd.csic.es>

CC: "r-sig-phylo@r-project.org"<r-sig-phylo@r-project.org>
Gesendet: 16:26 Mittwoch, 30.Mai 2012
Betreff: Re: [R-sig-phylo] Non-parametric alternative to phylogenetic ANOVA?


Hi Karin,

You could use a gls method and look at the distribution of your residuals. It 
is the residuals which must be normally distributed, which can be checked using 
diagnostic plots such as a histogram or qq-plot of the residuals of your model.

Cheers

Alejandro


On 30, May 2012, at 4:12 PM, Karin Schneeberger wrote:

Dear all

I'm trying to compare one trait across three (unordered categorical) groups 
including 25 species (let's say for example basal metabolic rate of aquatic, 
terrestrial and aerial mammals).

If the data would be normally distributed, I would simply use a phylogenetic ANOVA 
including a post-hoc test on means accounting for the phylogeny, as provided by the 
package "phytools". However, my tip-data are far away from being normally 
distributed, and transformations only lead to unsatisfying improvements (e.g Shapiro-Wilk 
test returns a p-Value of 0.08 instead of 0.03 as before transformation). So I am not 
convinced that a phylogenetic ANOVA is the right approach for dealing with these sort of 
data.
Is there any non-parametric approach to compare groups across phylogeny that 
also returns which groups differ from each other?

Your sincerely,
Karin

[[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


__________________________________

Alejandro Gonzalez Voyer

Post-doc

Estación Biológica de Doñana
Consejo Superior de Investigaciones Científicas (CSIC)
Av Américo Vespucio s/n
41092 Sevilla
Spain

Tel: + 34 - 954 466700, ext 1749

E-mail: alejandro.gonza...@ebd.csic.es

Web site (Under construction):

Personal page: http://consevol.org/members/alejandro.html

Group page: http://consevol.org/index.html

For PDF copies of papers see:

http://csic.academia.edu/AlejandroGonzalezVoyer
        [[alternative HTML version deleted]]




_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to