Just to add a little to this discussion, Luke Harmon suggested to me off-list that adding arbitrarily short terminal branches to the tree might perhaps *guarantee* a significant result. Indeed this seems like it could be the case. For instance, try running the following code for smaller (or larger) values of "tiny.edge." [Comments give you an idea of what's being done.] - Liam

require(geiger)
# how long is your "tiny edge?"
tiny.edge<-0.0001
# is there error in measuring tip species
error.variance<-0.01
# create balanced tree
tree<-stree(n=32,type="balanced")
# create branch lengths
tree$edge.length<-rep(1,62)
# set all terminal branch lengths to zero
tree$edge.length[tree$edge[,2]<=32]<-0
# simulate and add a little random error
y<-sim.char(tree,as.matrix(1))[,,1]+sqrt(error.variance)*rnorm(32)
# create a factor
x<-as.factor(rep(c(0,1),16)); names(x)<-names(y)
# add a tiny little bit to the terminal edges
tree$edge.length[tree$edge[,2]<=32]<-tiny.edge
# compute phylogenetic anova
phy.anova(tree,y,x)


--
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 3/17/2011 5:32 PM, tgarl...@ucr.edu wrote:
Dear Daniel,

        OK, then I think your results make sense.  You have, in fact, designed 
a comparative study in which the power to detect a statistical effect of 
Habitat (i.e., a group difference) will be higher if analyzed phylogenetically 
than if analyzed in the conventional fashion assuming a stat phylogeny.  This 
point has been made in various places, including:

Garland, T., Jr., A. W. Dickerman, C. M. Janis, and J. A. Jones. 1993. 
Phylogenetic analysis of covariance by computer simulation. Systematic Biology 
42:265-292.
Vanhooydonck, B., and R. Van Damme. 1999. Evolutionary relationships between 
body shape and habitat use in lacertid lizards. Evolutionary Ecology Research 
1:785-805.
Garland, T., Jr. 2001. Phylogenetic comparison and artificial selection: two 
approaches in evolutionary physiology. Pages 107-132 in R. C. Roach, P. D. 
Wagner, and P. H. Hackett, eds. Hypoxia: From Genes to the Bedside. Advances in 
Experimental Biology and Medicine, volume 502. Kluwer Academic/Plenum 
Publishers, New York.

        In addition, you have made the within-species (and hence between 
habitat) branch lengths arbitrarily very short relative to the among-species 
branches in the rest f your tree.  Hence, if you do have a Habitat effect, it 
would be very unlikely to have occurred via Brownian motion character 
evolution.  So, you phylogenetic P values becomes (much) lower than your 
non-phylogenetic P value.

        As a reality check, I would run your analyses on a star phylogeny (a 
giant hard polytomy) and see if you get P values that are the same (actually, 
just very close to unless you do a lot of simulations) as for a nonphylogenetic 
analysis.

Cheers,
Ted



Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Wet Lab Phone:  (951) 827-5724
Dry Lab Phone:  (951) 827-4026
Home Phone:  (951) 328-0820
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu

Main Departmental page:
http://www.biology.ucr.edu/people/faculty/Garland.html

List of all Publications:
http://www.biology.ucr.edu/people/faculty/Garland/GarlandPublications.html

Garland and Rose, 2009
http://www.ucpress.edu/books/pages/10604.php


   ---- Original message ----

     Date: Wed, 16 Mar 2011 15:38:54 -0500
     From: dwe...@life.illinois.edu
     Subject: Re: [R-sig-phylo] Help Interpreting Phylogenetic ANOVA
     Results
     To: tgarl...@ucr.edu
     Cc: r-sig-phylo@r-project.org

     >Hi Liam and Ted,
     >  My apologies for not writing sooner. I've been sick.
     >  First off, let me thank you both for helping to clarify what the
     >phylogenetic ANOVA is and what it means.
     >  I thought I would explain a little more than I did in my initial
     post
     >since Ted seemed curious to know more.
     >  I am using geometric morphometrics to analyze body shape in a
     family of
     >freshwater fish (topminnows). I ran a PCA to "condense" the
     >morphometric analyses into PC scores. I'm using the PC scores in
     the
     >phylogenetic ANOVA. Because I would like to know how phylogeny
     >"effects" habitat-specific differences in body shape, I run the
     >phylogenetic ANOVAs with the tips being a species-habitat
     combination.
     >Essentially, it looks like this:
     >
     >  |---- Species A Habitat 1
     >  |
     >  |------|
     >  | |
     >---| |---- Species A Habitat 2
     >  |
     >  |
     >  |
     >  | |---- Species B Habitat 1
     >  | |
     >  |-----|
     >  |
     >  |---- Species B Habitat 2
     >
     >  The tree for these species was made in Mesquite and based off of a
     tree
     >from a recent molecular phylogeny that came out (Whitehead 2010
     >Evolution paper). The tree for the phylogenetic ANOVA includes
     branch
     >lengths, obviously. Because I don't know if there is any genetic
     >distance between the same species from the two different habitats,
     I set
     >the branch lengths to a really small value (0.00001) in R.
     >  All of the 21 species used to run the phylogenetic ANOVA have
     >populations in both habitats, so in that sense it's "balanced".
     Where
     >the species fall on the tree is pretty scattered, throughout the
     tree
     >(the tree contains about 20 more species that I did not include in
     this
     >analysis, so I don't know if that matters). Just visually glancing
     at
     >it, there are two main clades in the tree and 14 come from one
     clade and
     >7 come from the other clade, so, if anything, I would think they'd
     be
     >more "clumped" than overdispersed. However, I could be wrong.
     >  I would be happy to share the real tree and my data with anyone
     who is
     >interested.
     >
     >
     >
     >
     >
     >-Daniel
     >
     >
     >
     >>  Exactly as Liam wrote, except that it is usually uncommon to find
     real
     >>  data that are "overdispersed phylogenetically," so normally one
     finds that
     >>  the P values when done phylogenetically are larger (less
     significant) than
     >>  when done via conventional, non-phylogenetic ANOVA. I'd be
     curious what
     >>  your data are and how they appear to be scattered across the tips
     of your
     >>  phylogeny. Are they really overdispersed?
     >>
     >>  Cheers,
     >>  Ted
     >>
     >>  Theodore Garland, Jr.
     >>  Professor
     >>  Department of Biology
     >>  University of California, Riverside
     >>  Riverside, CA 92521
     >>  Office Phone: (951) 827-3524
     >>  Wet Lab Phone: (951) 827-5724
     >>  Dry Lab Phone: (951) 827-4026
     >>  Home Phone: (951) 328-0820
     >>  Facsimile: (951) 827-4286 = Dept. office (not confidential)
     >>  Email: tgarl...@ucr.edu
     >>
     >>  Main Departmental page:
     >>  http://www.biology.ucr.edu/people/faculty/Garland.html
     >>
     >>  List of all Publications:
     >>
     http://www.biology.ucr.edu/people/faculty/Garland/GarlandPublications.html
     >>
     >>  Garland and Rose, 2009
     >>  http://www.ucpress.edu/books/pages/10604.php
     >>
     >>
     >>  ---- Original message ----
     >>
     >>  Date: Mon, 14 Mar 2011 16:22:58 -0400
     >>  From: "Liam J. Revell"<liam.rev...@umb.edu>
     >>  Subject: Re: [R-sig-phylo] Help Interpreting Phylogenetic ANOVA
     >>  Results
     >>  To: dwe...@life.illinois.edu
     >>  Cc: r-sig-phylo@r-project.org
     >>
     >>  >Hi Dylan.
     >>  >
     >>  >The way the phylogenetic ANOVA (sensu Garland et al. 1993; Syst.
     >>  Biol.)
     >>  >works is by first computing a standard ANOVA, and then comparing
     >>  the
     >>  >observed F to a distribution obtained by simulating on the tree
     >>  under a
     >>  >scenario of no effect of x on y. This "accounts for" the tree in
     >>  the
     >>  >sense that it attempts to account for the possibility that
     species
     >>  may
     >>  >have similar y conditioned on x because x influences y; or
     because
     >>  they
     >>  >share common history and are thus similar by virtue of this
     history
     >>  (and
     >>  >not at all due to x)
     >>  >
     >>  >It is not particularly surprising that your P-value was lower in
     >>  the
     >>  >phylogenetic ANOVA than in your regular ANOVA. In general, the
     >>  effect
     >>  >of the phylogenetic ANOVA on P depends on the distribution of
     the
     >>  >factor, x. If x is clumped on the tree, than the P-value of a
     >>  >phylogenetic ANOVA will tend to be higher than a regular ANOVA.
     By
     >>  >contrast, if x is overdispersed phylogenetically, the P-value of
     >>  the
     >>  >phylogenetic ANOVA will tend to be lower than the regular ANOVA.
     >>  >
     >>  >I hope this is of some help.
     >>  >
     >>  >- 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 3/13/2011 9:28 PM, dwe...@life.illinois.edu wrote:
     >>  >>  Hi,
     >>  >>  I am relatively new to phylogenetic methods. I'm hoping
     someone
     >>  can
     >>  >>  help me to understand my results.
     >>  >>  I am working with a group of 21 species of fish. I want to
     know
     >>  how
     >>  >>  their habitat may influence body shape and whether
     phylogenetic
     >>  >>  relatedness may influence body shape as well. I performed a
     >>  >>  phylogenetic ANOVA using the GEIGER package in R. My "metric"
     of
     >>  body
     >>  >>  shape is a PC score. Here's the output:
     >>  >>
     >>  >>  Standard ANOVA:
     >>  >>  Analysis of Variance Table
     >>  >>
     >>  >>  Response: td$data
     >>  >>  Df Sum Sq Mean Sq F value Pr(>F)
     >>  >>  group 1 4.01 4.0134 0.4595 0.5017
     >>  >>  Residuals 40 349.35 8.7337
     >>  >>
     >>  >>
     >>  >>  Phylogenetic p-value: 0.000999001
     >>  >>
     >>  >>  I'm a bit uncertain as to how to properly interpret the
     result. I
     >>  think
     >>  >>  my confusion is two fold:
     >>  >>
     >>  >>  1. I am not sure I am interpreting what the phylogenetic
     p-value
     >>  means.
     >>  >>  Am I correct in saying that the phylogenetic p-value
     essentially
     >>  says
     >>  >>  that, after "accounting for" phylogeny, the habitat has an
     effect
     >>  on body
     >>  >>  shape (PC1)?
     >>  >>
     >>  >>  2. I am confused as to why it goes from non-significant (in
     the
     >>  standard
     >>  >>  ANOVA) to significant (phylogenetic p-value)? Does it mean
     that
     >>  the
     >>  >>  habitat does not have an effect on body shape if you don't
     >>  consider
     >>  >>  phylogenetic relatedness?
     >>  >>
     >>  >>  I realize these might be very simple questions but I'd
     appreciate
     >>  it if
     >>  >>  someone can help. I'm not well versed in phylogenetics, so I
     feel
     >>  a bit
     >>  >>  lost.
     >>  >>  Please feel free to respond directly to me at
     >>  dwe...@life.illinois.edu.
     >>  >>  Thank you!
     >>  >>
     >>  >>
     >>  >>
     >>  >>
     >>  >>  -Daniel
     >>  >>
     >>  >>
     >>  >>  ----><((((º>  -----><((((º>  ----><((((º>  ----><((((º>
     >>  ----><((((º>  ----
     >>  >>
     >>  >>  Daniel P Welsh
     >>  >>  University of Illinois at Urbana-Champaign
     >>  >>  Champaign, IL, USA
     >>  >>
     >>  >>  _______________________________________________
     >>  >>  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
     >>
     >
     >
     >----><((((º>  -----><((((º>  ----><((((º>  ----><((((º>  ----
     ><((((º>  ----
     >
     >Daniel P Welsh
     >PhD Student
     >Teaching Assistant
     >Department of Animal Biology
     >University of Illinois at Urbana-Champaign
     >202 Shelford Vivarium
     >606 E. Healey Street
     >Champaign, IL 61821
     >lab phone: (217) 333-5323
     >

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

Reply via email to