[R-sig-phylo] Is correlation of PICs, with tip data and each terminal node split into male and female, a valid method?

Theodore Garland Jr theodore.garland at ucr.edu
Fri Nov 4 23:09:09 CET 2011


Your power to detect a correlation is also going to be low.  For example, see the figure in Garland and Adolph (1994), or any standard power curve for a correlation coefficient.

If you are comparing two models (e.g., OLS and PGLS) with the same number of independent variables in them (e.g., one), the you don't need AIC.  Just look at the likelihoods.  Bigger is better.  

Cheers,
Ted

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Home Phone:  (951) 328-0820
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarland at ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html

Experimental Evolution: Concepts, Methods, and Applications of Selection Experiments
Edited by Theodore Garland, Jr. and Michael R. Rose
http://www.ucpress.edu/book.php?isbn=9780520261808
(PDFs of chapters are available from me or from the individual authors)

________________________________________
From: r-sig-phylo-bounces at r-project.org [r-sig-phylo-bounces at r-project.org] on behalf of Alberto Gallano [alberto.gc8 at gmail.com]
Sent: Friday, November 04, 2011 2:10 PM
To: R-phylo Mailing-list
Subject: Re: [R-sig-phylo] Is correlation of PICs, with tip data and each terminal node split into male and female, a valid method?

Dear Marguerite and Ted,

thanks you very much, your suggestions make sense to me - I am looking at
the references you mentioned.

I'd like to ask for one small clarification regarding power. I know from
several papers that power is not good below n=17 for independent contrasts,
as you mentioned. What I want to know is, does my small sample size affect
the actual significance of the correlation (i.e., does it reduce my ability
to get a significant p-value for the correlation)? Or, as I think is more
likely, does it just reduce my ability to tell whether the phylogenetic
model is a better fit than an ordinary statistical model?

By the way, how would I assess the model fit? If I was using pGLS the
functions would generate an AIC value for each model. But using the
cor.table or other correlations functions, no AIC value is produced. Is
there a way to judge model fit when doing PIC correlations?

thank you se much,

Alberto



On Thu, Nov 3, 2011 at 1:22 PM, Theodore Garland Jr <
theodore.garland at ucr.edu> wrote:

> Dear Alberto,
>
> I agree with all of what Marguerite wrote.  Here are two good papers to
> check on the metrics:
>
> Abouheif, E., and D. J. Fairbairn. 1997. A comparative analysis of
> allometry for sexual size dimorphism: assessing Rensch's rule. Am. Nat.
> 149:540-562.
>
> Cox, R. M., S. L. Skelly, and H. B. John-Alder. 2003. A comparative test
> of adaptive hypotheses for sexual dimorphism in lizards. Evolution
> 57:1653-1669.
>
> And, with so few species, you are not going to be able to tell very well
> whether a phylogenetic statistical model, using a hierarchical tree, fits
> your data better than a conventional analysis, assuming a star phylgony, so
> present both.
>
> Cheers,
> Ted
>
> Theodore Garland, Jr.
> Professor
> Department of Biology
> University of California, Riverside
> Riverside, CA 92521
> Office Phone:  (951) 827-3524
> Home Phone:  (951) 328-0820
> Facsimile:  (951) 827-4286 = Dept. office (not confidential)
> Email:  tgarland at ucr.edu
> http://www.biology.ucr.edu/people/faculty/Garland.html
>
> Experimental Evolution: Concepts, Methods, and Applications of Selection
> Experiments
> Edited by Theodore Garland, Jr. and Michael R. Rose
> http://www.ucpress.edu/book.php?isbn=9780520261808
> (PDFs of chapters are available from me or from the individual authors)
>
> ________________________________________
> From: r-sig-phylo-bounces at r-project.org [r-sig-phylo-bounces at r-project.org]
> on behalf of Marguerite Butler [mbutler808 at gmail.com]
> Sent: Thursday, November 03, 2011 9:49 AM
> To: Alberto Gallano
> Cc: R-phylo Mailing-list
> Subject: Re: [R-sig-phylo] Is correlation of PICs,      with tip data and
> each terminal node split into male and female,        a valid method?
>
> Dear Alberto,
>
> I think the problem with including both males and females as separate
> datapoints in the analysis is that you're artificially doubling the sample
> size, which will make your statistical results difficult to interpret.
>
> Why don't you do two separate analyses (or three)? One with males only,
> one with females only, and one on sexual dimorphism (some sort of
> difference or ratio or log-ratio variable -- people have used various
> metrics in the literature)?
>
> Doing comparative analyses on 10 species is going to have very low power,
> no matter what you do, however.
>
> Good luck!
> Marguerite
>
> On Nov 2, 2011, at 4:29 PM, Alberto Gallano wrote:
>
> > Dear useRs,
> >
> > I am sorry if my previous question was not clear - my English speaking
> > colleague helped me reword my question:
> >
> > I want to correlate a body size proxy to another (shape) variable using
> > independent contrasts. *But*, but I want to split the data by sex (as
> there
> > is much sexual dimorphism in body size in the species I study). This
> means
> > I need to have a tree where each terminal species is actually made up of
> > two nodes (male and female). I assume to do this I must make the branch
> > lengths between the sexes within each species tiny (e.g., 1e-7), so that
> > they are basically contemporaneous (it doesn't seem to work if branch
> > lengths between sexes are set to zero). Is this the best way to apply
> > correlation with PICs to each sex? Is there a problem with having each
> > terminal taxon split by sex? (see tree object below)
> >
> > My variables are "bodySize" (a geometric mean proxy) and "var1" a 'shape'
> > index - log10(var1 / bodySize). I want to look for an allometric effect
> in
> > "var1" by correlating with "bodySize", after correcting for isometric
> size
> > differences. My real data is for 10 species, but here I give an example
> > with 3 species and each sex. I am mainly using Spearman's rho, as the
> small
> > sample has many outliers, but I give example functions for Pearson's r as
> > well below.
> >
> > thank you,
> >
> > Alberto
> >
> >
> > # ---------------------------------
> > # dummy datas
> > set.seed(186)
> > dat <- data.frame(bodySize=rnorm(6, 10), var1=rnorm(6, 5))
> > rownames(dat) <- c("taxon1_M", "taxon1_F", "taxon2_M", "taxon2_F",
> > "taxon3_M", "taxon3_F")
> >
> > # tree
> > library(ape)
> > tree <- structure(list(edge = structure(c(7L, 8L, 9L, 9L, 8L, 10L, 10L,
> > 7L, 11L, 11L, 8L, 9L, 1L, 2L, 10L, 3L, 4L, 11L, 5L, 6L), .Dim = c(10L,
> > 2L)), Nnode = 5L, tip.label = c("taxon1_M", "taxon1_F", "taxon2_M",
> > "taxon2_F", "taxon3_M", "taxon3_F"), edge.length = c(3.4, 2.3999999,
> > 1e-07, 1e-07, 2.3999999, 1e-07, 1e-07, 5.7999999, 1e-07, 1e-07
> > ), root.edge = 0, tip.labels = c("taxon1_M", "taxon1_F", "taxon2_M",
> > "taxon2_F", "taxon3_M", "taxon3_F")), .Names = c("edge", "Nnode",
> > "tip.label", "edge.length", "root.edge", "tip.labels"), class = "phylo")
> >
> >
> > # ----------------------------------
> > # Pearson's r
> > phyCorr <- function(x, y, tree){
> >    r.pic <- pic(x, tree) %*% pic(y, tree) / sqrt( sum( pic(x, tree)^2 ) *
> > sum( pic(y, tree)^2) )
> >    return(r.pic)
> > }
> >
> > corr <- phyCorr(dat$bodySize, dat$var1, tree)
> >
> >
> > # -----------------------------------
> > # Spearman's rho
> > PICs <- function(d, phy){
> >    dat.PICs <- array(dim=c(phy$Nnode, 2, ncol(d)))
> >    for (i in seq_along(d)) {
> >        dat.PICs[ , , i] <- pic(d[, i], phy, var.contrasts=TRUE)
> >    }
> >    return(dat.PICs)
> > }
> >
> > char.PIC <- PICs(dat, tree)
> >
> > library(picante)
> > PIC.tab <- cor.table(char.PIC[, 1, ], cor.method="spearman",
> > cor.type="contrast")
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-phylo mailing list
> > R-sig-phylo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>
> _______________________________________________
> R-sig-phylo mailing list
> R-sig-phylo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>

        [[alternative HTML version deleted]]

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


More information about the R-sig-phylo mailing list