Re: [R-sig-phylo] data anlysis

2016-07-10 Thread Theodore Garland Jr
Dear Rodrigo,

Four species is too few to be able to tell with any confidence whether a 
statistical model fitted with a star phylogeny or a hierarchical phylogeny 
better fits your data.  However, you can certainly analyze your data with both 
conventional and phylogenetic methods (e.g., independent contrasts, 
simulations).  If the main result is similar with both approaches, then you 
have your answer.  If not, then ...

With that small a sample size, I would not bother with approaches that 
transform the branch lengths.  Here are two papers that present simulations 
related to sample size:

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

Freckleton, R. P., Harvey, P. H. and Pagel, M. (2002). Phylogenetic analysis 
and comparative data: a test and review of evidence. The American Naturalist 
160, 712–726.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Rodrigo 
Gavira [rodgav...@gmail.com]
Sent: Sunday, July 10, 2016 12:38 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] data anlysis

Dear guys,

my name is Rodrigo, I am a PhD student from São Paulo State University,
Brazil. I am finishing my thesis but have some doubts about how to analyze
my data, so I decided contact you.

Here I am working on comparative physiology of ectothermic
vertebrates. In summary,
I work with 4 pitvipers species (*Bothrops* and *Crotalus* genus) in which
I measured: Metabolism, water loss by evaporation, and thermal preference
and tolerance. Now I would like to compare these results among species.
However, as I said, I have only four species to compare. From what I
understand when looking at mailing linst archives, this number of taxa are
not enough to test the effects of phylogeny on my results, and I must use
conventional analyzes. Is that right? If so, please, could you send me some
papers dealing with this?

Many thanks, guys. Cheers,

--
MSc. Rodrigo Samuel Bueno Gavira
Biologist - PhD student in Zoology
Universidade Estadual Paulista - UNESP
Department of Zoology
Rio Claro - SP - BRAZIL

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] simulating continuous data

2016-05-10 Thread Theodore Garland Jr
If you are trying to mimic real data, then perhaps you have some fossil data to 
go on?  If not, then you can try to pick a "reasonable" value based on other 
biological knowledge.  Check the Garland et al. (1993) for how we did it.

Cheers,
Ted

From: Bryan McLean [bryansmcl...@gmail.com]
Sent: Tuesday, May 10, 2016 3:32 PM
To: Theodore Garland Jr
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] simulating continuous data

Thanks Joe and Ted,

By similar scaling, I just meant (as Ted guessed) that the root value depends 
on the empirical trait data, and does not start at 0 or 1, e.g., and thus 
produces simulated values that can be directly compared to the true data. Under 
a Brownian model, the mean trait value is suitable as the root value, but how 
does one specify a root value under a different and potentially better fitting 
model (OU, EB)? Im working mostly in R.

-Bryan


On 10 May2016, at 4:38 PM, Theodore Garland Jr 
>
 wrote:

This is a good point and one that is often glossed over.
We talked about it quite a bit here:

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.
http://www.biology.ucr.edu/people/faculty/Garland/GarlEA93.pdf

Surely you want to do various descriptive statistics on your simulated data 
sets to see how they compare with the real one, and presumably you want some of 
those to include the phylogenetic versions (e.g., conventional and phylogenetic 
estimates of the correlation coefficient if you are simulating two traits).

I think it is also really important to consider models that have limits to 
trait evolution (again, see the paper listed above).  Those limits can interact 
strongly with starting (root) values, especially if you include evolutionary 
trends.

Check Figure 1 in this paper:

Diaz-Uriarte, R., and T. Garland. 1996. Testing hypotheses of correlated 
evolution using phylogenetically independent contrasts: sensitivity to 
deviations from Brownian motion. Systematic Biology 45:27�47.
http://www.biology.ucr.edu/people/faculty/Garland/DiazGa96.pdf

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Bryan McLean 
[bryansmcl...@gmail.com]
Sent: Tuesday, May 10, 2016 1:24 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] simulating continuous data

Hi list,

I�m working to simulate multiple continuous characters on a known phylogeny 
(using several of the standard models), and I want to compare properties of the 
simulated datasets to an empirical dataset. My question is: what is the 
standard method for ensuring that those datasets (simulated, empirical) are 
actually directly comparable, i.e. scaled similarly? Does this involve 
specifying a sensible root state (e.g. ancestral reconstruction) OR just 
rescaling one or the other datasets before or after the analysis? Forgive me if 
this is a bit of a naive question, just trying to get a sense of standard 
practices.

-Bryan McLean
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] simulating continuous data

2016-05-10 Thread Theodore Garland Jr
This is a good point and one that is often glossed over.
We talked about it quite a bit here:

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.
http://www.biology.ucr.edu/people/faculty/Garland/GarlEA93.pdf

Surely you want to do various descriptive statistics on your simulated data 
sets to see how they compare with the real one, and presumably you want some of 
those to include the phylogenetic versions (e.g., conventional and phylogenetic 
estimates of the correlation coefficient if you are simulating two traits).

I think it is also really important to consider models that have limits to 
trait evolution (again, see the paper listed above).  Those limits can interact 
strongly with starting (root) values, especially if you include evolutionary 
trends.

Check Figure 1 in this paper:

Diaz-Uriarte, R., and T. Garland. 1996. Testing hypotheses of correlated 
evolution using phylogenetically independent contrasts: sensitivity to 
deviations from Brownian motion. Systematic Biology 45:27–47.
http://www.biology.ucr.edu/people/faculty/Garland/DiazGa96.pdf

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Bryan McLean 
[bryansmcl...@gmail.com]
Sent: Tuesday, May 10, 2016 1:24 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] simulating continuous data

Hi list,

I’m working to simulate multiple continuous characters on a known phylogeny 
(using several of the standard models), and I want to compare properties of the 
simulated datasets to an empirical dataset. My question is: what is the 
standard method for ensuring that those datasets (simulated, empirical) are 
actually directly comparable, i.e. scaled similarly? Does this involve 
specifying a sensible root state (e.g. ancestral reconstruction) OR just 
rescaling one or the other datasets before or after the analysis? Forgive me if 
this is a bit of a naive question, just trying to get a sense of standard 
practices.

-Bryan McLean
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] Normal distribution in trait values before testing for phylogenetic signals?

2016-04-13 Thread Theodore Garland Jr
These descriptive statistics (e.g., K of Blomberg et al. 2003) and related 
tests do not require normality of the data under analysis.  However, your 
results may be highly dependent on the type of transform you use (or do not 
use), so all results must be considered in the context of that transform.  In 
general, I'd be inclined to apply some sort of "sensible" transform, such as 
log, if I were working with a large number of species that varied widely, such 
as body masses of mice to elephants.  Check the Blomberg et al. (2003) paper 
for a bit more discussion about this, and to see what they did for the various 
traits studied.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Ting-Wen 
Timothy Chen [tch...@gwdg.de]
Sent: Wednesday, April 13, 2016 11:02 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Normal distribution in trait values before testing   
for phylogenetic signals?

Hi all,

I'm working on the phylogenetic signal tests for continuous traits using K 
statistics and Pagel's lambda implemented in phytools. I'd like to know whether 
normal distribution of the trait values must be tested before phylogenetic 
signals are tested, and if the trait data are not normal distributing, do I 
have to transform the data? I have looked for this issue in my paper 
collections as well as on the internet, but still have no idea. It would be 
very nice if someone can give me some advice, or any paper/reference/website 
would also be very helpful. Thanks a lot!

Best,
Ting-Wen

--
Ting-Wen Chen
J.F. Blumenbach Institute of Zoology and Anthropology
Georg August University Goettingen
Berliner Str. 28
D-37073 Goettingen, Germany
Tel: +49-55139-10943

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.

2016-04-08 Thread Theodore Garland Jr
Alejandro is correct.  You can also do it with phylogenetically independent 
contrasts or computer simulations:

Garland Jr., T., P. H. Harvey, and A. R. Ives. 1992. Procedures for the 
analysis of comparative data using phylogenetically independent contrasts. 
Systematic Biology 41:18–32.

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.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Alejandro 
Gonzalez Voyer [alejandro.gonza...@iecologia.unam.mx]
Sent: Friday, April 08, 2016 2:01 PM
To: Sean McKenzie
Cc: R-phylo Mailing-list
Subject: Re: [R-sig-phylo] Testing for relationship between one categorical 
and one continuous variable in a phylogenetic framework.

Hello Sean,

If the continuous variable is the “response” and the “independent” variable the 
discrete one, you can use PGLS, this would be akin to an ANOVA and you can do 
it accounting for phylogenetic non-independence.
Is this what you were after?

Cheers

Alejandro
___
Dr Alejandro Gonzalez Voyer

Laboratorio de Conducta Animal
Instituto de Ecología
Circuito Exterior S/N
Ciudad Universitaria
Universidad Nacional Autónoma de México
México, D.F.
04510
México

Tel: +52 55 5622 9044
E-mail: alejandro.gonza...@iecologia.unam.mx
Web: www.alejandrogonzalezvoyer.com

> El 08/04/2016, a las 15:56, Sean McKenzie  escribió:
>
> Hello, I have a two traits, one categorical (binary) and one continuous,
> and I want to test for a relationship between them accounting for
> phylogenetic signal. I have found a plethora of sources for examining
> relationships between multiple categorical traits and many others for
> examining multiple continuous traits, but I have been hard pressed to find
> a test for one categorical and one continuous trait. A random blog post I
> stumbled across said I could use either standard phylogenetic independent
> contrasts (e.g. pic in ape) or general estimating equations (e.g.
> compar.gee in ape). Unfortunately the examples only used continuous data
> and tested for significance with regressions through the origin (e.g.
> lm(var1_pic ~ var2_pic - 1) or compar.gee(var1 ~ var2 - 1, phy = tree) ).
> This seems wrong when one variable was categorical, no?
>
> So, are PICs and PGEEs really appropriate for a single categorical and a
> single continuous variable? If so, what is the appropriate way to test for
> significance? If not, or if there's a better way, how can I test this?
>
> Thanks!
>
> Sean
>
>   [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] How to use categorical vectors in package ape for phylogenetic independent contrasts

2016-03-04 Thread Theodore Garland Jr
Thanks for Emmanual.
Kate, I think the original explanation of dummy variables with independent 
contrasts is here:

Garland Jr. T., P.H. Harvey, and A.R. Ives. 1992. Procedures for the analysis 
of comparative data using phylogenetically independent contrasts. Systematic 
Biology 41:18–32.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Emmanuel 
Paradis [emmanuel.para...@ird.fr]
Sent: Friday, March 04, 2016 6:30 AM
To: Kate Boyce-Miles; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] How to use categorical vectors in package ape for 
phylogenetic independent contrasts

Hi Kate,

You can compute PICs for a categorical variable in the same way than
you enter it in a linear model, that is by first computing its
"contrasts" (this is different from the "P-I-Contrasts", though both
have some conceptual similarities). The easiest way to do it is to use
the function model.matrix. For instance, we generate a tree (tr) and two
variables simulated on that tree, one continuous (x) and one discrete
(z) with three levels:

tr <- rphylo(50, .1, 0)
x <- rTraitCont(tr)
z <- rTraitDisc(tr, k = 3)

We compute the PICs for x the usual way:

pic.x <- pic(x, tr)

And for z:

Z <- model.matrix(~ z)[, -1]
rownames(Z) <- names(z)
pic.z <- apply(Z, 2, pic, phy = tr)

Note that we drop the column with 1's, so Z is a matrix with 2 columns
(number of levels - 1). Thus, pic.z is a matrix with 49 rows (n - 1) and
2 columns. We can now perform a linear regression with the two sets of PICs:

lm(pic.x ~ pic.z - 1)

This should give you the same coefficients than a PGLS like this:

library(nlme)
gls(x ~ z, correlation = corBrownian(phy = tr))

A very nice explanation of this can be found in Blomberg et al. (2012,
Syst. Biol.).

The two columns in pic.z should not be considered separately, in the
same way than in an ANOVA where there are 2 df associated with a 3-level
factor.

HTH

Best,

Emmanuel

Le 04/03/2016 01:07, Kate Boyce-Miles a écrit :
>
> Hello
>
> I have been using numeric vectors to perform phylogenetic independent 
> contrasts of several ecological variables for the cat phylogeny, using the 
> ape package in r, and I was wondering how this can be done using categorical 
> values?
>
> Example of how I have been using numeric values:
>
> tree <- read.newick("phylogeny.txt")
>
> tree <- as.phylo(tree)
>
> tree <- root(tree,1)
>
> x<-c() # x would vectors, for instance rainfall. One value for each 
> operational taxonomic unit on the tree, and the same order as they appear in 
> the newick file.
>
> pic.rain <- pic(x, tree, scaled = T, var.contrasts = F, rescaled.tree = F) # 
> To generate the phylogenetic independent contrasts
>
> cor.test(pic.rain,pic.rain) # To test for a correlation, obviously for rain 
> and rain it would be 1.
>
> How can this be done using data such as habitat, i.e grassland/forest/desert, 
> or activity, i.e. nocturnal, diurnal etc?
>
> I would be very grateful for any suggestions.
>
> Kate.
>
>   [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
>
>
> Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : 
> http://f.security-mail.net/301tdFND1Ht
>
>

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] multiple regression with binomial distribution

2016-01-26 Thread Theodore Garland Jr
You might also want to read about the background, starting with these two 
papers, both available at my website:

Ives, A. R., and T. Garland, Jr.  2010.  Phylogenetic logistic regression for 
binary dependent variables.  Systematic Biology  59:9-26.  

Ives, A. R., and T. Garland, Jr.  2014.  Phylogenetic regression for binary 
dependent variables.  Pages 231-261 in Modern Phylogenetic Comparative Methods 
and Their Application in Evolutionary Biology: Concepts and Practice, L. Z. 
Garamszegi, ed.  Springer: Heidelberg.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Florian 
Boucher [floflobouc...@gmail.com]
Sent: Tuesday, January 26, 2016 8:34 AM
To: Knappová Jana
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] multiple regression with binomial distribution

Hi Jana,

If your data are proportions, you might want to model their logit, ie
log(X/(1-X)), rather than their raw value. You can then use PGLS in the
same manner as you did. An ML value of 0 for lambda indicates that you are
actually fitting a non-phylogenetic model, but it is safer to allow for
lambda to vary in case there would be signal in the residuals of the
regression.
If your data are 0/1, then you should rather use phylogenetic logistic
regression.  This is implemented for example in the 'phyloglm' function in
the R package 'phylolm'.

Cheers,
Florian

2016-01-26 16:16 GMT+01:00 Knappová Jana :

> Hi everyone,
>
> I am not very familiar with phylogenetics, but i would like to incorporate
> it somehow into my work and i appreciate any suggestions.
>
> Is it possible to use any kind of phylogenetically informed analysis in
> case of multiple regression (one response ~ multiple predictors) in case I
> assume binomial distribution of response variable? I try to explain species
> occurrence (proportional data) by a couple of species traits.
>
> I tried pgls function from "caper" R package, but I am not sure about it.
> Generally, it seems that there is not strong signal in my data, when I used
> lambda="ML" than lambda was set to zero.
>
> Thanks
>
> Jana Knappová
> Botanický ústav AV ČR, v. v. i. | Institute of Botany of the CAS
> Zámek 1, 252 43 Průhonice | Zamek 1, CZ-25243 Pruhonice
> Česká republika | Czech Republic
> jana.knapp...@ibot.cas.cz
> www.ibot.cas.cz
> www.pruhonickypark.cz
> Telefon: 271015401, 737375227 | Phone: +420-271015401, 737375227
> Fax: 271015105 | Fax: +420-271015105
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at
> http://www.mail-archive.com/r-sig-phylo@r-project.org/




--
Florian Boucher
Postdoctoral researcher, Institute of Systematic Botany, Zürich

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] PGLS multiple regression with dummy variables and interaction terms

2015-08-08 Thread Theodore Garland Jr
Dear Patrick,

Yes, many, many examples could be cited, and I'll add a couple of my own below.
More generally, though, remember that there is generally nothing "magic" about 
phylogenetically informed statistical methods, such as so-called PGLS.
PGLS is just GLS done with use of phylogenetic information.
And GLS is just OLS with some assumptions relaxed.
(Of course, optimal estimation may get a little more complicated in some cases.)
And don't forget that PGLS is the same as Felsenstein's (1985) phylogenetically 
independent contrasts!
(Not including more complicated models that estimate optimal transformations of 
phylogenetic branch lengths.)

Garland, Jr., T., and A. R. Ives. 2000. Using the past to predict the present: 
confidence intervals for regression equations in phylogenetic comparative 
methods. American Naturalist 155:346–364.

Gartner, G. E. A., J. W. Hicks, P. R. Manzani, D. V. Andrade, A. S. Abe, T. 
Wang, S. M. Secor, and T. Garland Jr. 2010. Phylogeny, ecology, and heart 
position in snakes. Physiological and Biochemical Zoology 83:43–54.

Blomberg, S. P., J. G. Lefevre, J. A. Wells, and M. Waterhouse. 2012. 
Independent contrasts and PGLS regression estimators are equivalent. Systematic 
Biology 61:382–391.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Chris Organ 
[organch...@gmail.com]
Sent: Saturday, August 08, 2015 8:48 AM
To: Patrick Gemmell; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] PGLS multiple regression with dummy variables and 
interaction terms

Dear Patrick,

Sure - see the following as an example (using BayesTraits, but easily
done in R too):

Organ, C. L., A. Canoville, R. R. Reisz, and M. Laurin. (2011).
Paleogenomic data suggest mammal-like genome size in the ancestral
amniote and derived large genome size in amphibians. Journal of
Evolutionary Biology. 24: 372–380.

Best, Chris
_
Chris Organ
Department of Microbiology and Immunology
Department of Earth Sciences
Montana State University, Bozeman, MT 59717
or...@montana.edu
www.organlab.net

On Fri, Aug 7, 2015 at 11:06 AM, Patrick Gemmell
 wrote:
> Dear R-sig-phylo list,
> I have a non-phylogenetic multiple regression y ~ x1 + ... + xn + d1 + d2 + 
> d3, where x1 ... xn are continuous variables and d1, d2 and d3 are dummy 
> variables (i.e. for each species in the tree I may have up to 4 data points). 
> In fact, sometimes my dummy variables interact with my continuous variables.
> Can I perform a similar multiple regression using the PGLS method? I am very 
> new to phylogenetic analysis with R, but it seems that both caper and ape 
> need to assign tip labels to row names, and of course, such row names would 
> not be unique and therefore make R unhappy.
> Any advice would be appreciated. Thank you for your time.
> -- Patrick
>
>
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] simulating rate shifts

2015-08-01 Thread Theodore Garland Jr
Hi Eric,

The thing is that it becomes very cumbersome to write user-friendly software 
with generalized simulation routines to allow various (unlimited?) ad hoc 
changes in rates of trait evolution, selection regimes (e.g., OU), rates of 
speciation, etc.  so, the expedient approach is often called for.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Eric 
[eric...@hotmail.com]
Sent: Saturday, August 01, 2015 1:12 AM
To: Liam J. Revell
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] simulating rate shifts

Hi Liam,

Yes, this is what I meant. I’m a little surprised that no process-based 
simulation - rather than prune-and-graft - method exists. In any case, thank 
you for the example, it is very helpful.

Regards,
Eric


> On Jul 31, 2015, at 8:07 PM, Liam J. Revell  wrote:
>
> Hi Emmanuel & Eric.
>
> I think it's possible that Eric is interested in simulating shifts in the 
> lineage diversification (speciation and/or extinction) rate, rather than the 
> rate of phenotypic trait evolution.
>
> It is possible to simulate various scenarios of trait-based diversification 
> in the package diversitree, I believe; however if you are merely interested 
> in taking (or simulating some tree) and then imagining (and simulating) a 
> different diversification process for part of that tree, then this is exactly 
> the same as simulating first one tree under process 1 - then pruning a 
> subtree, simulating a replacement subtree under process 2, and attaching the 
> new subtree from whence the previous subtree was removed.
>
> Since this is easier said then done, I posted a more detailed worked example 
> on my blog here: 
> http://blog.phytools.org/2015/07/simulating-arbitrary-shift-in.html.
>
> All the best, Liam
>
> Liam J. Revell, Assistant Professor of Biology
> University of Massachusetts Boston
> web: http://faculty.umb.edu/liam.revell/
> email: liam.rev...@umb.edu
> blog: http://blog.phytools.org
>
> On 7/31/2015 10:57 AM, Emmanuel Paradis wrote:
>> Hi Eric,
>>
>> See the function rTraitCont in ape: the parameters of the BM or OU model
>> can be branch-specific, so it's easy to specify a change in parameter(s)
>> at a given node. There's an example there:
>>
>> http://www.mpcm-evolution.org/practice/online-practical-material-chapter-13/chapter-13-2-traits
>>
>>
>> Cheers,
>>
>> Emmanuel
>>
>> Le 30/07/2015 11:31, Eric Lewitus a écrit :
>>> Hello,
>>>
>>> There are several functions available for simulating rate shifts in
>>> trees (e.g., SimTree, TESS), but these implement tree-wide shifts,
>>> which are somewhat unrealistic, rather than shifts descending from a
>>> particular node. Is it possible to implement a more realistic rate
>>> shifted tree? Has such a thing already been implemented?
>>>
>>> Thanks.
>>>[[alternative HTML version deleted]]
>>>
>>> ___
>>> R-sig-phylo mailing list - R-sig-phylo@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>>> Searchable archive at
>>> http://www.mail-archive.com/r-sig-phylo@r-project.org/
>>>
>>>
>>> Pour nous remonter une erreur de filtrage, veuillez vous rendre ici :
>>> http://f.security-mail.net/301iAWLdbwV
>>>
>>>
>>
>> ___
>> R-sig-phylo mailing list - R-sig-phylo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>> Searchable archive at
>> http://www.mail-archive.com/r-sig-phylo@r-project.org/
>

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] R-squared alternative for gls

2015-07-20 Thread Theodore Garland Jr
It's not that r squared isn't meaningful for generalized least squares but 
rather that it cannot be compared directly with values from OLS models.

Cheers,
Ted

From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
Sent: Monday, July 20, 2015 4:11 AM
To: R phylo mailing list mailing list
Subject: [R-sig-phylo] R-squared alternative for gls

Hello members,

I'm creating relative values os semicircular canal size by fitting a PGLS
and extracting residuals (using phyl.resid). I've heard that R-squared
isn't meaningful in gls models. What I'm trying to do is to know is which
of the two independent variables is best and on a lm () model I would just
check the R-squared. Is the alternative, in the case of gls(), looking at
the AIC or logLik?

Thanks in advance.

Best regards,
Sérgio.

--
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology candidate
Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
Geociências - Universidade de Évora

Lisboa, Portugal
ᐧ

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] testing for variation in rates of evolution among traits

2015-07-16 Thread Theodore Garland Jr
If everything is log-transformed then the variance of phylogenetically 
independent contrasts or, equivalently, the MSE (if I remember correctly) from 
a PGLS analysis is directly related to the rate of trait evolution.  I'm not 
sure of the best way to test for statistical differences among traits, but I am 
sure you could do this with simulations.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Karla Shikev 
[karlashi...@gmail.com]
Sent: Thursday, July 16, 2015 2:13 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] testing for variation in rates of evolution among
traits

Hi there,

I've come across several methods to test for differences in the rate of
evolution among branches in a tree, but I can't find methods to test for
differences in rates of evolution of different traits on the same species
(ex. if wing size evolution is faster than than overall body size
evolution). Any suggestions?

Thanks!

Karla

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] PGLS with non-ultrametric tree

2015-07-16 Thread Theodore Garland Jr
Yep, we've all been down this road before, but I'm too old to remember!

Thanks and cheers,
Ted

From: Paolo Piras [paolo.pi...@uniroma3.it]
Sent: Thursday, July 16, 2015 2:38 PM
To: Solomon Chak; Theodore Garland Jr
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] PGLS with non-ultrametric tree

I really think this post could be useful for the discussion

https://stat.ethz.ch/pipermail/r-sig-phylo/2010-September/000773.html

best
paolo


Da: R-sig-phylo  per conto di Solomon Chak 

Inviato: giovedì 16 luglio 2015 23.19
A: Theodore Garland Jr
Cc: r-sig-phylo@r-project.org
Oggetto: Re: [R-sig-phylo] PGLS with non-ultrametric tree

Hi Dr. Garland,

I got the impression that an ultrametric tree is needed for comparative
analysis from this book <http://www.springer.com/us/book/9783662435496>ch.
2 pg. 38: "most comparative analyses assume that the tree is ultrametric,
as the majority of analyses deal with evolution of phenotypic traits of
extant species with the underlying assumption is that the time available
for phenotypic evolution is the same for all taxa".

I understand that the methodology of PGLS can use any tree form, I suppose
there're different assumptions if I used an additive tree or an ultrametric
tree. Could you guide me to some references that explicitly discuss about
this?

Is it necessary to use an ultrametric tree If I want to estimate lambda in
the residual error of the gls and do a branch length transformation as Revell
2010
<http://onlinelibrary.wiley.com/doi/10./j.2041-210X.2010.00044.x/pdf>
suggested?

Many thanks!

Cheers,
Solomon Chak

---
*Solomon **Tin Chi **Chak*
Ph.D. Candidate
Tel: (804) 684-7484
Marine Biodiversity Laboratory
<http://www.vims.edu/research/units/labgroups/marine_biodiversity/index.php>
Virginia Institute of Marine Science <http://www.vims.edu/>
College of William and Mary <http://www.wm.edu/>
PO Box 1346 / Rt. 1208 Greate Rd., Gloucester Pt, VA 23062, USA


On Thu, Jul 16, 2015 at 2:55 PM, Theodore Garland Jr <
theodore.garl...@ucr.edu> wrote:

> Dear Solomon,
>
> I don;t know where you are trying to go with this, but any proper
> implementation of PGLS (I am not talking about methods that transform the
> branch lengths with things like Grafen's rho, Pagel's lambda or OU models)
> should be able to use any tree of any shape.  This is the same as for
> phylogenetically independent contrasts.
>
> Cheers,
> Ted
>
> Theodore Garland, Jr., Professor
> Department of Biology
> University of California, Riverside
> Riverside, CA 92521
> Office Phone:  (951) 827-3524
> Facsimile:  (951) 827-4286 (not confidential)
> Email:  tgarl...@ucr.edu
> http://www.biology.ucr.edu/people/faculty/Garland.html
> http://scholar.google.com/citations?hl=en&user=iSSbrhwJ
>
> Director, UCR Institute for the Development of Educational Applications
>
> Editor in Chief, Physiological and Biochemical Zoology
>
> Fail Lab: Episode One
> http://testtube.com/faillab/zoochosis-episode-one-evolution
> http://www.youtube.com/watch?v=c0msBWyTzU0
>
> 
> From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of
> Solomon Chak [tc...@vims.edu]
> Sent: Thursday, July 16, 2015 3:31 AM
> To: r-sig-phylo@r-project.org
> Subject: [R-sig-phylo] PGLS with non-ultrametric tree
>
> Dear all,
>
> What are the pros and cons of the two methods to do pgls with a
> non-ultrametric tree? Many thanks!
>
> 1) Convert the additive tree to ultrametric using penalized likelihood
> (Sanderson 2002) with ape:: chronopl after cross-validation to find the
> best lambda.
>
> 2) Use weighted least-squares in which gls(y ~ x,
> correlation=corPagel(value=0.1, phy=phy, fixed=F),
> weights=varFixed(~tip.heights),
> data=dat)
>
> Cheers,
> Solomon Chak
>
> ---
> *Solomon **Tin Chi **Chak*
> Ph.D. Candidate
> Tel: (804) 684-7484
> Marine Biodiversity Laboratory
> <
> http://www.vims.edu/research/units/labgroups/marine_biodiversity/index.php
> >
> Virginia Institute of Marine Science <http://www.vims.edu/>
> College of William and Mary <http://www.wm.edu/>
> PO Box 1346 / Rt. 1208 Greate Rd., Gloucester Pt, VA 23062, USA
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at
> http://www.mail-archive.com/r-sig-phylo@r-project.org/
>

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-

Re: [R-sig-phylo] PGLS with non-ultrametric tree

2015-07-16 Thread Theodore Garland Jr
Dear Solomon,

I don;t know where you are trying to go with this, but any proper 
implementation of PGLS (I am not talking about methods that transform the 
branch lengths with things like Grafen's rho, Pagel's lambda or OU models) 
should be able to use any tree of any shape.  This is the same as for 
phylogenetically independent contrasts.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Solomon Chak 
[tc...@vims.edu]
Sent: Thursday, July 16, 2015 3:31 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] PGLS with non-ultrametric tree

Dear all,

What are the pros and cons of the two methods to do pgls with a
non-ultrametric tree? Many thanks!

1) Convert the additive tree to ultrametric using penalized likelihood
(Sanderson 2002) with ape:: chronopl after cross-validation to find the
best lambda.

2) Use weighted least-squares in which gls(y ~ x,
correlation=corPagel(value=0.1, phy=phy, fixed=F),
weights=varFixed(~tip.heights),
data=dat)

Cheers,
Solomon Chak

---
*Solomon **Tin Chi **Chak*
Ph.D. Candidate
Tel: (804) 684-7484
Marine Biodiversity Laboratory
<http://www.vims.edu/research/units/labgroups/marine_biodiversity/index.php>
Virginia Institute of Marine Science <http://www.vims.edu/>
College of William and Mary <http://www.wm.edu/>
PO Box 1346 / Rt. 1208 Greate Rd., Gloucester Pt, VA 23062, USA

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] simulating a labile trait

2015-07-10 Thread Theodore Garland Jr
Hi Glenn,

I am not up on the latest simulation options in R, but for some relevant 
general discussions you might check these old papers (PDFs are on my website):

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.

Díaz-Uriarte, R., and T. Garland, Jr. 1996. Testing hypotheses of correlated 
evolution using 
phylogenetically independent contrasts: sensitivity to deviations from 
Brownian motion. 
Systematic Biology 45:27-47. Abstract  [PDF file] 

Díaz-Uriarte, R., and T. Garland, Jr. 1998. Effects of branch length errors on 
the performance of 
phylogenetically independent contrasts. Systematic Biology 47:654-672. 

Garland, T., Jr., and R. Díaz-Uriarte. 1999. Polytomies and phylogenetically 
independent contrasts: 
an examination of the bounded degrees of freedom approach. Systematic 
Biology 48:547-558. 

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Glenn 
Seeholzer [seeholzer.gl...@gmail.com]
Sent: Friday, July 10, 2015 9:56 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] simulating a labile trait

Hi all,
I'm looking for a way to simulate a labile trait given a phylogenetic tree
of say 200-300 tips. The ultimate goal is to examine the behavior of BAMM
when a trait violates the underlying assumption of Brownian motion trait
evolution.

I'd like the simulated trait to mimic the evolution of a trait like the
climatic-niche, in which there is a bounded trait space and distantly
related lineages may converge on the same distribution of trait values
(think two clades independently diversifying into the same set of diverse
environments).

In my empirical data, when I divide a tree into independent subclades,
climatic-niche evolution within these subclades is best fit by a BM model
relative to OU. Let's assume for the moment that BM is a good model for
climatic-niche evolution within subclades, yet not across an entire tree.
One thought I had was to divide a simulated tree into subclades, then
simulate a BM trait for each subclade. This would result in simulated trait
values for all tips in the tree and with the desired pattern of convergence
among distantly related lineages. However, I'm unsure if the trait values
overall would be that different from a BM trait simulated on the entire
tree, or if there a more appropriate approach.

Thanks in advance for your help.

Cheers,
Glenn











--
Glenn F. Seeholzer
Museum of Natural Science
Foster Hall 119
LSU, Baton Rouge, LA 70803
215-872-3017

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] phyres function R package caper

2015-06-24 Thread Theodore Garland Jr
Thank you, Liam!

Cheers,
Ted

From: Liam J. Revell [liam.rev...@umb.edu]
Sent: Wednesday, June 24, 2015 10:24 AM
To: Theodore Garland Jr; Sergio Ferreira Cardoso; R phylo mailing list mailing 
list
Subject: Re: [R-sig-phylo] phyres function R package caper

Hi all.

To the original question, you should be able to get these values first
using gls(...,correlation=corBrownian(...)) in nlme & then applying
residuals to the fitted model returned by gls. For instance, for data
frame X with variables x & y, and ultrametric phylogeny tree, you might
compute:

library(ape)
library(nlme)
fit<-gls(y~x,data=X,correlation=corBrownian(1,tree))
residuals(fit)

(phytools also has a function for this, phyl.resid, but it does exactly
the same thing as the code above, and thus there is really no reason to
prefer that function - except perhaps to cross-check your result for
errors.)

With regards to Ted's comment, indeed these are different quantities.
Though the fitted coefficients from a contrasts regression should be the
same as above, the residuals will be different (and there will be one
fewer of them, besides). These residuals, from the contrasts regression,
should be phylogenetically independent; however they are not longer
associated with species, but with 'contrasts' or nodes in the tree. To
obtain these residuals from a contrasts regression you should be able to
do something like:

X<-X[tree$tip.label,] ## precautionary
pic.x<-pic(X[,"x"],tree)
pic.y<-pic(X[,"y"],tree)
fit<-lm(pic.y~pic.x-1)
residuals(fit)

There is no particular reason to prefer one set of quantities over the
other - it just depends on what subsequent analyses are intended. In the
former case, the residuals are associated with species - but these
residuals consequently will be phylogenetically correlated & thus the
tree needs to be taken into consideration in any subsequent analysis.
The latter residuals are phylogenetically independent, but no longer
associated with species. (I hate to cite myself, but this is discussed
in my paper Revell 2009; Evolution.)

I hope this is of some help.

All the best, Liam

Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 6/24/2015 12:35 PM, Theodore Garland Jr wrote:
> Hi All,
>
> I am going to suggest that when people want any sort of "phylogenetic 
> residuals" they do some checking on their own to try to verify what, exactly, 
> they are getting.  Here's one check you can do.  Compute phylogenetically 
> independent contrasts for two traits.  Perform a regression (through the 
> origin, of course) of one trait on the other.  Save the residuals.  Compare 
> them with the "phylogenetic residuals" you get from some other program that 
> does a PGLS regression (not with any transformation of the branch lengths).  
> Let us know what you find!
>
> Cheers,
> Ted
>
> Theodore Garland, Jr., Professor
> Department of Biology
> University of California, Riverside
> Riverside, CA 92521
> Office Phone:  (951) 827-3524
> Facsimile:  (951) 827-4286 (not confidential)
> Email:  tgarl...@ucr.edu
> http://www.biology.ucr.edu/people/faculty/Garland.html
> http://scholar.google.com/citations?hl=en&user=iSSbrhwJ
>
> Director, UCR Institute for the Development of Educational Applications
>
> Editor in Chief, Physiological and Biochemical Zoology
>
> Fail Lab: Episode One
> http://testtube.com/faillab/zoochosis-episode-one-evolution
> http://www.youtube.com/watch?v=c0msBWyTzU0
>
> 
> From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
> Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
> Sent: Wednesday, June 24, 2015 9:21 AM
> To: R phylo mailing list mailing list
> Subject: [R-sig-phylo] phyres function R package caper
>
> Dear all,
>
> When I try to get a list os phylogenetic residuals using phyres function
> from R package I get this message: Error: could not find function "phyres".
> Does anyone know how to solve this problem?
>
>> phyres(fit.gls1)
> Error: could not find function "phyres"
>
> ​Best regards,
> Sérgio.​
>
> --
> Com os melhores cumprimentos,
> Sérgio Ferreira Cardoso.
>
> 
>
> Best regards,
> Sérgio Ferreira Cardoso
>
>
>
>
> MSc. Paleontology candidate
> Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
> Geociências - Universidade de Évora
>
> Lisboa, Portugal
>
>  [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.et

Re: [R-sig-phylo] phyres function R package caper

2015-06-24 Thread Theodore Garland Jr
Hi All,

I am going to suggest that when people want any sort of "phylogenetic 
residuals" they do some checking on their own to try to verify what, exactly, 
they are getting.  Here's one check you can do.  Compute phylogenetically 
independent contrasts for two traits.  Perform a regression (through the 
origin, of course) of one trait on the other.  Save the residuals.  Compare 
them with the "phylogenetic residuals" you get from some other program that 
does a PGLS regression (not with any transformation of the branch lengths).  
Let us know what you find!

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
Sent: Wednesday, June 24, 2015 9:21 AM
To: R phylo mailing list mailing list
Subject: [R-sig-phylo] phyres function R package caper

Dear all,

When I try to get a list os phylogenetic residuals using phyres function
from R package I get this message: Error: could not find function "phyres".
Does anyone know how to solve this problem?

> phyres(fit.gls1)
Error: could not find function "phyres"

​Best regards,
Sérgio.​

--
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology candidate
Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
Geociências - Universidade de Évora

Lisboa, Portugal

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] Non-ultrametric tree PGLS

2015-05-14 Thread Theodore Garland Jr
Agreed!

Similarly, Pagel's lambda ad Grafen's rho were designed from a purely 
statistical perspective, whereas OU and ACDC models are motivated by ties to a 
possible set of biological processes.

Cheers,
Ted

From: Alejandro Gonzalez Voyer [alejandro.gonza...@iecologia.unam.mx]
Sent: Thursday, May 14, 2015 8:47 AM
To: Theodore Garland Jr
Cc: Sergio Ferreira Cardoso; R phylo mailing list mailing list
Subject: Re: [R-sig-phylo] Non-ultrametric tree PGLS

Hi Sergio,

I would add to Ted’s reply that you are not only considering alternative 
statistical models but that the evolutionary assumptions from the models you 
are fitting also differ, and you need to keep this in mind when comparing 
models. Comparison of AICs or any other estimate of goodness of fit must also 
involve careful consideration of the assumptions of the models you are 
comparing. In your particular case, the tree with branch lengths set to equal 
values (all branch lengths = 1) implies different amount of time to evolve for 
each of your species (in other words the expected variances - diagonal terms in 
the variance-covariance matrix - differ between the species), and thus you 
should consider whether such an assumption makes biological sense in your 
system.

Cheers

Alejandro
___
Dr Alejandro Gonzalez Voyer

Laboratorio de Conducta Animal
Instituto de Ecología
Circuito Exterior S/N
Ciudad Universitaria
Universidad Nacional Autónoma de México
México, D.F.
04510
México

Tel: +52 55 5622 9044
E-mail: 
alejandro.gonza...@iecologia.unam.mx<mailto:alejandro.gonza...@iecologia.unam.mx>


El 14/05/2015, a las 10:39, Theodore Garland Jr 
mailto:theodore.garl...@ucr.edu>> escribió:

Hi Sergio,

I am not quite understanding the situation nor why you see a "problem."  if I 
understand correctly, you are considering these five (5) alternative models for 
some sort of simple or multiple regression:

OLS = star phylogeny
PGLS with real-time branch lengths (ultrametric)
Pagel's lambda with real-time branch lengths (ultrametric)
PGLS with all branch legnths equal to 1.0
Pagel's lambda with all branch lengths equal to 1.0

To help decide which model best fits your data, you can look at AIC or for some 
comparisons do a likelihood ratio test.

My experience is that any of the transform models (Pagel's lambda, Grafen's 
rho, OU in various implementations, ACDC) can sometimes yield really bizarre 
results when you start with a non-ultrametric tree.  You need to be careful and 
check the REML likelihood surface for multiple peaks, etc.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu<mailto:tgarl...@ucr.edu>
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
Sent: Thursday, May 14, 2015 8:32 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Non-ultrametric tree PGLS

Hello all,

I have an ultrametric phylogenetic tree with divergence times as branch
lengths. To see if there was a big difference between using these branch
lengths and equal (=1) branch lengths I set all lengths to 1 and ran a
PGLS. I ran with Lambda transformations and the estimation is that Lambda
is superior than 1 (both with ML and REML estimation). I suppose this is a
consequence of the tree being non ultrametric. Is there a solution for this
problem or should I, in this case, just ran a GLS (Brownian Motion) to
avoid the over estimation of the phylogenetic signal?

Best regards,
Sérgio.

--
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology candidate
Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
Geociências - Universidade de Évora

Lisboa, Portugal
ᐧ

   [[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


[[alternative HTML version deleted]]

__

Re: [R-sig-phylo] Non-ultrametric tree PGLS

2015-05-14 Thread Theodore Garland Jr
Hi Sergio,

I am not quite understanding the situation nor why you see a "problem."  if I 
understand correctly, you are considering these five (5) alternative models for 
some sort of simple or multiple regression:

OLS = star phylogeny
PGLS with real-time branch lengths (ultrametric)
Pagel's lambda with real-time branch lengths (ultrametric)
PGLS with all branch legnths equal to 1.0
Pagel's lambda with all branch lengths equal to 1.0

To help decide which model best fits your data, you can look at AIC or for some 
comparisons do a likelihood ratio test.

My experience is that any of the transform models (Pagel's lambda, Grafen's 
rho, OU in various implementations, ACDC) can sometimes yield really bizarre 
results when you start with a non-ultrametric tree.  You need to be careful and 
check the REML likelihood surface for multiple peaks, etc.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
Sent: Thursday, May 14, 2015 8:32 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Non-ultrametric tree PGLS

Hello all,

I have an ultrametric phylogenetic tree with divergence times as branch
lengths. To see if there was a big difference between using these branch
lengths and equal (=1) branch lengths I set all lengths to 1 and ran a
PGLS. I ran with Lambda transformations and the estimation is that Lambda
is superior than 1 (both with ML and REML estimation). I suppose this is a
consequence of the tree being non ultrametric. Is there a solution for this
problem or should I, in this case, just ran a GLS (Brownian Motion) to
avoid the over estimation of the phylogenetic signal?

Best regards,
Sérgio.

--
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology candidate
Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
Geociências - Universidade de Évora

Lisboa, Portugal
ᐧ

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] Weird estimated Lambda values (PGLS)

2015-05-08 Thread Theodore Garland Jr
Do you have a plot of the likelihoods versus the parameter value?

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
Sent: Friday, May 08, 2015 3:33 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Weird estimated Lambda values (PGLS)

Dear all,

I performed a PGLS with a tree with divergence times as branch lengths. I
used 1 dependent and 1 independent variable. When I estimate the Lambda (in
Pagel's method) I get the Maximum Likelihood Lambda ~0 and the Restricted
Maximum Likelihood Lambda 0.878054. This is really strange. I was thinking
I might have a tree with incorrect branchlengths but I checked the plot of
absolute value of contrast vs. standard deviation for both variables and
it's ok (according to Garland et al., 1992). With OU transformation I don't
have the same problem. However, the p-value of phylogenetic (both with OU
or with Brownian Motion PGLS) aren't very different from the ordinary
least-squares. Is there any other ordinary procedure/analysis I should make
other than the plots I checked to check my tree? (I understand that there
is a chance that the characters I am using have influence and maybe the
tree doesn't make any difference).

Best regards,
Sérgio.

--
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology candidate
Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
Geociências - Universidade de Évora

Lisboa, Portugal
ᐧ

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] PGLS vs OUwie?

2015-05-05 Thread Theodore Garland Jr
Dear Will,

I suggest that you read the Appendix in this paper Lavin et al. (2008) 
(available on my website) and then the original papers by Butler and King on 
OUCH, etc.

http://www.jstor.org/stable/10.1086/590395

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of William 
Gearty [wgea...@stanford.edu]
Sent: Tuesday, May 05, 2015 8:39 AM
To: r-sig-phylo
Subject: [R-sig-phylo] PGLS vs OUwie?

Hi all,
This may be a very basic question, but I have been racking my brain since
my advisor asked me yesterday in our meeting.
What are the fundamental differences (if any) between GLS (PGLS) and
something like ouch or OUwie?
If there is already literature related to this, please feel free to just
point me in that direction.
Thanks in advance,
Will

--
William Gearty
PhD Student, Paleobiology
Department of Geological Sciences
Stanford School of Earth, Energy & Environmental Sciences
people.stanford.edu/wgearty

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] Non normal PGLS results

2015-04-18 Thread Theodore Garland Jr
If you get such a large difference between ML and REML estimation in this sort 
of situation then probably either (1) something is wrong with the code (bad 
search algorithm?) or (2) you have something pathological in your tip data set 
and/or the tree (e.g., some really long singleton branches or really short 
sister branches).  If you see a big outlier in the residuals, then this is a 
problem - I would not trust the results.  How do the residuals look from a 
regular OLS analysis?

Cheers,
Ted

From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
Sent: Saturday, April 18, 2015 10:59 AM
To: Liam J. Revell
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] Non normal PGLS results

Hello,

Thank you very much for the answer. I assumed PGLS residuals had to be
normal (I saw this thread:
https://stat.ethz.ch/pipermail/r-sig-phylo/2012-May/002064.html). In fact,
what I'm analysing are standardized residuals (standardized by setting the
determinant of the covariance matrix equal to one).

I thought something was wrong with the residuals because when estimating
the Lamba using ML I get a completely different result from estimating it
with REML (e.g., REML est: 0.945; M est: ~0). Do you have any idea of wat
could be causing this?

Once again, thank you for answering.

Best regards,
Sérgio.
ᐧ

2015-04-18 18:22 GMT+01:00 Liam J. Revell :

> Hi Sergio.
>
> We don't expect the residuals from PGLS to be independent draws from a
> normal distribution, but multivariate normal with a correlation structure
> given by the tree.
>
> Here I give some more explanation of this on my blog:
> http://blog.phytools.org/2013/02/a-comment-on-distribution-of-residuals.html
> .
>
> Let us know if this is helpful.
>
> All the best, Liam
>
> Liam J. Revell, Assistant Professor of Biology
> University of Massachusetts Boston
> web: http://faculty.umb.edu/liam.revell/
> email: liam.rev...@umb.edu
> blog: http://blog.phytools.org
>
>
> On 4/18/2015 1:15 PM, Sergio Ferreira Cardoso wrote:
>
>> Dear all,
>>
>> I'm performing PGLS's with an ultrametric phylogenetic tree (divergence
>> time as branchlengths). I tied Pagel's Lambda transformation, OU
>> transformation, regular GLS and OLS, to compare results. There is one
>> problem: the residuals of my analyses are not normal. I tried to remove
>> big
>> outliers but it made things even worse, because without them there are
>> even
>> more outliers.
>>
>> So, what should I do? The results are consistent in both 4 tests. But can
>> I
>> trust the results of the PGLS? Is it particularly bad if PGLS residuals
>> aren't normal? Does it critically afect my results?
>>
>> Thanks in advance.
>>
>> Best regards,
>> Sérgio.
>>
>>


--
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology candidate
Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
Geociências - Universidade de Évora

Lisboa, Portugal

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] PGLS transformations

2015-04-13 Thread Theodore Garland Jr
In Mesquite, make sure you have the "Branches proportional to lengths" option 
checked so that the tree you are looking at shows the real branch lengths it 
has!  this is NOT the default option in Mesquite!

Cheers,
Ted

From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
Sent: Monday, April 13, 2015 10:13 AM
To: Emmanuel Paradis
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] PGLS transformations

Hello,

Thank you both for the help.
Emmanuel, so is there a way to see contrasts in R? Reading this paper
- Garland, T., Harvey, P. H., & Ives, A. R. (1992). Procedures for the
analysis of comparative data using phylogenetically independent contrasts.
Systematic Biology, 41(1), 18-32. - I was aware of the importance of
standardizing contrasts and of comparing Absolute value of standard contrat
vs Standard deviation of contrast. I've learned to do this in Mesquite but
I don't know if R alows this to be done. When I run the GLS I ask R to
estimate the rho, so, a priori I never know the rho value.

Maybe I'm really really confused, but here is the reason why I tthink
something isn't right with my analysis: I built a phylogenetic tree in
Mesquite, and based on several works I used million years as branch
lengths. It makes sense for me because I'll be using a fossil on my
analysis. But I tested the tree before adding the extinct taxa, so to make
sure everything was OK when the tree was ultrametric. I noticed that, for
example, whatever the independent variable (X) was, the alpha from OU was
extremely high (0.999182, for instance). It would always be 0.999. I
thought maybe I was using the wrong transformation... That's why I ended up
trying to know if I needed to do something prior to transforming and
analysing the tree.

Thank you very much.

Best regards,
Sérgio.
ᐧ

2015-04-13 17:17 GMT+01:00 Emmanuel Paradis :

> Hi Sérgio,
>
> There is indeed generally a relationship between branch length
> transformations and correlation structures. You may check that with the
> function vcv2phylo, e.g.:
>
> > tr <- rcoal(20)
> > co <- corGrafen(1, phy = tr)
> > ts <- vcv2phylo(vcv(co))
> > all.equal(tr, ts)
> [1] FALSE
> > all.equal(compute.brlen(tr), ts)
> [1] TRUE
>
> compute.brlen() transforms the branch lengths according to Grafen's model
> with parameter rho = 1 (by default). Some other transformations of branch
> lengths are available in package geiger.
>
> Best,
>
> Emmanuel
>
> Le 12/04/2015 21:47, Sergio Ferreira Cardoso a écrit :
>
>> Hi everyone,
>>
>> I'm relatively new in phylogenetic comparative methods. I'm a little
>> confused about branch length transformations. I'm using a tree with
>> divergence time (My) as branch lengths. When I use corPagel, corGrafen or
>> corMartins in R, the branch lengths, are the branch lengths automatically
>> transformed? e.g., gr.mammals<-corGrafen(1,phylo,fixed=F);
>> fit<-gls(FCL~logBodymass,correlation=gr.mammals,data=df,method="ML").
>> My question may sound a bit nonsense but I've seen in some papers (e.g.,
>> Spoor,
>> F., Garland, T., Krovitz, G., Ryan, T. M., Silcox, M. T., & Walker, A.
>> (2007). The primate semicircular canal system and locomotion. *Proceedings
>> of the National Academy of Sciences*, *104*(26), 10808-10812.)  the
>> indication that a PGLS was made without branch transformation, but no
>> reference is made to the model (maybe it's corBrownian).
>>
>> Thank you very much.
>>
>> Best regards,
>> Sérgio.
>>
>>
>


--
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology candidate
Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
Geociências - Universidade de Évora

Lisboa, Portugal

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] PGLS transformations

2015-04-12 Thread Theodore Garland Jr
Dear Sergio,

I do not use R very much, relying instead on our Matlab programs that accompany 
Lavin et al. (2008):

Lavin S.R., W.H. Karasov, A.R. Ives, K.M. Middleton, and T. Garland Jr. 2008. 
Morphometrics of the avian small intestine compared with that of nonflying 
mammals: a phylogenetic approach. Physiological and Biochemical Zoology 
81:526–550.

I would strongly suggest that you read the appendix to this paper regarding 
methods, their history, and terminology.  Note that a GLS model does not 
inherently use any kind of branch length transformation.  It uses the tree as 
inputted.  It is mathematically equivalent to Felsenstein's (1985) 
phylogenetically independent contrasts.  It implicitly assumes character 
evolution (or residual character evolution) akin to Brownian motion.

Once you start estimating some branch lengths transformation along with 
regression parameters, you have a different beast.  See the appendix noted 
above and, for the original source of this sort of model, Grafen (1989).

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Sergio 
Ferreira Cardoso [sff.card...@campus.fct.unl.pt]
Sent: Sunday, April 12, 2015 12:47 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] PGLS transformations

Hi everyone,

I'm relatively new in phylogenetic comparative methods. I'm a little
confused about branch length transformations. I'm using a tree with
divergence time (My) as branch lengths. When I use corPagel, corGrafen or
corMartins in R, the branch lengths, are the branch lengths automatically
transformed? e.g., gr.mammals<-corGrafen(1,phylo,fixed=F);
fit<-gls(FCL~logBodymass,correlation=gr.mammals,data=df,method="ML").
My question may sound a bit nonsense but I've seen in some papers (e.g., Spoor,
F., Garland, T., Krovitz, G., Ryan, T. M., Silcox, M. T., & Walker, A.
(2007). The primate semicircular canal system and locomotion. *Proceedings
of the National Academy of Sciences*, *104*(26), 10808-10812.)  the
indication that a PGLS was made without branch transformation, but no
reference is made to the model (maybe it's corBrownian).

Thank you very much.

Best regards,
Sérgio.

--
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology candidate
Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa
Geociências - Universidade de Évora

Lisboa, Portugal

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] phytools - evaluating significance of pgls.Ives

2015-03-02 Thread Theodore Garland Jr
Andrea, remember that you can and should also do the "OLS" models (i.e., 
assuming a star phylogeny) with measurement error considered.  That's in the 
programs that accompany Ives, Midford, and Garland (2007, Syst. Biol. 
56:252–270), and were in the batch I just sent you.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Andrea 
Berardi [andrea.bera...@colorado.edu]
Sent: Monday, March 02, 2015 3:57 PM
To: r-sig-phylo@r-project.org
Cc: Anthony R Ives; Peter Smits
Subject: Re: [R-sig-phylo] phytools - evaluating significance of pgls.Ives

Thank you all very much for the comments! They are so helpful.

Yes, I do only have 8 species, and 3 replicates each. It is not ideal, but it's 
what we have and we have a phylogeny, so I'd like to try some tests 
incorporating phylogeny.

I probably should have added that I plan on running OLS to test each regression 
without the tree. This should give me an idea of the general relationship.

Regarding Liam's comment in pgls.Ives: Is the "lower=c(1e-8,1e-8)" call of the 
pgls.Ives call the part where it constrains the slope to (almost)zero?

I'll definitely give the MERegPHYSIGv2.m method a try as well, with Tony's 
diagnostic suggestions.

I will also go the LRT route with the data.

Thanks very much again for your help!
Andrea

~~
Andrea Berardi, PhD
Postdoctoral Researcher, Smith Lab
EBIO, University of Colorado-Boulder
andrea.bera...@colorado.edu



On Mar 1, 2015, at 8:42 PM, Liam J. Revell  wrote:

> Hi Andrea.
>
> This is not presently implemented, but since this is a likelihood method it 
> would be straightforward to constrain to a slope of zero and then do a LR 
> test. This would be probably be the easiest way to test a hypothesis about 
> the regression.
>
> That being said, as noted in the function documentation, some problems have 
> been reported with the optimization algorithm for this model, which is simple 
> and thus may fail to find the ML solution. Consequently, I would encourage 
> you to look for other implementations of the method so that you can be 
> confident in your result. I'm not aware of one in R at this time.
>
> All the best, Liam
>
> Liam J. Revell, Assistant Professor of Biology
> University of Massachusetts Boston
> web: http://faculty.umb.edu/liam.revell/
> email: liam.rev...@umb.edu
> blog: http://blog.phytools.org
>
> On 3/1/2015 10:31 PM, Andrea Berardi wrote:
>> Hi all,
>>
>> I'm just learning how to do PGLS analyses, and I'm looking for advice on how 
>> to evaluate the significance of the regression fit using pgls.Ives in the 
>> phytools package. I'm using this function because it incorporates sampling 
>> error of species means, and my data has about 3 individuals per species, 
>> with 8 species. My goal is to test whether a flower trait predicts the leaf 
>> trait, while controlling for shared ancestry. Here is the output from 
>> pgls.Ives:
>>
>>> fit <- pgls.Ives(Tree, Flower_trait, Leaf_trait)
>>> fit
>> $beta
>> [1] 96.3963098  0.1292656
>>
>> $sig2x
>> [1] 22218901073
>>
>> $sig2y
>> [1] 23027587
>>
>> $a
>> [1] -10063.150  -1204.422
>>
>> $logL
>> [1] -158.2337
>>
>> $convergence
>> [1] 0
>>
>> $message
>> [1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
>>
>> I am also running pgls on species averages for the traits using the gls 
>> function in nlme and the corBrownian and corMartins functions in ape. But, 
>> we are interested in incorporating the within-species variation in our small 
>> dataset.
>>
>> Any suggestions would be welcome!
>>
>> Thanks for your help,
>> Andrea
>>
>> ~~
>> Andrea Berardi, PhD
>> Postdoctoral Researcher, Smith Lab
>> EBIO, University of Colorado-Boulder
>>
>> ___
>> R-sig-phylo mailing list - R-sig-phylo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>> Searchable archive at http://www.mail-archive.com/

Re: [R-sig-phylo] How to test if the slope is different from 1 in PGLS?

2014-08-21 Thread Theodore Garland Jr
Just remember that if you have measurement error in the X variable then you 
likely underestimate the true slope:

Ives, A. R., P. E. Midford, and T. Garland. 2007. Within-species variation and 
measurement error in phylogenetic comparative methods. Systematic Biology 
56:252–270.

Also, if you have soft polytomies then you may want to subtract some d.f.:

Purvis, A., and T. Garland, Jr. 1993. Polytomies in comparative analyses of 
continuous characters. Systematic Biology 42:569–575.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Xavier Prudent [prudentxav...@gmail.com]
Sent: Thursday, August 21, 2014 3:06 AM
To: Gustavo Paterno
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] How to test if the slope is different from 1 in  
PGLS?

Hi Gustavo,

GLS returns the estimated slope and its uncertainty, you can then compute a
t-value where your null-hypothesis is "slope=1", and from that t-value get
a p-value.

Cheers,
Xavier


2014-08-20 21:30 GMT+02:00 Gustavo Paterno :

> Dear all,
> I am working with flower allometry and want to use PGLS to analyse how the
> male and female biomass of the flower scale with total flower biomass.
> So simple linear regressions, but log-trasformed.
>
> my model is:
> mod.male <- pgls(male~total, data=flower.data,lambda="ML")
>
> Besides calculating the slope of the regression I am also interested to
> test if the slope is different then 1. How can I do this in PGLS?
> I would be very glad if any one could help me with that.
>
> Kind regards,
> Gustavo Paterno
> -
> Gustavo B. Paterno
> Doutorando em Ecologia
> Departamento de Ecologia
> Universidade Federal do Rio Grande do Norte
> Natal, Brasil
> -
> skype: gustavopaterno
> pater...@cb.ufrn.br
>
>
>
>
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at
> http://www.mail-archive.com/r-sig-phylo@r-project.org/
>



--


*---Xavier Prudent*


*Computational biology and evolutionary genomics*

*Guest scientist at the Max-Planck-Institut für Physik komplexer Systeme*
*(MPI-PKS)*
*Noethnitzer Str. 38*

*01187 Dresden *

*Max Planck-Institute for Molecular Cell Biology and Genetics*
*(MPI-CBG)*
*Pfotenhauerstraße 108  *
*01307 Dresden*



*Phone: +49 351 210-2621*

*Mail: prudent [ at ] mpi-cbg.de <http://mpi-cbg.de>*
*---*

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] multiple traits measured within species and populations

2014-08-20 Thread Theodore Garland Jr
Dear Jorge,

For simplicity, I'd start with these two papers, both available on my webpage:

Purvis, A., and T. Garland, Jr. 1993. Polytomies in comparative analyses of 
continuous characters. Systematic Biology 42:569–575.

Theodore Garland, Jr., Paul H. Harvey, and Anthony R. Ives. 1992. Procedures 
for the analysis of comparative data using phylogenetically independent 
contrasts. Systematic Biology 41:18–32.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications

Editor in Chief, Physiological and Biochemical Zoology

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Jorge Sánchez Gutiérrez [jorgesgutier...@unex.es]
Sent: Wednesday, August 20, 2014 9:49 AM
To: r-sig-phylo@r-project.org Mailing-list
Subject: [R-sig-phylo] multiple traits measured within species and  
populations

Dear All,

I'm working on some comparative analyses involving up to 312 populations of 
birds representing 112 species, one  dependent variable (sometimes count data, 
e.g. species richness), various continuous independent variables (e.g. 
latitude, body mass), and a categorical variable (habitat: 3 levels). I'd be 
very grateful if I could get some input into these analyses:

I constructed a phylogeny for the species in my data sets. Because some species 
had been examined in multiple study locations (up to 14), I represented these 
with multiple points and added them as polytomies to the appropriate species 
tip in the original tree (as in , e.g., Anderson et al.; Ecology Letters, 
(2005) 8: 310–318). This yielded an ultrametric tree containing multiple 
polytomies. I've been running regressions in APE using gls and the correlation 
structures implemented in the package and it seems to work well except for 
'corPagel' when fitted with maximum likelihood (ML). In such a case I get the 
message: "Error in corFactor.corStruct(object) : NA/NaN/Inf in foreign function 
call (arg 1)". Example:

m1 <- gls(richness ~ Mass + Habitat + Latitude, data= richness, correlation = 
CorPagel, method = "ML")

But most importantly, I'm not sure if treating these points (means of 
'populations') as statistically independent replicates is correct. I've read 
some papers regarding how to account for intraspecific variation in 
phylogenetic analyses (including those referred to in the 2nd edition of 
Paradis) and some related posts. However, as far as I know I think these 
methods account for between-individual variation instead of for 
between-population variation. In my data set the repeated observations per 
species do not correspond to different individuals but populations within 
species. Maybe I'm on the wrong track with this, so any help is very welcome.

Best,

Jorge

Jorge S. Gutiérrez
Department of Anatomy, Cell Biology & Zoology.
Faculty of Sciences.
University of Extremadura.
Avenida de Elvas s/n.
E-06006 Badajoz,
Spain

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] Concentrated changes test

2014-05-16 Thread Theodore Garland Jr
Isn't it in Mesquite?

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications
http://idea.ucr.edu/

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Matt Pennell [mwpenn...@gmail.com]
Sent: Friday, May 16, 2014 9:04 AM
To: R-phylo Mailing-list
Subject: [R-sig-phylo] Concentrated changes test

Hi everyone,

Just a quick question: I was wondering if there is a R implementation of
Wayne Maddison's (1990) concentrated changes test (
http://www.jstor.org/stable/2409434). After a little looking around, I
can't seem to find it but was hoping someone else might have some ideas.

Thanks in advance,
Matt

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] Cross-validation with independent contrasts

2014-05-16 Thread Theodore Garland Jr
Couldn't you also just do this back at the level of the original tree and tip 
data, creating subsets by pruning the tree before you compute contrasts?

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Director, UCR Institute for the Development of Educational Applications
http://idea.ucr.edu/

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Diego Bilski [diegobil...@gmail.com]
Sent: Friday, May 16, 2014 7:55 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Cross-validation with independent contrasts

Dear all,

I'm wondering if it would be statistically/philosophically correct to use
n-fold cross-validation to evaluate a linear regression with independent
contrasts. My doubt comes from the fact that when simply dividing the IC
dataset in, lets say, 10 folds, some folds will remove the contrasts of
internal nodes without necessarily removing an entire clade above that
point, producing what can be viewed as two independent clades (a graphical
example would be, in Felsenstein's seminal paper, fig. 8, remove the
contrast at node 13, while keeping those at nodes 9 and/or 10).

Any thoughts?

Best wishes,

Diego Bilski

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] fitting cuadratic model using gnls

2013-12-10 Thread Theodore Garland Jr
I don't know, but one thing to watch out for is a high correlation between X 
and Xsquared.
That gives multicollinearity and can lead to numerical problems.
One thing that is commonly done is:
  1.  standardize the X variable (subtract mean and divide by standard 
deviation)
  2.  square that value and use it for the quadratic
This is referred to as an "orthogonol polynomial."

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
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Jorge Sánchez Gutiérrez [jorgesgutier...@unex.es]
Sent: Tuesday, December 10, 2013 9:48 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] fitting cuadratic model using gnls

Hello everyone,



I’m trying to fit nonlinear models using the function “gnls” in ape. For
example, I run a simple quadratic regression of moult duration (duration)
and latitude (latitude_used) as follows:



mod <- duration ~ latitude_used +I(latitude_used^2)

init<-list(alpha=1,beta=1)

m3 <- gnls(mod, data=data, start=init, correlation = dataCor)



However, I get the following error message:



“Error in gnls(mod, data=data, start = init, correlation = dataCor) :

  step halving factor reduced below minimum in NLS step”



I’ve also tried with several correlation structures and different starting
values for estimation, but without success. I would be very grateful if you
can provide any suggestions.



Thanks in advance,

Jorge S. Gutiérrez


[[alternative HTML version deleted]]


___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] best fit vs normality of residuals

2013-12-03 Thread Theodore Garland Jr
Good advice!

Cheers,
Ted

From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Luke Matthews [lmatth...@activatenetworks.net]
Sent: Tuesday, December 03, 2013 8:29 AM
To: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] best fit vs normality of residuals

Hi Agus,
If I understand your post correctly, you implemented the two models with 
exactly the same formula, and phylogenetic tree, and varied only the transform 
applied to the variables.  In one case the transform was to 'scale and center' 
both the dependent and independent variables while in the other case you rank 
ordered the all variables.  Please clarify if I have this wrong.
In this case you would have to compare the normality of the residuals, as when 
you transform the dependent variable in different ways I think the likelihoods 
will necessarily shift just because the distribution of the data being 
explained is shifted.  I don't think you can compare likelihoods, AICs, or BICs 
in this way when you alter the dependent, just as you can't compare 
likelihood-based values for models that include mostly the same data points but 
also some different ones.  You can only compare likelihood based values for 
models that have the exact same dependent data but differ in the formulation of 
the model's independent variables, autocorrelation parameters, etc.
As another point, although ranking seemed to fix your normality problem in this 
case, it may be introducing some other issues.  Ranked variables are usually 
too flat for linear regression analysis, and perhaps the test of residual 
normality you are using only detects some deviations like skewness (I'm not 
familiar with the Liliefors test).  I would recommend that instead of ranking 
you plot the distribution of your dependent and independent variables and try 
the transforms (log, arcsine, etc.) that a standard stats book would recommend 
given the appearance of each distribution.  Some variables may not need 
transforming at all.  It may be just one or two that is causing the problem in 
the model residuals, in which case you should transform only those variables.  
Remember that since it's the normality of the residuals that matters, it may be 
more appropriately fixed by transforming an independent variable than a 
dependent one.  If the dependent itself is normal, then nonnormal!
 ity might be introduced in the residuals because of the distribution of a 
particular independent variable.
Best
Luke

Luke J. Matthews | Senior Scientific Director | Activate Networks


--

Message: 2
Date: Fri, 29 Nov 2013 12:29:06 -0200
From: Agus Camacho 
To: "r-sig-phylo@r-project.org" 
Subject: [R-sig-phylo] best fit vs normality of residuals
Message-ID:

Content-Type: text/plain

Dear colleagues,

Im having difficulties to decide whether I choose a phylogenetic GLS model with 
a higher fit (lower AIC and BIC), or a model in which normality of the 
residuals, after accounting for phylogenetic signal, is compromised. The number 
of species is reasonably high (87), but i dont know if that would justify for 
allowing a highly significant deviation of normality.

When using scaled and centered data, i get:


  AIC BIC   logLik
  255.2029505 269.5696455 -121.6014753



Correlation Structure: corPagel
 Formula: ~1
 Parameter estimate(s):
lambda
-0.03313647856

Coefficients:
  Value Std.Error   t-value p-value
(Intercept)0.0432999895 0.06632562733  0.6528395024  0.5157
X  0.0425258358 0.03552018760  1.1972300459  0.2347
X2 0.4620358585 0.18471478739  2.5013474287  0.0144
X1:X2 -0.1211398020 0.04969892007 -2.4374735269  0.0170



Liliefors test (thanks Liam for posting on this) gave me:


D = 0.1815, p-value = 2.558e-07

I ranked both, the response variable and the factors. My variables had some 
zeros and in some cases negative values, so thought that would be the simplest 
and most robust way. But i might be wrong.



When ranking all variables:


  AIC BIC   logLik
  766.7826784 781.1493734 -377.3913392



Correlation Structure: corPagel
 Formula: ~1
 Parameter estimate(s):
  lambda
0.1434096557

Coefficients:
   Value   Std.Error  t-value p-value
(Intercept)  5.615576688 9.195445483  0.610691097  0.5431
X1   0.477054032 0.200882571  2.374790556  0.0199
X2   0.771914482 0.208616720  3.700156356  0.0004
X1:x2   -0.007371999 0.004035148 -1.826946400  0.0714


Lilliefors (Kolmogorov-Smirnov) normality test

data:  chol(solve(vcv(tree))) %*% residuals(M2) D = 0.0545, p-value = 0.7709



Would anybody have a hint on this?
Gracias!
Agus


--
Agust?n Camacho Guerrero.
Doutor em Zoologia.
Laborat?rio de Herpetologia, Departamento de Zoologia, Insti

Re: [R-sig-phylo] Transforming data for OU model

2013-11-28 Thread Theodore Garland Jr
I had been imagining that precipitation was a dependent variable, not that it 
matters.  In any case, you have the need for a lower limit of zero and probably 
an upper limit that is somewhat above the greatest recorded values.  I can't 
see why you would want an OU model for precipitation, though.  As Liam wrote, 
we all need more info about what you are doing.  And we need to get the hell 
off the computer on a holiday!

Cheers,
Ted

From: Liam J. Revell [liam.rev...@umb.edu]
Sent: Thursday, November 28, 2013 12:16 PM
To: Theodore Garland Jr; Anna Rice; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] Transforming data for OU model

Hi Ted & Anna.

phytools indeed includes a function for simulating Brownian evolution
within bounds. This is in the function fastBM. It is also possible to
simulate with a trend in fastBM, or under OU (as of the latest non-CRAN
phytools, http://www.phytools.org) - but combining a trend or bounds
with OU is not permitted.

One question I have is what do you mean when you are saying you are
"running an OU model" on precipitation data? Are you fitting a linear
regression using GLS with a phylogenetic error structure based on the OU
model in which precipitation is a predictor? If so, then it may not
matter because multivariate normality of the predictors is not, strictly
speaking, an assumption of GLS.

Hope that may be helpful. All the best, Liam

Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 11/28/2013 1:52 PM, Theodore Garland Jr wrote:
> Given the nature of precipitation data, I don't think a log transform makes 
> sense biologically.  It is very different from, say, body mass.
> I think you need to simulate with limits, as described originally here:
>
> 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.
>
> Limits can be implemented with or without other things, such as OU and/or a 
> trend.
>
> Our programs are in DOS (What's DOS?  The last operating system that worked 
> ...).
> However, I think you can also do this in R somewhere, maybe phytools?  Liam 
> Revell, want to jump in here?
>
> Happy thanksgiving,
> 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
> Skype:  theodoregarland
> Facsimile:  (951) 827-4286 = Dept. office (not confidential)
> Email:  tgarl...@ucr.edu
> http://www.biology.ucr.edu/people/faculty/Garland.html
> http://scholar.google.com/citations?hl=en&user=iSSbrhwJ
>
> Inquiry-based Middle School Lesson Plan:
> "Born to Run: Artificial Selection Lab"
> http://www.indiana.edu/~ensiweb/lessons/BornToRun.html
>
> Fail Lab: Episode One
> http://testtube.com/faillab/zoochosis-episode-one-evolution
> http://www.youtube.com/watch?v=c0msBWyTzU0
>
> 
> From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] 
> on behalf of Anna Rice [annarice...@gmail.com]
> Sent: Thursday, November 28, 2013 6:47 AM
> To: r-sig-phylo@r-project.org
> Subject: [R-sig-phylo] Transforming data for OU model
>
> Hi all,
>
> I am running an OU model on data that is constrained by zero (precipitation
> values). Therefore I thought to log transform the data. However I still
> have some issues with the transformation:
>
> 1. When all values in the data are larger than 1.0, the log transformation
> will still result in all values being positive.
> 2. In case I have a value of zero, log transforming it will give -Inf.
>
> I would greatly appreciate any advice regarding the best way of
> transforming and dealing with this kind of data.
>
> Thanks you,
> Anna
>
>  [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
>

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] Transforming data for OU model

2013-11-28 Thread Theodore Garland Jr
Good point, Joe.
However, if they have graphics screens (as in our PDTREE.EXE and PDSIMUL.EXE) 
programs, then you sometimes have trouble with the display of those particular 
screens.  Plain text screens (ASCII characters only) aren't a problem.  Also, 
you can get idiosyncratic problem, such as a laptop that shows the graphics 
screen just fine, but an external monitor glitches out.
Anyway, if anybody wants these "classic" DOS programs, just let me know!

Hasta,
Ted

From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Joe Felsenstein [j...@gs.washington.edu]
Sent: Thursday, November 28, 2013 1:38 PM
To: r-sig-phylo@r-project.org Mailing-list
Subject: Re: [R-sig-phylo] Transforming data for OU model

Ted Garland wrote:

> Our programs are in DOS (What's DOS?  The last operating system
> that worked ...).
> However, I think you can also do this in R somewhere, maybe
> phytools?  Liam Revell, want to jump in here?

Just to remind people: DOS (also called MSDOS) executable programs
can be run in Windows using the Command Prompt tool, which you will
find in the Accessories menu that is found in the menu
opened by the All Programs tab in the Start Menu.

Joe

Joe Felsenstein, j...@gs.washington.edu
  Dept. of Genome Sciences, Univ. of Washington
  Box 355065, Seattle, WA 98195-5065 USA

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] Transforming data for OU model

2013-11-28 Thread Theodore Garland Jr
Given the nature of precipitation data, I don't think a log transform makes 
sense biologically.  It is very different from, say, body mass.
I think you need to simulate with limits, as described originally here:

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.

Limits can be implemented with or without other things, such as OU and/or a 
trend.

Our programs are in DOS (What's DOS?  The last operating system that worked 
...).
However, I think you can also do this in R somewhere, maybe phytools?  Liam 
Revell, want to jump in here?

Happy thanksgiving,
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
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Anna Rice [annarice...@gmail.com]
Sent: Thursday, November 28, 2013 6:47 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Transforming data for OU model

Hi all,

I am running an OU model on data that is constrained by zero (precipitation
values). Therefore I thought to log transform the data. However I still
have some issues with the transformation:

1. When all values in the data are larger than 1.0, the log transformation
will still result in all values being positive.
2. In case I have a value of zero, log transforming it will give -Inf.

I would greatly appreciate any advice regarding the best way of
transforming and dealing with this kind of data.

Thanks you,
Anna

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] zero length terminal branches in pgls

2013-07-31 Thread Theodore Garland Jr
Another suggestion would be to abandon your "real" molecular branch lengths and 
use arbitrary ones.  In such cases, I generally try three sets of arbitrary 
branch lengths:
1.  all = 1
2.  Pagel's (1992) arbitrary
3.  Grafen's (1989) arbitrary
See here:
Garland, T., Jr., P. H. Harvey, and A. R. Ives. 1992. Procedures for the 
analysis of comparative data using phylogenetically independent contrasts. 
Systematic Biology 41:18-32.

For #2 and #3, I would also try transformations, as in an OU model.  See here, 
especially the appendix (RegOU, but also RegPagel, RegGrafen):
Lavin, S. R., W. H. Karasov, A. R. Ives, K. M. Middleton, and T. Garland, Jr. 
2008. Morphometrics of the avian small intestine, compared with non-flying 
mammals: A phylogenetic perspective. Physiological and Biochemical Zoology 
81:526-550. [provides Matlab Regressionv2.m, released as part of the PHYSIG 
package]

We have been using lilkelihoods, AIC or AICc to figure out which model(s) best 
fit your data (including choosing among sets of independent variables), e.g.:
Oufiero, C. E., S. C. Adolph, G. E. A. Gartner, and T. Garland, Jr. 2011. 
Latitudinal and climatic variation in body size and dorsal scale rows in 
Sceloporus lizards: a phylogenetic perspective. Evolution 65:3590-3607.
Nobody knows how well a "model selection" approach that really works in this 
specific context, but we are going with it for now until somebody does massive 
simulations!

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
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html



From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Tom Kraft [thomas.s.kraft...@dartmouth.edu]
Sent: Wednesday, July 31, 2013 9:57 AM
To: Liam J. Revell
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] zero length terminal branches in pgls

Hi Liam,

Thank you for your rapid and helpful comments (I really appreciate your
including the IC example to help me understand the nature of the problem).

Just to clarify your point about using the method by Ives et al. (2007), my
understanding is that this would essentially involve combining my taxa that
are separated by 0 branch length distance (since they cannot be separated
in the phylogeny as distinct species anyways) and using a combination of
trait values. My question then is whether it is even worth attempting this
if my trait values are substantially different and the most likely
explanation for the 0 length branches is the need for more molecular data.

In addition, should I be throw out both members of a zero length terminal
branch pair, or am I justified in retaining one of the pair randomly?

Best,
Tom


On Wed, Jul 31, 2013 at 12:31 PM, Liam J. Revell wrote:

> Hi Tom.
>
> Yes, for zero length terminal branches it is inadvisable to add a "tiny
> amount" to the terminal edge so that the analysis "works". An easy way
> to think about this is in terms of Felsenstein's contrasts method (which
> is a special case of PGLS). Contrasts are standardized to have the same
> expected variance by dividing by the square-root of the subtending
> edges. If you set some (terminal) branches to be very small - then the
> corresponding contrast will be very large. (Going to Inf as the edge
> lengths go to zero!) This will give this contrast very high weight in
> your regression.
>
> Part of the problem here stems from the different effective meaning of a
> zero length terminal edge in molecular phylogenetics vs. comparative
> biology. In the former - a zero length terminal edge probably means that
> we don't have enough sequence data, and thus failed to sample any
> substitutions along that edge. Depending on the amount of data that you
> have, the edge could be 1000s to millions of years long. A zero length
> terminal edge in comparative inference means that the tree ends at a
> speciation event - no time elapsed between the speciation event that
> created a lineage and the present time. Under those circumstances, we
> should expect to find no phenotypic difference between species separated
> by zero time! (And it makes sense that comparative methods wouldn't like
> data that suggested otherwise.)
>
> The best solution is to get more data to infer your tree. Failing that,
> you could assume that there is the eq

Re: [R-sig-phylo] PGLS vs lm

2013-07-26 Thread Theodore Garland Jr
Hi Tom,

So far I have resisted jumping in here, but maybe this will help.
Come up with a model for how you think your traits of interest might evolve 
together in a correlated fashion along a phylogenetic tree.
Now implement it in a computer simulation along a phylogenetic tree.
Also implement the model with no correlation between the traits.
Analyze the data with whatever methods you choose.
Check the Type I error rate and then the power of each method.  Also check the 
bias and means squared error for the parameter you are trying to estimate.
See what method works best.
Use that method for your data if you have some confidence that the model you 
used to simulate trait evolution is reasonable, based on your understanding 
(and intuition) about the biology involved.

Lots of us have done this sort of thing, e.g., check this:

Martins, E. P., and T. Garland, Jr. 1991. Phylogenetic analyses of the 
correlated evolution of continuous characters: a simulation study. Evolution 
45:534-557.

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
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Tom Schoenemann [t...@indiana.edu]
Sent: Friday, July 26, 2013 3:21 PM
To: Tom Schoenemann
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] PGLS vs lm

OK, so I haven't gotten any responses that convince me that PGLS isn't 
biologically suspect. At the risk of thinking out loud to myself here, I wonder 
if my finding might have to do with the method detecting phylogenetic signal in 
the error (residuals?):

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

I note the following: "...the suitability of a phylogenetic regression should 
actually be diagnosed by estimating phylogenetic signal in the residual 
deviations of Y given our predictors (X1, X2, etc.)."

Let's say one variable, "A", has a strong evolutionary signal, but the other, 
variable "B", does not. Would we expect this to affect a PGLS differently if we 
use A to predict B, vs. using B to predict A?

If so, it would explain my findings. However, given the difference, I can have 
no confidence that there is, or is not, a significant covariance between A and 
B independent of phylogeny. Doesn't this finding call into question the method 
itself?

More directly, how is one to interpret such a finding? Is there, or is there 
not, a significant biological association?

-Tom


On Jul 21, 2013, at 11:47 PM, Tom Schoenemann  wrote:

> Thanks Liam,
>
> A couple of questions:
>
> How does one do a hypothesis test on a regression, controlling for phylogeny, 
> if not using PGLS as I am doing?  I realize one could use independent 
> contrasts, though I was led to believe that is equivalent to a PGLS with 
> lambda = 1.
>
> I take it from what you wrote that the PGLS in caper does a ML of lambda only 
> on y, when doing the regression? Isn't this patently wrong, biologically 
> speaking? Phylogenetic effects could have been operating on both x and y - we 
> can't assume that it would only be relevant to y. Shouldn't phylogenetic 
> methods account for both?
>
> You say you aren't sure it is a good idea to jointly optimize lambda for x & 
> y.  Can you expand on this?  What would be a better solution (if there is 
> one)?
>
> Am I wrong that it makes no evolutionary biological sense to use a method 
> that gives different estimates of the probability of a relationship based on 
> the direction in which one looks at the relationship? Doesn't the fact that 
> the method gives different answers in this way invalidate the method for 
> taking phylogeny into account when assessing relationships among biological 
> taxa?  How could it be biologically meaningful for phylogeny to have a 
> greater influence when x is predicting y, than when y is predicting x?  Maybe 
> I'm missing something here.
>
> -Tom
>
>
> On Jul 21, 2013, at 8:59 PM, Liam J. Revell  wrote:
>
>> Hi Tom.
>>
>> Joe pointed out that if we assume that our variables are multivariate 
>> normal, then a hypothesis test on the regression is the same as a test that 
>> cov(x,y) is

Re: [R-sig-phylo] Problem with fitContinuous function

2013-07-17 Thread Theodore Garland Jr
I just want to emphasize thism point:

"one other thing that is useful, but which we don't do enough, is to simply 
visualize the results"

Good old fashioned phylogenetically independent contrasts (Felsenstein, 1985; 
Garland et al., 1992) are really useful for this, at least with your original 
tree.  You can often spot influential contrasts, then try to track back and see 
if it is a likely problem with the tip data, the branch lengths (too short for 
that contrast?) or both.
Sometimes, of course, a big contrast is real and reflects unusally rapid 
evolutionary divergence in the trait in that bifurcation of your tree.

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
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html



From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Brian O'Meara [bome...@utk.edu]
Sent: Wednesday, July 17, 2013 10:52 AM
To: Slater, Graham
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] Problem with fitContinuous function

In addition to Liam's and Graham's suggestions, one other thing that is
useful, but which we don't do enough, is to simply visualize the results.
Do plot(ouTree(phy, your_estimate)) and you can see what Graham means about
signal. Do phytools' contMap with and without the transformed tree to look
at how your traits are distributed: maybe you have one extreme value that's
driving this? Are your tree's starting branch lengths very weird?
(ultrametric trees aren't required, but often make a lot of sense for this
sort of analysis for trees of extant organisms). There may be an issue with
tree or data that becomes obvious with this sort of inspection, or you may
figure out that a new kind of model is needed (maybe your data suggest a
two mean OU model). You don't want to make post hoc hypotheses when doing
this, of course, but you can see problems this way.

Best,
Brian

___
Brian O'Meara
Assistant Professor
Dept. of Ecology & Evolutionary Biology
U. of Tennessee, Knoxville
http://www.brianomeara.info

Students wanted: Applications due Dec. 15, annually
Postdoc collaborators wanted: Check NIMBioS' website
Calendar: http://www.brianomeara.info/calendars/omeara

On Wed, Jul 17, 2013 at 1:26 PM, Slater, Graham  wrote:

> Hi Oscar,
>
> Liam is of course correct that you can change the bounds. The default
> bounds in geiger are quite wide however. It's probably worth noting that
> the fact that both OU and trend (=linear rate change through time) have ML
> parameter estimates at their optimization bounds suggests that there is
> very little 'phylogenetic signal' in your trait. This is because both OU
> and increasing rates through time result in trait values for closely
> related tips in ultrametric trees that are much more dissimilar than
> expected in high signal models, like BM or ACDC/trend with declining rates
> through time. It's definitely worth increasing the bounds for optimization
> but I'd also suggest performing some 'phylogenetic signal' tests to find
> out whether you are able to say much about the processes/rates underlying
> the evolution of your trait
>
> Cheers,
>
> Graham
> ---
> --
> Graham Slater
> Peter Buck Post-Doctoral Fellow
> Department of Paleobiology
> National Museum of Natural History
> The Smithsonian Institution [NHB, MRC 121]
> P.O. Box 37012
> Washington DC 20013-7012
>
>
> (202) 633-1316
> slat...@si.edu
> <
> https://legacy.si.edu/owa/redir.aspx?C=HcyfurW5xkyXw2bWu-Td5xmRPtn7-c9I1lX
> iVWbeJqzfhgybLjvFBckclIN237FXoGKsGXlPAGg.&URL=mailto%3aSlaterG%40si.edu>
> www.eeb.ucla.edu/gslater
> <
> https://legacy.si.edu/owa/redir.aspx?C=HcyfurW5xkyXw2bWu-Td5xmRPtn7-c9I1lX
> iVWbeJqzfhgybLjvFBckclIN237FXoGKsGXlPAGg.&URL=http%3a%2f%2fwww.eeb.ucla.edu
> %2fgslater>
>>
> On 7/17/13 1:11 PM, "Liam J. Revell"  wrote:
>
> >You can just change the bounds for optimization, see help(fitContinuous)
> >for details.
> >
> >E.g.:
> >
> >fitContinuous(...,bounds=list(beta=c(0,100)))
> >
> >or something. Liam
> >
> >Liam J. Revell, A

Re: [R-sig-phylo] PGLS vs lm

2013-07-14 Thread Theodore Garland Jr
"Maybe what we need here is an approach based on 
simultaneous equations (aka structural equation models), but I'm not 
aware whether this exists in a phylogenetic framework."

Exactly!  And it will need to incorporate "measurement error" in all variables 
as well as, eventually, uncertainly in the phylogenetic topology and branch 
lengths.

Good luck,
Ted

From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Emmanuel Paradis [emmanuel.para...@ird.fr]
Sent: Sunday, July 14, 2013 3:18 AM
To: Joe Felsenstein
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] PGLS vs lm

Hi all,

I would like to react a bit on this issue.

Probably one problem is that the distinction "correlation vs.
regression" is not the same for independent data and for phylogenetic data.

Consider the case of independent observations first. Suppose we are
interested in the relationship y = b x + a, where x is an environmental
variable, say latitude. We can get estimates of b and a by moving to 10
well-chosen locations, sampling 10 observations of y (they are
independent) and analyse the 100 data points with OLS. Here we cannot
say anything about the correlation between x and y because we controlled
the distribution of x. In practice, even if x is not controlled, this
approach is still valid as long as the observations are independent.

With phylogenetic data, x is not controlled if it is measured "on the
species" -- in other words it's an evolving trait (or intrinsic
variable). x may be controlled if it is measured "outside the species"
(extrinsic variable) such as latitude. So the case of using regression
or correlation is not the same than above. Combining intrinsic and
extinsic variables has generated a lot of debate in the literature.

I don't think it's a problem of using a method and not another, but
rather to use a method keeping in mind what it does (and its
assumptions). Apparently, Hansen and Bartoszek consider a range of
models including regression models where, by contrast to GLS, the
evolution of the predictors is modelled explicitly.

If we want to progress in our knowledge on how evolution works, I think
we have to not limit ourselves to assess whether there is a
relationship, but to test more complex models. The case presented by Tom
is particularly relevant here (at least to me): testing whether group
size affects brain size or the opposite (or both) is an important
question. There's been also a lot of debate whether comparative data can
answer this question. Maybe what we need here is an approach based on
simultaneous equations (aka structural equation models), but I'm not
aware whether this exists in a phylogenetic framework. The approach by
Hansen and Bartoszek could be a step in this direction.

Best,

Emmanuel

Le 13/07/2013 02:59, Joe Felsenstein a écrit :
>
> Tom Schoenemann asked me:
>
>> With respect to your crankiness, is this the paper by Hansen that you are 
>> referring to?:
>>
>> Bartoszek, K., Pienaar, J., Mostad, P., Andersson, S., & Hansen, T. F. 
>> (2012). A phylogenetic comparative method for studying multivariate 
>> adaptation. Journal of Theoretical Biology, 314(0), 204-215.
>>
>> I wrote Bartoszek to see if I could get his R code to try the method 
>> mentioned in there. If I can figure out how to apply it to my data, that 
>> will be great. I agree that it is clearly a mistake to assume one variable 
>> is responding evolutionarily only to the current value of the other 
>> (predictor variables).
>
> I'm glad to hear that *somebody* here thinks it is a mistake (because it 
> really is).  I keep mentioning it here, and Hansen has published extensively 
> on it, but everyone keeps saying "Well, my friend used it, and he got tenure, 
> so it must be OK".
>
> The paper I saw was this one:
>
> Hansen, Thomas F & Bartoszek, Krzysztof (2012). Interpreting the evolutionary 
> regression: The interplay between observational and biological errors in 
> phylogenetic comparative studies. Systematic Biology  61 (3): 413-425.  ISSN 
> 1063-5157.
>
> J.F.
> 
> Joe Felsenstein j...@gs.washington.edu
>   Department of Genome Sciences and Department of Biology,
>   University of Washington, Box 355065, Seattle, WA 98195-5065 USA
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
>

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] PGLS vs lm

2013-07-11 Thread Theodore Garland Jr
I think the issue is largely one of conceptualizing the problem.
People often view body size as an "independent variable" when analyzing brain 
size, but obviously this is a serious oversimplificaiton -- usually done for 
statistical convenience -- that does not reflect the biology (yes, I have also 
done this!).  Moreover, brain mass is part of body mass, so if you use body 
mass per se as an independent variable then you have potential part-whole 
correlation statistical issues.

I would think carefully about what you are really wanting to do (e.g., 
regression vs. correlation vs. ANCOVA), and check over this paper:

Ives, A. R., P. E. Midford, and T. Garland, Jr. 2007. Within-species variation 
and measurement error in phylogenetic comparative methods. Systematic Biology 
56:252-270.

And maybe this one:

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.

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
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Tom Schoenemann [t...@indiana.edu]
Sent: Thursday, July 11, 2013 11:19 AM
To: Emmanuel Paradis
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] PGLS vs lm

Thanks Emmanuel,

OK, so this makes sense in terms of the math involved. However, from a 
practical, interpretive perspective, shouldn't I assume this to mean that we 
actually cannot say (from this data) whether VarA and VarB ARE actually 
associated with each other? In the real world, if VarA is causally related to 
VarB, then by definition they will be associated. Doesn't this type of 
situation - where the associations are judged to be statistically significant 
in one direction but not in the other - suggest that we actually DON'T have 
confidence that - independent of phylogeny - VarA is associated with VarB?  
Putting this in the context of the actual variables involved, doesn't this mean 
that we actually can't be sure brain size is associated with social group size 
(in this dataset) independent of phylogeny?

I notice that the maximum likelihood lambda estimates are different (though I'm 
not sure they are significantly so). I understand this could mathematically be 
so, but I'm concerned with how to interpret this. In the real world, how could 
phylogenetic relatedness affect group size predicting brain size, more than 
brain size predicting group size? Isn't this a logical problem (for 
interpretation - not for the math)? In other words, in evolutionary history, 
shouldn't phylogeny affect the relationship between two variables in only one 
way, which would show up whichever way we approached the association? Again, I 
understand the math may allow it, I just don't understand how it could actually 
be true over evolutionary time.

Thanks in advance for helping me understand this better,

-Tom


On Jul 11, 2013, at 5:12 AM, Emmanuel Paradis  wrote:

> Hi Tom,
>
> In an OLS regression, the residuals from both regressions (varA ~ varB and 
> varB ~ varA) are different but their distributions are (more or less) 
> symmetric. So, because the residuals are independent (ie, their covariance is 
> null), the residual standard error will be the same (or very close in 
> practice).
>
> In GLS, the residuals are not independent, so this difference in the 
> distribution of the residuals affects the estimation of the residual standard 
> errors (because we need to estimate the covaraince of the residuals), and 
> consequently the associated tests.
>
> Best,
> Emmanuel
>
> Le 11/07/2013 11:03, Tom Schoenemann a �crit :
>> Hi all,
>>
>> I ran a PGLS with two variables, call them VarA and VarB, using a 
>> phylogenetic tree and corPagel. When I try to predict VarA from VarB, I get 
>> a significant coefficient for VarB.  However, if I invert this and try to 
>> predict VarB from VarA, I do NOT get a significant coefficient for VarA. 
>> Shouldn't these be both significant, or both insignificant (the actual 
>> outputs and calls are pasted below)?
>>
>> If I do a simple lm for these, I get the same significance level for the 
>> coefficients either way (i.e., lm(Var

Re: [R-sig-phylo] Phylosignal with phylo.d

2013-05-17 Thread Theodore Garland Jr
Hi Miguel,

I have not used this package.
Is d the estimated parameter for an OU model?
If so, then it would seem to be paramaterized differently from most 
implementations.

In general, when one is using an OU model (d), Grafen's rho, Pagel's lambda, or 
an ACDC model (which we called g in Blomberg et al. 2003), a value of one 
(unity) gives the original tree, i.e., exactly the amount of signal (averaged 
across the tree) that you would expect under Brownian motion.

A value of zero should return a star phylogeny (generally with contemporaneous 
tips, but I am not sure for all implementations of the above transforms).

A value greater than one indicates more signal that expected under Brownian 
motion.  You can get this in real data sets (see Blomberg et al. 2003).  You 
can also get it in simulated data sets occasionally (rarely) by chance.  Or, if 
you simulate under Brownian motion, and then manually add a constant to the 
phenotypes of all members of one or more entire clades, then you should be able 
to get the parameter estimate to exceed one.

Note that the K statistic of Blomberg et al. (2003) behaves the same way.
K = 0 indicates a star best fits the data (no phylogenetic signal), K = 1 
indiucates the specified tree and a Brownian motion model fits the data well, 
and K > 1 indicates more signal than expected under Brownian motion.  Again, 
one sometimes gets K values greater than one (highest we saw was 4.02).

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

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
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of miguel.ve...@uv.es [miguel.ve...@uv.es]
Sent: Friday, May 17, 2013 8:56 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Phylosignal with phylo.d

Dear list:

I am using phylo.d in caper package and the Estimated D is lower than
0 (D=-0.71), suggesting a phylogenetic signal greater than Brownian
expectation. However, the Probability of E(D) resulting from Brownian
phylogenetic structure is p=0.98. Should I interpret this p-value as
non-significant? or should I interpret it as a significant
p=1-0.98=0.02? I am asking this question because I have never been
able to detect a significant phylosignal higher than BM even with
simulated data.


Estimated D :  -0.7107697

Probability of E(D) resulting from no (random) phylogenetic structure :  0

Probability of E(D) resulting from Brownian phylogenetic structure
:  0.98

Thanks

Miguel Verdu
--

Centro de Investigaciones sobre Desertificacion
(CSIC-UV-GV)
Carretera Moncada - Náquera, Km. 4,5
Apartado Oficial
46113 Moncada (Valencia)
Spain
Tel +34 96 3424204
Fax +34 96 3424160
www.uv.es/verducam

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] pagel's lambda vs. abouheif's Cmean

2013-04-26 Thread Theodore Garland Jr
Have you tried the randomization test of Blomberg et al. (2003), which should 
be in picante?

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

Also, the tests you describe are getting at somewhat different null hypotheses. 
 We mention this here:
Fusco, G., T. Garland, Jr., G. Hunt, and N. C. Hughes. 2011. Developmental 
trait evolution in trilobites. Evolution 66:314-329.
Page 322:
"Note that in all cases shown in Table 3, the likelihood of the
star is actually higher than that for the specified phylogenetic tree,
which would suggest that the traits do not exhibit phylogenetic
signal. This apparent discrepancy versus the significant randomization
tests for phylogenetic signal can be explained by at least
two, not-mutually exclusive possibilities. First, comparing likelihoods
is not equivalent to testing a null hypothesis of no phylogenetic
signal. In particular, model fitting can be sensitive to local
departures from the assumed model. For example, although many
closely related pairs of species (i.e., those connected by short
branch lengths) have similar protaspid growth increments (e.g.,
Amphilichas sp. [Ax] and Hemiarges turneri rasettii [Ht], Hyperbolochilus
cf. marginauctum [Hm] and “Paraplethopeltis” n. sp.
A [Px], Protopliomerella contracta [Pc] and Pseudocybele nasuta
[Pn]; see Fig. 7A), one pair of closely related species, Arthricocephalus
chauveaui (Ac) and Duyunaspis duyunensis (Dd), is
strongly dissimilar. This one anomalous pair will strongly reduce
the likelihood of the BM model but have less effect on randomization
tests, which are expected to be less sensitive to outliers.
Of these two species, A. chauveaui (Ac) has an unusually large
value, as compared with other species nearby in the phylogenetic
tree (Fig. 6). Deleting this one tip changes the results as expected:
the likelihood of the star tree becomes lower than that of the hierarchical
tree (see Table 3). Second, the level of signal, as indicated
by the K statistic, is not large for any trait (compare with values
in Blomberg et al. 2003)."

Finally, other ways to test for signal besides lambda might perform better, 
such as an OU model.

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
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html



From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Ellis, Vincenzo A. (UMSL-Student) [vincenzoel...@mail.umsl.edu]
Sent: Tuesday, April 23, 2013 10:38 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] pagel's lambda vs. abouheif's Cmean

Hi everyone,



In several datasets I have been looking at recently I generally find good 
agreement between Pagel's lambda and Abouheif's Cmean, i.e., if one says there 
is no phylogenetic signal so does the other. However, every so often a trait 
pops up and lambda and Cmean disagree, with lambda saying the trait is close to 
Brownian motion (phylogenetic signal present) and Cmean saying it's no 
different than random (no phylogenetic signal present). Does anyone know why 
that is happening? A recent paper in MEE by Munkenmuller et al. (2012) shows 
that lambda and Cmean correlate quite well so I'm at a bit of a loss.



Thanks for any insights,



Vincenzo



Here's some code reproducing one of the contradictions I'm referring to:



# Different results with Pagel's lambda and Abouheif's Cmean

library(ape)



tree <- 
read.tree(text="((Empidonax_virescens:64.912086,((Vireo_olivaceus:12.522261,Vireo_griseus:12.522261):34.717453,((Parus_carolinensis:15.623391,Baeolophus_bicolor:15.623391):28.479151,(Thryothorus_ludovicianus:43.329094,(((Icteria_virens:15.297336,Wilsonia_citrina:5.37719,(Dendroica_discolor:5.020348,Parula_americana:5.020348):0.356842):3.365272,(Mniotilta_varia:8.691948,(Vermivora_pinus:8.415811,Oporornis_formosus:8.41581):0.276138):0.050514):0.879735,Helmitheros_vermivorum:9.622197):0.673293,Seiurus_aurocapilla:10.29549):5.001846):0.986673,(Icterus_spurius:11.234447,Spizella_passerina:11.234447):5.049561):5.065457,((Cardinalis_cardinalis:17.182371,(Piranga_rubra:9.425619,Piranga_olivacea:9.425619):7.756752):1.264597,Passerina_cyanea:18.446968):2.902498):21.979624):0.773453):3.137173):17.672377):16.952915,Coccyzus_americanus:81.865005);")



tree.pruned <- dr

Re: [R-sig-phylo] trait correlations with PICs

2013-04-17 Thread Theodore Garland Jr
Exactly.  That's why I wrote:
"A problem is that then the statistical model is unclear/confusing."

But for nuisance variables in a multuple-regression type of model, I see no 
problem putting them on a star phylogeny if they are not phylogenetically 
distrubuted (e.g., assuming that a particular technique for measuring, say, 
home range size, does not tend to be applied in a clade-specific [biased] 
fashion).
So far as I am aware, Nobody knows exactly jhow to do this, nor has tried to 
implement this, with PGLS or phylogenetic regression models!  We mention this 
in Garland and Ives (2000).  

Cheers,
Ted 

From: Alejandro Gonzalez [alejandro.gonza...@ebd.csic.es]
Sent: Wednesday, April 17, 2013 9:38 AM
To: Theodore Garland Jr
Cc: Anne Kempel; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] trait correlations with PICs

Can I risk a question here, maybe a result of ignorance...

"With IC, it is easier to employ different sets of branch lengths
for different traits (e.g. Garland et al., 1992; Lovegrove, 2003;
Rezende et al., 2004), which may be particularly useful when
one trait does not actually show phylogenetic signal (e.g.
Tieleman et al., 2003; Rheindt et al., 2004) and/or for traits that
are only nuisance variables, such as details of measurement or
calculation methods that differ among studies (e.g. Wolf et al.,
1998; Perry and Garland, 2002; Rezende et al., 2004)."


>From an evolutionary point of view, what does it mean when using different 
>sets of branch lengths for different traits? If we're testing co-evolution of 
>traits, I would tend to think - and I may very well be wrong - that the 
>interest would be in estimating a single rate describing this co-evolution and 
>by employing different branch lengths would we not loose the opportunity to 
>estimtate that rate?

Cheers
Alejandro






On 17, Apr 2013, at 6:24 PM, Theodore Garland Jr wrote:



For correlations per se, please check this paper:



Ives, A. R., P. E. Midford, and T. Garland, Jr. 2007. Within-species variation 
and measurement error in phylogenetic comparative methods. Systematic Biology 
56:252-270.



And here comes my question: is it


allowed to calculate only PICs based on my tree for those traits having


a signal, and to calculate "pseudo-PICs" based on a star phylogeny


(independence between species) for those traits having no signal? This


would allow me to correct the "signal-traits" but leave the other ones


more or less as they are. The benefit: I then can correlate all traits


with each other.




Obviously, it is possible to do this.

A problem is that then the statistical model is unclear/confusing.



I could not find any reference doing this, and I wonder 


whether this is legal?




We have discussed this here:



Garland, T., Jr., A. F. Bennett, and E. L. Rezende. 2005. Phylogenetic 
approaches in comparative physiology. Journal of Experimental Biology 
208:3015-3035.

Page 3032:

"With IC, it is easier to employ different sets of branch lengths

for different traits (e.g. Garland et al., 1992; Lovegrove, 2003;

Rezende et al., 2004), which may be particularly useful when

one trait does not actually show phylogenetic signal (e.g.

Tieleman et al., 2003; Rheindt et al., 2004) and/or for traits that

are only nuisance variables, such as details of measurement or

calculation methods that differ among studies (e.g. Wolf et al.,

1998; Perry and Garland, 2002; Rezende et al., 2004)."



Cheers,

Ted



Theodore Garland, Jr., Professor

Department of Biology

University of California, Riverside

Riverside, CA 92521

Office Phone:  (951) 827-3524

Skype:  theodoregarland

Facsimile:  (951) 827-4286 = Dept. office (not confidential)

Email:  tgarl...@ucr.edu

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

http://scholar.google.com/citations?hl=en&user=iSSbrhwJ



Inquiry-based Middle School Lesson Plan:

"Born to Run: Artificial Selection Lab"

http://www.indiana.edu/~ensiweb/lessons/BornToRun.html







From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Anne Kempel [kem...@ips.unibe.ch]

Sent: Wednesday, April 17, 2013 5:37 AM

To: r-sig-phylo@r-project.org

Subject: [R-sig-phylo] trait correlations with PICs



Dear all,



I am dealing with plant traits of different plant species (28 plant

species), and aim to correlate all traits with each other. I have a tree

of my species, and some of those traits do have a phylogenetic signal,

but most don't. Since I do not know, which trait depends on whom, I

favour to do correlations instead of regressions - that's why I would

like to use Phylogenetic independent contrasts (PIC) instead of PGLS.



I have the impression that it does not make sense to calculate PICs for

traits that do not have a signal. And here comes my question: is it

allowed to calculate only P

Re: [R-sig-phylo] trait correlations with PICs

2013-04-17 Thread Theodore Garland Jr
For correlations per se, please check this paper:

Ives, A. R., P. E. Midford, and T. Garland, Jr. 2007. Within-species variation 
and measurement error in phylogenetic comparative methods. Systematic Biology 
56:252-270.

>And here comes my question: is it
>allowed to calculate only PICs based on my tree for those traits having
>a signal, and to calculate "pseudo-PICs" based on a star phylogeny
>(independence between species) for those traits having no signal? This
>would allow me to correct the "signal-traits" but leave the other ones
>more or less as they are. The benefit: I then can correlate all traits
>with each other.

Obviously, it is possible to do this.
A problem is that then the statistical model is unclear/confusing.

>I could not find any reference doing this, and I wonder 
>whether this is legal?

We have discussed this here:

Garland, T., Jr., A. F. Bennett, and E. L. Rezende. 2005. Phylogenetic 
approaches in comparative physiology. Journal of Experimental Biology 
208:3015-3035.
Page 3032:
"With IC, it is easier to employ different sets of branch lengths
for different traits (e.g. Garland et al., 1992; Lovegrove, 2003;
Rezende et al., 2004), which may be particularly useful when
one trait does not actually show phylogenetic signal (e.g.
Tieleman et al., 2003; Rheindt et al., 2004) and/or for traits that
are only nuisance variables, such as details of measurement or
calculation methods that differ among studies (e.g. Wolf et al.,
1998; Perry and Garland, 2002; Rezende et al., 2004)."

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Skype:  theodoregarland
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html



From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Anne Kempel [kem...@ips.unibe.ch]
Sent: Wednesday, April 17, 2013 5:37 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] trait correlations with PICs

Dear all,

I am dealing with plant traits of different plant species (28 plant
species), and aim to correlate all traits with each other. I have a tree
of my species, and some of those traits do have a phylogenetic signal,
but most don't. Since I do not know, which trait depends on whom, I
favour to do correlations instead of regressions - that's why I would
like to use Phylogenetic independent contrasts (PIC) instead of PGLS.

I have the impression that it does not make sense to calculate PICs for
traits that do not have a signal. And here comes my question: is it
allowed to calculate only PICs based on my tree for those traits having
a signal, and to calculate "pseudo-PICs" based on a star phylogeny
(independence between species) for those traits having no signal? This
would allow me to correct the "signal-traits" but leave the other ones
more or less as they are. The benefit: I then can correlate all traits
with each other.

I could not find any reference doing this, and I wonder whether this is
legal?

I am grateful for any comment and suggestion!
Thanks a lot in advance and best wishes from Switzerland,
Anne


--
Dr. Anne Kempel
Institute of Plant Sciences
Altenbergrain 21
3013 Bern
Switzerland

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] trait correlations with PICs

2013-04-17 Thread Theodore Garland Jr
Hi all,

I will attempt some clarification.  In the context of phylogenetic regression 
models, the three most common types of models are:

1.  Ordinary Least Squares (OLS) = conventional statistics = assumes a star 
phylogeny with contemporaneous tips.

2.  Phylogenetic Generalized Least Squares (PGLS) = GLS where you use a 
phylogenetic tree to compute the expected variance-covariance matrix of 
residuals.  First developed by Grafen (1989) (using GLIM, an uncommon stats 
package).  Later Martins and Hansen (1997), Garland and Ives (2000), others, 
Lavin et al. (2008):

Grafen, A. 1989. The phylogenetic regression. Phil. Trans. Royal. Soc. Lond. B 
326:119-157.

Garland, T., Jr., and A. R. Ives. 2000. Using the past to predict the present: 
Confidence intervals for regression equations in phylogenetic comparative 
methods. American Naturalist 155:346-364.

Lavin, S. R., W. H. Karasov, A. R. Ives, K. M. Middleton, and T. Garland, Jr. 
2008. Morphometrics of the avian small intestine, compared with non-flying 
mammals: A phylogenetic perspective. Physiological and Biochemical Zoology 
81:526-550. [provides Matlab Regressionv2.m, released as part of the PHYSIG 
package]

Grafen called this the "standard regresison," which confused people (self 
included!).
What he called the "phylogenetic regression" used a "transformation parameter" 
that he named rho and was purely statistical, not tied to a model of evolution. 
 This method is not simply PGLS (see below), although people keep calling it 
that.
We have a discussion of this in the Appendix to Lavin et al. (2008).  It also 
gives the history of all these methods.  As we say in the paper:
"Because the foregoing analyses assume either no (OLS) or
relatively strong (PGLS) phylogenetic signal, we also performed
an analysis in which the strength of phylogenetic signal in the
residual variation was estimated simultaneously with the regression
coefficients (e.g., see Grafen 1989; Freckleton et al.
2002; Chown et al. 2007; Duncan et al. 2007)."

The additional parameter that is estimated is Grafen's rho, Pagel's lambda, or 
what we call "d" when it is tied to an OU model (first suggested by Felsenstein 
1988 and used in simulations by Garland et al. 1993) or "g" when it is tied to 
an ACDC model of residual character evoluton (see Blomberg et al. 2003).

3.  Phylogenetic Regression with a ??? Transformation/Model assumed.  This all 
started with Grafen (1989).  He also dealt with soft polytomies (lack of 
knowledge about branching order), and this made his paper even more 
sophisticated but complicated and a bit hard to understand at the time (it was 
ahead of its time!).

In Lavin et al. (2008) we write (page 544):

"Deriving a sensible terminology to discuss estimation under
these different transform models requires making a distinction
between statistical models and estimation techniques used to
fit models to data. All of these transform models are statistical
models in that they describe a statistical distribution and its
parameters. In contrast, OLS and GLS are estimation techniques.
Several authors refer to one or more of the transform
models as GLS models (or PGLS models, for phylogenetic GLS
models), although GLS is an estimation procedure. This is particularly
confusing because GLS actually cannot be used to
estimate the parameters of these transform models because they
all contain parameters in the variance-covariance matrix that
must be estimated. To reduce confusion, our preference is to
refer to transform models as distinct from the estimation approaches
that can be applied to them. We will break this convention
only when using the established monikers “OLS model”
and “GLS model” (i.e., the Brownian motion model) because
in these cases there is a one-to-one match between the structure
of the model and the appropriate estimation technique."

The Matlab Regressionv2.m program we provide uses REML to estimate parameters 
in the four transform models:  Grafen’s rho, Pagel’s lambda, OU, and ACDC (OU 
and ACDC are the same if you have contempoiraneous tips).

Note that the version of the OU model implemented in various programs may 
differ a bit!
See also Butler and King work, O'Meara, and probably others!

Enough rambling!  Hope that helps!!!

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone: 
(951) 827-3524
Skype:  theodoregarland
Facsimile: 
(951) 827-4286 = Dept. office (not confidential)
Email: 
tgarl...@ucr.edu

http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Alejandro Gonzalez

Re: [R-sig-phylo] Ancestral state estimates of continuous traits

2013-03-16 Thread Theodore Garland Jr
Yes, we have always used REML for this!

Cheers,
Ted

From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Emmanuel Paradis [emmanuel.para...@ird.fr]
Sent: Friday, March 15, 2013 11:21 PM
To: Liam J. Revell; r-sig-phylo-boun...@r-project.org; Alejandro Gonzalez
Cc: R-phylo Mailing-list
Subject: Re: [R-sig-phylo] Ancestral state estimates of continuous traits

Alejandro and Liam,

You can also try method="REML" which gives much better estimates of sigma^2 
than ML. I think I'll make it the default for continuous characters.

Best,

Emmanuel
-Original Message-
From: "Liam J. Revell" 
Sender: r-sig-phylo-boun...@r-project.org
Date: Fri, 15 Mar 2013 14:23:20
To: Alejandro Gonzalez
Cc: R-phylo Mailing-list
Subject: Re: [R-sig-phylo] Ancestral state estimates of continuous traits

Hi Alejandro.

That must be a bug in ace(...,method="GLS").

I would also suggest you check out fastAnc in the phytools package. It
uses ace(...,method="pic") internally to take advantage of the fact that
the contrasts estimate at the root and the MLE assuming Brownian
evolution are the same. It re-roots the tree at all internal nodes which
sounds computationally intensive but is actually much faster than
getting the MLEs via numerical optimization.

fastAnc also uses equation (6) from Rohlf (2001) to get the correct 95%
interval on the estimates. My analysis
(http://blog.phytools.org/2013/02/new-version-of-fastanc-new-build-of.html)
suggests that the 95% CIs from ace(...,method="ML") are too small. (This
is probably because they rely on asymptotic properties of likelihood
that are not satisfied for the relatively small size of most
phylogenetic datasets.)

All the best, Liam

Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 3/15/2013 8:18 AM, Alejandro Gonzalez wrote:
> Hello,
>
> I am using ape to obtain ancestral state estimates for continuous
> traits. Two options are available, either maximum likelihood or a GLS
> method. I am comparing the results of both methods and one difference
> between the two puzzles me, I hope someone can enlighten me. Under GLS
> the ancestral state estimate at the root has virtually identical values
> for the point estimate and 95% confidence intervals, here is one
> example: 100 1.7848301 1.78483005 1.7848301 (100 is the root node
> number, then the ancestral state estimate and 95% CIs, respectively).
> However, when I use maximum likelihood for the same ancestral sate
> estimate, with the same data and tree I get the following result for the
> root :  100 1.6570119  0.86612615 2.4478977 (numbers in the same order
> as above).
> Any ideas as to why GLS gives such narrow confidence intervals for the
> ancestral state estimate at the basal node?
>
> Cheers
>
> Alejandro
> __
>
> 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_combo.html
>
> Group page: http://consevol.org/people.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
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] Some questions about pPCA - phylogenetic anti-signal

2013-02-11 Thread Theodore Garland Jr
You can test for anti-signal using the randomization procedures of:

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

See page 719.

Cheers,
Ted

Theodore Garland, Jr., Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Inquiry-based Middle School Lesson Plan:
"Born to Run: Artificial Selection Lab"
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Francois KECK [francois.k...@thonon.inra.fr]
Sent: Monday, February 11, 2013 5:47 AM
To: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] Some questions about pPCA

Hello Thibaut,
Thank you for these clarifications.
About 2: I understand how to use the abouheif test to detect the
phylogenetic signal (up to now I used it with the patristic matrix of
proximities). But I don't know how to use it to test the anti-signal.
Absence of signal is not anti-signal, or missed something?

Cheers
François


> Hello François,
>
> 1. In pPCA, the sum of the eigenvalues is often meaningless, because it can 
> be a mixture of large positive and negative values. So this ratio is no 
> longer relevant. Selection of eigenvalues can be based on the amount of 
> variance and autocorrelation (Moran's I) represented (each eigenvalue is a 
> product of the two). See summary.ppca and screeplot.ppca.
>
> 2. The best way is testing positive/negative phylogenetic autocorrelation 
> ("global/local" structures in the paper's terminology) beforehand. See 
> section 3.1 of the vignette "Quantifying and testing phylogenetic signal" - 
> abouheif.moran will test all variables at once (just make sure to use the 
> same measure of proximity in the pPCA).
>
> 3. As you suspected, testing phylogenetic signal of pPCA components is 
> meaningless, as these synthetic variables are already optimized for 
> phylogenetic signal. Estimating ancestral states is always possible; I can 
> see at least two ways of doing it: a) reconstruct the ancestral state of 
> every traits, and then compute the coordinates of the nodes on the pPCA axis 
> using the loadings of the analysis. In this case, nodes are used as 
> 'supplementary individuals'. b) reconstruct directly the principal component 
> of pPCA; in this case, the component needs to have a clear-cut interpretation.
>
> Cheers
>
> Thibaut
>
> 
> From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] 
> on behalf of Francois KECK [francois.k...@thonon.inra.fr]
> Sent: 11 February 2013 10:05
> To: r-sig-phylo@r-project.org
> Subject: [R-sig-phylo] Some questions about pPCA
>
> Dear all,
> I'm a new subscriber to this list since I just started to play with
> phylogenetic data with R. The task is facilitated by reading the
> excellent book of E. Paradis. However I recently discovered the pPCA
> method (as introduced by Jombart et al. 2010) and i'm very interested in
> it to work on phylogenetic signal but I still have some questions...
>
> 1. I'm a long time user of ade4 to perform multivariate analysis. For a
> classic PCA I usually calculate the % of variance taking account by each
> axis using :
>   myPCA$eig/sum(myPCA$eig) * 100
> I'd just like to be sure I can do the same with a pPCA, using absolute
> values of the eigenvalues, e.g.:
>   abs(myPPCA$eig)/sum(abs(myPPCA$eig)) * 10
>
> 2. In their paper, Jombart et al. present some figures where they
> sometimes exclude directly the local or the global principal component
> because they know it doesn't exist (these are simulated data). Is there
> a way to test the global vs the local component with "real data"? With
> my own data I have a very low "local eigenvector" so I wonder if I could
> only focus on global structure. Can I justify this choice with statistics?
>
> 3. I think it could be interesting to play with the species coordinates
> especially with the global component. But does it make sense to assess
> the phylogenetic signal or to estimate ancestral characters on these
> constrained data? I'm a little doubtful about that and your point of
> view is welcome.
>
> Thank you for your help.
>
> François KECK
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project

Re: [R-sig-phylo] R: Re: From ClustalW2 Tree to Heat Map in R

2013-01-24 Thread Theodore Garland Jr
Hi Pas,

K is just a descriptive statistic for tip data on a tree with some specified 
branch lengths.
Obviously, if you change the branch lengths (or the topology or the tip data), 
then K will be different.
How much different depends on the details.

It is likely that certain branch-length transformations (whether purely 
statistical or designed to mimic something like an OU process) will tend to 
make K either larger or smaller, at least when checked cross a large number of 
examples.  Somebody would need to do a lot of simulations to sort this out.  
Some related relevant things are here:

Revell, L. J., L. J. Harmon, and D. C. Collar. 2008. Phylogenetic signal, 
evolutionary process, and rate. Syst. Biol. 57:591-601.

In the original Blomberg et al. (2003) paper we avoided this issue entirely by 
only reporting K using whatever tree the original paper used.  We wanted to be 
able to compare K values among traits and studies in some sort of simple and 
"fair" way.

If lambda and OU transforms are leading to very different K values (how 
different?) that does not mean one K value is better than the other.  But it 
does mean you would want to be careful if you tried to compare your K value 
with other studies that did not use lambda and/or OU transforms.

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
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of pasquale.r...@libero.it [pasquale.r...@libero.it]
Sent: Thursday, January 24, 2013 12:14 PM
To: r-sig-phylo@r-project.org Mailing-list
Subject: [R-sig-phylo] R: Re:  From ClustalW2 Tree to Heat Map in R

Hi Gents and Lads,

I have a very rapid question with a perhaps not-so-obvious reply. I'm in the
process of testing a number of evolutionary models and estimating phylogenetic
signal on a certain univariate data set. So something very basic and very
simple. The point is, I found BM  performs poorly as compared to OU (single
peak) and lambda. Thus, I transformed the tree by using the fitted lamdba
and/or alpha before calculating Blomberg et al's K statistic. Does this make
sense?
If yes, the competing models have similar Akaike weigths (OU = 0.5, lambda =
0.3) but give very different estimates of K when their fitted parameters are
used to transform the tree branch lenghts. How does discriminate which K
estimate is best?
Translating in R-esque:


require(geiger)
require(phytools)

fitContinuous(tree, x, model="OU") ## gives relatively low alpha (.07)
phylosig(ouTree(tree,alpha=alpha),x,method ="K", test =T, nsim =1000) ## gives
very low K


fitContinuous(tree, x, model="lambda") ## gives very high lambda (.95)
phylosig(lambdaTree(tree,lambda=lambda),x,method ="K", test =T, nsim =1000) ##
gives very high K


thanks for help,

Pas

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] interpreting phylogenetic signal

2012-12-08 Thread Theodore Garland Jr
The K value tells you how much signal you have, relative to a Brownian motion 
model of evolution.
Please see the explanation and large compilation of values for different traits 
in Blomberg et al. (2003), Evolution (available on my webpage)
For body size, K values on average did not differ statistically from 1.00.
However, K is for continuous-valued traits.  It does not make sense for many 
categorical traits!
What, exactly, is you trait?  

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
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Gabriel Yedid [gyedi...@gmail.com]
Sent: Saturday, December 08, 2012 9:04 AM
To: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] interpreting phylogenetic signal

On Sat, Dec 8, 2012 at 9:36 PM, Steven Kembel  wrote:
> Hi,
> If you want to test the hypothesis that there is non-random amount of 
> phylogenetic signal, you want the P-value (PIC.variance.P).
> The output of phylosignal is described in the help for the function (type 
> ?phylosignal to view the help).
> -Steve

Yes, but is the p-value really all that matters?  What about the
magnitude of the K-values, or the ratio of the observed to random PIC
variances, or the actual Z-score?

I ran a similar analysis very recently (with multiPhylosignal) and got
answers that said all the traits I was looking at had significant
signal (p < 0.001), but the K-values were all less than one.  However,
my phylogenies are very large (>1000 tips) and the traits I'm looking
at are discrete, so I don't know how that could be affecting this
test.

cheers,

Gabe


> Le 2012-12-08 à 00:40, E Pearson a écrit :
>
>> I calculated Blomberg's K using 'Kcalc' in 'picante' for a continuous trait
>> and a phylogeny of 65 species.
>>
>>
>> The K value is 1.079 and when I do the randomization test I get the
>> following results. I'm a bit confused by such a large PIC.variance.rnd.mean
>> = 8.031.
>>
>>
>> Should I be drawing conclusions by P = 0.0009 instead? Rejecting the NULL
>> of no phylogenetic signal?
>>
>>
>> # K PIC.variance.obs PIC.variance.rnd.mean PIC.variance.P PIC.variance.Z
>>
>> # 1.079533 1.274221  8.0318440.000999001
>> -3.351957
>>
>>   [[alternative HTML version deleted]]
>>
>> ___
>> R-sig-phylo mailing list - R-sig-phylo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
>
> --
> Steven W. Kembel
> Professeur régulier
> Département des sciences biologiques
> Université du Québec à Montréal
> kembel.steve...@uqam.ca
> +1 (514) 987-3000 poste 5855
> http://www.phylodiversity.net/skembel/
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] variation in rates over time, unexpected message when using Brownie.lite

2012-09-18 Thread Theodore Garland Jr
That number of 20 comes up from the simulations provided by both of these 
papers:

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

Freckleton, R. P., P. H. Harvey, and M. Pagel. 2002. Phylogenetic analysis and 
comparative data: a test and review of evidence. Am. Nat. 160:712-726.

Note, however, that both of those sets of simulations assumed no measurement 
error in the phenotypic trait(s) and no error in the phylogenetic topology or 
branch lengths.  Hence, they may well have underestimated how many species you 
need in the real world!  As they say, your mileage may vary ...

Cheers,
Ted

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Brian O'Meara [bome...@utk.edu]
Sent: Tuesday, September 18, 2012 1:25 PM
To: Agus Camacho
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] variation in rates over time, unexpected message 
when using Brownie.lite

That's a fairly small tree to be doing this with -- an old rule of thumb (I
think from Pagel) is 20 tips per parameter. Common issues are zero length
(or effectively zero length) branch lengths (what is min(phy$edge.length)?)
and polytomies (methodologically not a problem, but many packages don't
deal well with these).

Brian

___
Brian O'Meara
Assistant Professor
Dept. of Ecology & Evolutionary Biology
U. of Tennessee, Knoxville
http://www.brianomeara.info

Students wanted: Applications due Dec. 15, annually
Postdoc collaborators wanted: Check NIMBioS' website
Calendar: http://www.brianomeara.info/calendars/omeara


On Tue, Sep 18, 2012 at 4:08 PM, Agus Camacho wrote:

> Dear all, I tried to test something similar to Jason, but relating the
> change in rates to the acquisition of a trait, instead to a specific date.
>
> For that, I used a phylogeny with ten taxa, without outgroup.
> I used exactly the same script gently proposed by Liam but got the
> following error message:
> "Error in solve.default(model1$hessian) :Lapack routine dgesv: system is
> exactly singular"
>
> I've been looking through the internet but was not able to identify what
> causes this error. Any hint about that?
>
> BTW, anybody knows how to directly answer a message found in the digest of
> the mail list, without leaving the thread?
>
> Below, I pasted the complete thread dealing with this topic.
>
> Cheers,
> Agus
>
> Message: 9
> Date: Tue, 18 Sep 2012 00:13:00 -0400
> From: "Brian O'Meara" 
> To: Jason S 
> Cc: "R-sig-phylo@r-project.org" 
> Subject: Re: [R-sig-phylo] variation in rates over time
> Message-ID:
> <
> cakywhkq-jjroqzdvfutphi4xopxam+aaacu64nldb3inxoz...@mail.gmail.com>
> Content-Type: text/plain
>
> I agree with the suggestions so far. I just wanted to point out a few more
> alternatives:
>
> You could use the geiger package to estimate the best scaling for the
> tworatetree transformation to do this (should be equivalent to the earlier
> solutions, though it would require running optimization).
>
> You could also use the OUwie package with a tree that has been given simmap
> mappings using phytools. The advantage of this is that you could evaluate
> Brownian models but you could also look at various Ornstein-Uhlenbeck
> models (though note that while there is information about different
> Brownian rates before and after a time slice, info about different alphas
> (strength of pull parameter) and thetas (the attractor, aka "optimal
> value") is rapidly (but not immediately) lost under an OU process).
>
> For completeness, especially for citations, note that O'Meara et al. (2006)
> and Thomas et al. (2006) independently arrived at essentially the same
> method, so it is worth reading both papers.
>
> Best,
> Brian
>
> ___
> Brian O'Meara
> Assistant Professor
> Dept. of Ecology & Evolutionary Biology
> U. of Tennessee, Knoxville
> http://www.brianomeara.info

Re: [R-sig-phylo] alternative to Bartlett test of homogeneity of variances

2012-09-17 Thread Theodore Garland Jr
Several.  See these papers for starters:

Garland, T., Jr. 1992. Rate tests for phenotypic evolution using 
phylogenetically independent contrasts. Am. Nat. 140:509-519.

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.

Hutcheon, J. M., and T. Garland, Jr. 2004. Are megabats big? Journal of 
Mammalian Evolution 11:257-276.

Collar, D. C., P. C. Wainwright, T. J. Near. 2005. Comparative analysis of 
morphological diversity: does morphological disparity evolve at the same rate 
in two lineages of centrarchid fishes. Evolution 58:1783-1794. [first use of 
method by O'Meara et al., 2006]

O'Meara, B. C., C. Ane, M. J. Sanderson, and P. C. Wainwright. 2006. Testing 
for different rates of continuous trait evolution using likelihood. Evolution 
60:922-933. [full explanation of method used by Collar et al., 2005]

Rezende, E. L., and J. A. F. Diniz-Filho. 2012. Phylogenetic analyses: 
comparing species to infer adaptations and physiological mechanisms. 
Comprehensive Physiology 2:639-674.

Cheers,
Ted

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Jason S [jas2...@yahoo.com]
Sent: Monday, September 17, 2012 1:08 PM
To: R-sig-phylo@r-project.org
Subject: [R-sig-phylo] alternative to Bartlett test of homogeneity of   
variances

Hi there,

Is there a PCM that is analogous to the Bartlett test of homogeneity of 
variances?

Thanks,

Jason Mustakas
[[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


Re: [R-sig-phylo] Comparative analyse and heritability

2012-09-06 Thread Theodore Garland Jr
I am still a little unclear as to how to think about this trait, but it is an 
interesting problem that has also been discussed here:

Garland, T., Jr., P. H. Harvey, and A. R. Ives. 1992. Procedures for the 
analysis of comparative data using phylogenetically independent contrasts. 
Systematic Biology 41:18-32.
Pages 29-30"
WHAT KINDS OF TRAITS CAN BE ANALYZED?
 In addition to the usual phenotypic traits
(e.g., body size, metabolic rate), cultural
(see Cavalli-Sforza and Feldman, 1981), environmental
(e.g., soil or water pH, mean
annual temperature), and other traits that
are difficult to categorize (e.g., home range
area) can be studied as long as they are
passed on from ancestral to descendent
species (or populations) and have a continuous
distribution. For example, many environmental
properties, such as latitude or
mean annual rainfall, are not inherited in
the conventional (genetic) sense. Nevertheless,
they are inherited in the sense that
organisms are born into environmental
conditions and locations experienced by
their parents at the time of birth. Thus, the
ancestor of two species living in a desert
may also have lived in a desert (cf. Huey,
1987), or the ancestor of one high-latitude
and one equatorial species may have lived
at midlatitude. Similarly, if an environmental
characteristic is determined solely
(without externally imposed constraints)
through a process of habitat selection, and
if species differences in habitat selection
are genetically based, then species differences
in the environmental trait will be
genetically based as well. Alternatively, if
variation in some (genetically based) phenotypic
trait can be used as a precise indicator
of some environmental characteristic,
then that phenotypic trait may be used
as a surrogate for the environmental characteristic.
For example, toe fringes in lizards
might indicate occupancy of sandy
habitats. Unfortunately, this is not unfailingly
the case; some species that glide
through the air or that run across water
also possess toe fringes (Luke, 1986). Finally,
paleoclimatological and historical
biogeographical data might be used in conjunction
to indicate environmental characteristics
of hypothetical ancestral (as opposed
to tip) species, but this takes us into
the realm of other comparative methods,
such as those based on minimum evolution
reconstructions of ancestors (Huey, 1987;
Harvey and Pagel, 1991; Maddison, 1991;
Martins and Garland, 1991). In any case,
techniques for correlating phenotypes with
environmental characteristics require further
study.

And, in these papers, we used a hierarchical tree to compute phylogenetically 
independent contrasts for one trait and a collapsed tree to make a star for 
another, exactly as you are suggesting:
Bonine, K. E., and T. Garland, Jr. 1999. Sprint performance of phrynosomatid 
lizards, measured on a high-speed treadmill, correlates with hindlimb length. 
Journal of Zoology, London 248:255-265.
Perry, G., and T. Garland, Jr. 2002. Lizard home ranges revisited: effects of 
sex, body size, diet, habitat, and phylogeny. Ecology 83:1870-1885.
Wolf, C. M., T. Garland, Jr., and B. Griffith. 1998. Predictors of avian and 
mammalian translocation success:  reanalysis with phylogenetically independent 
contrasts. Biological Conservation 86:243-255.

The trick is to first put that other trait on the same tree as you use for 
"regular" traits and then collapse it so all of the internode branches have 
zero length (and the tips are contemporaneous).  That way (perhaps depending on 
exactly how the program you use is keeping track of things), the contrasts will 
all be isomorphic (same tips or nodes being contrasted) for both traits.  Then 
you can do a correlation or regression (always through the origin) in which one 
or more traits is on a hierarchical tree and one or more is on a star 
phylogeny.  We did this for non-phylogenetic nuisance variables (such as 
calculation method for home range size), but you could also do it for a "real" 
trait that was clearly non-phylgenetic (if there is such a thing -- see Joe's 
comment).  

Cheers,
Ted

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Joe Felsenstein [j...@gs.washington.edu]
Sent: Thursday, September 06, 2012 2:38 AM
To: tristan.lefeb...@gmail.com
Cc: r-sig-phylo@r-pro

Re: [R-sig-phylo] testing binomial characters

2012-08-29 Thread Theodore Garland Jr
Check this:

Ives, A. R., and T. Garland, Jr. 2010. Phylogenetic logistic regression for 
binary dependent variables. Systematic Biology 59:9-26.

Cheers,
Ted

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Jordan Golubov [gfjor...@correo.xoc.uam.mx]
Sent: Wednesday, August 29, 2012 12:23 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] testing binomial characters

Dear All,

I am trying to test whether a binomial character state (photoblastic
seeds vs indifferent responsive seeds) in species of Cactaceae is
affected by seed mass or length. 1) Is there a meas of identifying
phylogenetic signal for a two character state? 2) Is there a way of
testing what factor (both continuous seed mass/length) affects
photoblastic rersponse, maybe a GLMM?

Thanks

--
Dr. Jordan Golubov
Lab. Ecologia, Sistematica y FisiologiaVegetal
Departamento El Hombre y Su Ambiente
Universidad Autonoma Metropolitana Xochimilco
Calz. del Hueso 1100, Col. Villa Quietud, Coyoacán
04960, México D. F. México


"It is the mark of an educated mind to be able to entertain a thought
without accepting it".
>Aristotle

___
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


Re: [R-sig-phylo] pPCA - global and local components

2012-08-22 Thread Theodore Garland Jr
That seems like it would be OK, at least if you think it is OK for 
nonphylogenetic PCA.
An alternative is to simulate data along your phylogeny, analyze it the same 
way, do it a couple thousand times, then make an empirical null distribution 
of, say, the eigenvalues when the data have no correlation on average but 
increased variance in the values of correlations caused by the phylogenetic 
hierarchy.  
This is discussed in our very old PHYLOGR package.
However, you will need to make some decisions about the "branch lengths" to use 
for your individuals within species, represented by a bunch of mini-star 
phylogenies.

Cheers,
Ted

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwJ

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Franck Stefani [fopstef...@gmail.com]
Sent: Wednesday, August 22, 2012 3:50 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] pPCA - global and local components

Hi,

Among the graphical outputs of the pPCA, there is the scree plot showing
the global and local components. I would like to know what are the criteria
to define the number of GPC or LPC to interpret ? Can we use a broken stick
model?

Cheers,

Franck

[[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


Re: [R-sig-phylo] Can PGLS cope with collinearity between explanatory variables?

2012-08-17 Thread Theodore Garland Jr
The issue of collinearity of independent variables is neither better nor worse 
with PGLS as opposed to OLS.  Statistical significance per se of a correlation 
between X variables is not really the issue.  How strong is the correlation?  
Most sources suggest that it needs to be greater than 0.7-0.8 in magnitude to 
cause serious problems.

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

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Xu Han [duck_han365...@hotmail.com]
Sent: Friday, August 17, 2012 12:33 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Can PGLS cope with collinearity between explanatory  
variables?

Hi all,
I am testing a correlation between two explanatory variables and a response 
variable using PGLS. All of the variables are continuous. My model is Log 
female body size ~ Log egg size * Log clutch size. However, there is a 
significant negative correlation between egg size and clutch size. Can PGLS 
cope with collinearity between explanatory variables? Is there any way that I 
can apply something like principal component analysis to PGLS models?
Thanks,
Xu
[[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


Re: [R-sig-phylo] PIC or PGLS for genome-wide SNP screening

2012-05-23 Thread Theodore Garland Jr
>Is this the way in which one decides for OLS vs. PGLS?

If you have the same set of independent variables, then you just prefer the one 
(OLS or PGLS) with the higher likelihood.  So far as I am told by Joe 
Felsenstein, you cannot do a ln maximum likelihood ratio test because the 
number of parameters is the same, although this paper seems to suggest 
otherwise:
Mooers, A. O., S. M. Vamosi, and D. Schluter. 1999. Using phylogenies to test 
macroevolutionary hypotheses of trait evolution in cranes (Gruinae). American 
Naturalist 154:249-259.

For two models with the same set of independent variables, AIC does not add 
anything for you.

If you go to something like Regression with an OU process modeled for the 
residuals, then you do have an additional parameter being estimated and so you 
can do an ln maximum likelihood ratio test of that model versus OLS and versus 
PGLS.  For example, see:
Lavin, S. R., W. H. Karasov, A. R. Ives, K. M. Middleton, and T. Garland, Jr. 
2008. Morphometrics of the avian small intestine, compared with non-flying 
mammals: A phylogenetic perspective. Physiological and Biochemical Zoology 
81:526-550. [provides Matlab Regressionv2.m, released as part of the PHYSIG 
package]
Gartner, G. E. A., J. W. Hicks, P. R. Manzani, D. V. Andrade, A. S. Abe, T. 
Wang, S. M. Secor, and T. Garland, Jr. 2010. Phylogeny, ecology, and heart 
position in snakes. Physiological and Biochemical Zoology 83:43-54.

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
http://www.biology.ucr.edu/people/faculty/Garland.html

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Mattia Prosperi [ahn...@gmail.com]
Sent: Wednesday, May 23, 2012 8:05 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] PIC or PGLS for genome-wide SNP screening

Dear all,

I am working on a data set composed of bacterial genomic sequences (a
few genes) associated to phenotypic values (in-vitro resistance to
antibiotics, a numerical value discretised into a binary class). Of
note, the bacterial isolates were sampled non-uniformly at different
times and locations, thus with a possible sampling bias. The data set
is ~1,000 variables and ~1,000 observations.

I have been applying several methods for developing a model to predict
antibiotic resistance from the single nucleotide polymorphisms (SNP)
extracted from a multiple alignment, applying classical statistical
learning and feature selection methods.
Eventually, I found that a logistic regression with main effects,
where the variables were selected first by a univariable chi-square
screening and then by AIC stepwise, was as good as other more complex
and non-linear methods (such as random forests) by comparing different
loss function (AUROC, specificity, sensitivity) distributions  upon
multiple cross-validation runs. Also, the SNP sets selected by
different approaches were highly similar and consistent across several
bootstrap evaluations.

I found that a few relevant (even after Bonferroni correction) SNP
were located in gene regions that are not supposed to be related with
antibiotic resistance. I thought that this might be a consequence of
neutral mutations that became fixed in the population by chance after
a genetic bottleneck (e.g. antibiotic pressure).
I'd like to understand if such SNP that is associated to antibiotic
resistance (and actually not expected to be) is indeed just a random
mutation of an early isolate that was carrying the true resistance SNP
(in another gene region) and that was selected by the antibiotic
pressure, thus transfering both the true resistance SNP and the
"hitchhicking" ones to the offspring. Unfortunately it is not easy to
cross-tabulate SNP in different genes because not all isolates have
been sequenced the same set of genes.

In order to check for fake/true SNP associated to resistance, I
thought I might use a PIC or PGLS approach (after estimating a
phylogenetic tree from the multiple alignment), in the same settings
as the original analysis, i.e. a model selection approach with both
feature and performance evaluation (well, since the coefficients of
PGLS/OLS are the same, it's just a matter of standard errors and
feature set selection), regressing the resistance class as a dependent
variable and using the SNP as covariates.

Is this a reasonable approach? Does it make sense to set up -for
in

Re: [R-sig-phylo] Best way to test correlation between discrete and continuous variables ?

2012-05-16 Thread Theodore Garland Jr
Dear Julien,

I'll just add two other papers to your reading list (both available at my web 
page):

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.

And the Appendix of this paper:
Lavin, S. R., W. H. Karasov, A. R. Ives, K. M. Middleton, and T. Garland, Jr. 
2008. Morphometrics of the avian small intestine, compared with non-flying 
mammals: A phylogenetic perspective. Physiological and Biochemical Zoology 
81:526-550. [provides Matlab Regressionv2.m, released as part of the PHYSIG 
package]

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
http://www.biology.ucr.edu/people/faculty/Garland.html

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Marguerite Butler [mbutler...@gmail.com]
Sent: Wednesday, May 16, 2012 12:27 PM
To: Julien Lorion
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] Best way to test correlation between discrete and
continuous variables ?

Dear Julien,

There is no problem with applying an ANOVA within a phylogenetic framework. 
This is essentially phylogenetic GLS, which you can implement easily with APE. 
You can have a look at Emmanuel's book (which was just recently came out in the 
second edition Nov. 2011, by the way).

http://www.amazon.com/Analysis-Phylogenetics-Evolution-Emmanuel-Paradis/dp/1461417422/ref=sr_ob_11?s=books&ie=UTF8&qid=1337196146&sr=1-11

In essence, you are looking at the phylogeny as a source of "correlated errors" 
which you are "correcting for" under some assumed model of evolution -- either 
Brownian motion or Ornstein Ulenbeck. It is viewed as noise which is controlled 
for in order to see the pattern from ecology, etc. The mechanics of how to 
incorporate the phylogenetic covariance matrix into the linear model is 
explained in the appendix of my paper:

Butler M.A. Schoener T.W., and Losos J.B. (2000)  The relationship between 
habitat type and sexual size dimorphism in Greater Antillean Anolis lizards.  
Evolution 54(1):259-272. DOI: 
http://dx.doi.org/10.1554/0014-3820(2000)054[0259:TRBSSD]2.0.CO;2

Another approach to analyzing the same kind of data is to view the evolution of 
the quantitative character as being influenced by a number of factors (for 
example, habitat, symbionts, etc.), which can be thought of as "selective 
regimes" which influence the evolution of body size. You can then create 
explicit biological hypotheses which are translated to mathematical models, and 
test these hypotheses against each other for the best explanation of the data. 
This approach has software package developed for it called "OUCH" which is 
available in R.  It is explained and illustrated in this paper:

Butler M.A. and King A.A. (2004) Phylogenetic comparative analysis: a modeling 
approach for adaptive evolution. The American Naturalist 164(6):683-695. DOI: 
10.1086/426002

Appologies for the shameless self-promotion:).

Marguerite

On May 15, 2012, at 9:53 PM, Julien Lorion wrote:

> Dear all,
>
> I am working on the evolution of deep-sea symbiotic mussels... I have got a 
> tree and 5 characters: habitat (hydrothermal vents, cold seep and organic 
> substrate), presence/absence of methanotrophic symbionts, presence/absence of 
> sulfoxydizing symbionts, symbiont location (extra VS intracellular) and body 
> length...
>
> So that's 1 continuous and 4 discrete binary variables (actually, I assumed 
> vent and seeps are very similar... so no need to take into account the 3 
> states)
>
> At first I tested various hypotheses about correlation between my discrete 
> characters... I chose the easy way: I remembered my master lectures and used 
> basic Pagel's correlations. If you think that any new tool performs better, 
> I'd be happy to hear it.
>
> For now, my main concern is that I wanna test the impact of two binary 
> variables (habitat and symbiont location) on the body length... In fact, that 
> looks likes ANOVAs from which I wanna remove the phylogenetic bias...
>
> The point is that I don't know how to do that in practice. May someone have 
> some advices ?
>
> Thanks by advance
>
> Best regards
>
&

Re: [R-sig-phylo] nonparametric PGLS

2012-05-11 Thread Theodore Garland Jr
I general, you should not be worrying about normality of the "tip" data, but 
rather the residuals of whatever multiple regression-type model you are 
implementing.  Check those, and maybe they will be OK with a particular 
combination of independent variables.  Bad residuals can adversely affect the 
likelihood of a model, so particularly check for big outliers.

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
http://www.biology.ucr.edu/people/faculty/Garland.html

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Pascal Title [pascalti...@gmail.com]
Sent: Thursday, May 10, 2012 8:46 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] nonparametric PGLS

Hi everyone

I have character data for species on a phylogeny, but simple
transformations like log-transformations or square-root transformations are
not proving to be sufficient to get the data to be normal. If this were a
non-phylogenetic test, I would resort to something like a Spearman
correlation, which is non-parametric.
But with phylogenetic generalized least squares, is there any method that
is nonparametric?

Thanks!


-Pascal Title

[[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


Re: [R-sig-phylo] Normality requirement for assessment of lambda with phylosig (phytools) and fitContinuous (geiger)

2012-04-25 Thread Theodore Garland Jr
Read over the Blomberg et al. (2003) paper.
K is intended for continuous-valued traits and/or those evolving similar to 
Brownian motion.
You could report it if you wished, but I would add that caveat if you do.

The randomization test should be robust in any case.

Cheers,
Ted


From: Nina Hobbhahn [n.hobbh...@gmail.com]
Sent: Wednesday, April 25, 2012 9:19 AM
To: Theodore Garland Jr
Cc: Alejandro Gonzalez; Hunt, Gene; Enrico Rezende; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] Normality requirement for assessment of lambda with  
phylosig (phytools) and fitContinuous (geiger)

Thanks all for your helpful contributions! I will use phylosignal.

Ted, I'm not sure I understand your last comment, "when the data are not though 
of as continuous-valued and/or evolving similar to Brownian motion". What do 
you mean by that? Also, are you suggesting that I report the presence/absence 
of phylogenetic signal, but not the value of the K statistic?

Many thanks again,

Nina


On 2012-04-25, at 5:54 PM, Theodore Garland Jr wrote:

> However, calculating a K statistic is strange when the data are not thought 
> of as continuous-valued and/or evolving similar to Brownian motion.  The 
> randomization test is OK, however.
>
> Cheers,
> Ted
>
> From: Alejandro Gonzalez [alejandro.gonza...@ebd.csic.es]
>
> Sent: Wednesday, April 25, 2012 8:46 AM
>
> To: Theodore Garland Jr
>
> Cc: Nina Hobbhahn; r-sig-phylo@r-project.org
>
> Subject: Re: [R-sig-phylo] Normality requirement for assessment of lambda 
> with phylosig (phytools) and fitContinuous (geiger)
>
>
>
>
>
>
>
> Hello,
>
>
>
>
>
> The library picante in R implements Blomberg et al (2003) K estimate, Liam's 
> phytools package does as well. Phytools has the added advantage, if I 
> remember correctly, of allowing users to estimate K including within species 
> variation.
>
>
>
>
>
> Cheers
>
>
>
>
>
> Alejandro
>
>
>
>
>
>
>
>
>
>
> On 25, Apr 2012, at 5:29 PM, Theodore Garland Jr wrote:
>
>
>
> I would suggest the randomization test in Blomberg et al. (2003).  This will 
> give a valid significance test of the null hypothesis of no phylogenetic 
> signal.  By itself, it does not give a measure of the strength (or amount) of 
> phylogenetic signal.  Not
> sure if it is implented in r.  If not, I can send our Matlab code.
>
>
>
> 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:  tgarl...@ucr.edu
>
> http://www.biology.ucr.edu/people/faculty/Garland.html
>
>
>
> Experimental Evolution: Concepts, Methods, and Applications of Selection 
> Experiments. 2009.
>
> 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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] 
> on behalf of Nina Hobbhahn [n.hobbh...@gmail.com]
>
> Sent: Wednesday, April 25, 2012 1:55 AM
>
> To: r-sig-phylo@r-project.org
>
> Subject: [R-sig-phylo] Normality requirement for assessment of lambda with
>   phylosig (phytools) and fitContinuous (geiger)
>
>
>
> Dear fellow list users,
>
>
>
> I would like to assess the magnitude of phylogenetic signal in two sets of 
> continuous data. Set 1 contains numerous zeros and is therefore non-normal. 
> Set 2 contains very little variation and is non-normal due to 
> underdispersion. Given that both data sets are
> largely immune to transformations to normality, I am wondering whether the 
> lambda estimates for untransformed data derived from phylosig and 
> fitContinuous will be meaningful? If not, can you recommend transformations 
> or other methods of phylogenetic-signal
> assessment that would be preferable?
>
>
>
> Thank you very much,
>
>
>
> Nina
>
>
>
>
>
>
>
> Dr. Nina Hobbhahn
>
> Post-doctoral fellow
>
> Lab of Prof. S. D. Johnson
>
> School of Life Sciences
>
> University of KwaZulu-Natal
>
> Private Bag X01
>
> Scottsville, Pietermaritzburg, 3201
>
> South Africa

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


Re: [R-sig-phylo] Normality requirement for assessment of lambda with phylosig (phytools) and fitContinuous (geiger)

2012-04-25 Thread Theodore Garland Jr
However, calculating a K statistic is strange when the data are not thought of 
as continuous-valued and/or evolving similar to Brownian motion.  The 
randomization test is OK, however.

Cheers,
Ted

From: Alejandro Gonzalez [alejandro.gonza...@ebd.csic.es]

Sent: Wednesday, April 25, 2012 8:46 AM

To: Theodore Garland Jr

Cc: Nina Hobbhahn; r-sig-phylo@r-project.org

Subject: Re: [R-sig-phylo] Normality requirement for assessment of lambda with 
phylosig (phytools) and fitContinuous (geiger)







Hello,





The library picante in R implements Blomberg et al (2003) K estimate, Liam's 
phytools package does as well. Phytools has the added advantage, if I remember 
correctly, of allowing users to estimate K including within species variation.





Cheers





Alejandro










On 25, Apr 2012, at 5:29 PM, Theodore Garland Jr wrote:



I would suggest the randomization test in Blomberg et al. (2003).  This will 
give a valid significance test of the null hypothesis of no phylogenetic 
signal.  By itself, it does not give a measure of the strength (or amount) of 
phylogenetic signal.  Not
 sure if it is implented in r.  If not, I can send our Matlab code.



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:  tgarl...@ucr.edu

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



Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.

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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Nina Hobbhahn [n.hobbh...@gmail.com]

Sent: Wednesday, April 25, 2012 1:55 AM

To: r-sig-phylo@r-project.org

Subject: [R-sig-phylo] Normality requirement for assessment of lambda with  
phylosig (phytools) and fitContinuous (geiger)



Dear fellow list users,



I would like to assess the magnitude of phylogenetic signal in two sets of 
continuous data. Set 1 contains numerous zeros and is therefore non-normal. Set 
2 contains very little variation and is non-normal due to underdispersion. 
Given that both data sets are
 largely immune to transformations to normality, I am wondering whether the 
lambda estimates for untransformed data derived from phylosig and fitContinuous 
will be meaningful? If not, can you recommend transformations or other methods 
of phylogenetic-signal
 assessment that would be preferable?



Thank you very much,



Nina







Dr. Nina Hobbhahn

Post-doctoral fellow

Lab of Prof. S. D. Johnson

School of Life Sciences

University of KwaZulu-Natal

Private Bag X01

Scottsville, Pietermaritzburg, 3201

South Africa





   [[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












__



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













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


Re: [R-sig-phylo] Normality requirement for assessment of lambda with phylosig (phytools) and fitContinuous (geiger)

2012-04-25 Thread Theodore Garland Jr
I would suggest the randomization test in Blomberg et al. (2003).  This will 
give a valid significance test of the null hypothesis of no phylogenetic 
signal.  By itself, it does not give a measure of the strength (or amount) of 
phylogenetic signal.  Not sure if it is implented in r.  If not, I can send our 
Matlab code.

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:  tgarl...@ucr.edu
http://www.biology.ucr.edu/people/faculty/Garland.html

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Nina Hobbhahn [n.hobbh...@gmail.com]
Sent: Wednesday, April 25, 2012 1:55 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Normality requirement for assessment of lambda with  
phylosig (phytools) and fitContinuous (geiger)

Dear fellow list users,

I would like to assess the magnitude of phylogenetic signal in two sets of 
continuous data. Set 1 contains numerous zeros and is therefore non-normal. Set 
2 contains very little variation and is non-normal due to underdispersion. 
Given that both data sets are largely immune to transformations to normality, I 
am wondering whether the lambda estimates for untransformed data derived from 
phylosig and fitContinuous will be meaningful? If not, can you recommend 
transformations or other methods of phylogenetic-signal assessment that would 
be preferable?

Thank you very much,

Nina



Dr. Nina Hobbhahn
Post-doctoral fellow
Lab of Prof. S. D. Johnson
School of Life Sciences
University of KwaZulu-Natal
Private Bag X01
Scottsville, Pietermaritzburg, 3201
South Africa


[[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


Re: [R-sig-phylo] Testing for phylogenetic signal in proportions

2012-03-14 Thread Theodore Garland Jr
It is really too few species to have a sufficiently powerful test for 
phylogenetic signal.  See Blomberg et al. (2003), available on my website.

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
http://www.biology.ucr.edu/people/faculty/Garland.html

Experimental Evolution: Concepts, Methods, and Applications of Selection 
Experiments. 2009.
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Rob Lanfear [rob.lanf...@gmail.com]
Sent: Wednesday, March 14, 2012 8:18 PM
To: r-sig-phylo
Subject: [R-sig-phylo] Testing for phylogenetic signal in proportions

Hi All,

I've tried searching the literature for this but the search terms tend to
give irrelevant papers, so I thought I'd ask for some guidance here.

I have a set of 11 species, an ultrametric tree for the species, and for
each species I have a set of proportional data for 5 chemical traits. E.g.
for spp1 my data might be: chemicalA=10%, chemicalB=50%, chemicalC=1%,
chemicalD=19%, chemicalE=20%. The set of traits for each species always
sums to 100%, but I don't know, and can't measure, the absolute values of
the traits. Biologically speaking, this is OK, because it's the proportions
that I'm interested in.

I want to test for phylogenetic signal in these traits, and estimate the
rate of change of each proportion along the phylogeny. Can anyone point me
to any appropriate references for the methods and pitfalls of attempting to
do this with proportion data? I can see that proportional data will have
some odd properties (non-independence of traits, bounded (i.e.
non-Brownian) evolution, etc.), but the best way of accounting for these is
not immediately apparent to me.

Thanks,

Rob

--
Rob Lanfear
Research Fellow,
Ecology, Evolution, and Genetics,
Research School of Biology,
Australian National University

Tel: +61 2 6125 4321
www.robertlanfear.com

[[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


Re: [R-sig-phylo] Blomberg K Statistic

2012-01-20 Thread Theodore Garland Jr
Hi Daniel,

I see no reason NOT to calculate K and also to test for significance of the MSE.
Your study design is an excellent one for testing the habitat effect (as we 
have pointed out in some papers).  If habitat does have a strong effect, then 
you would expect the K value to be quite low.

Note that K does not need to be near 1.00 in order for the randomization test 
for phylogenetic signal using the MSE to be statistically significant.  
Depending on sample size and so forth, many K statistics even below 0.5 can be 
associated with significant results in the randomization test for MSE (see 
Blomberg et al., 2003).

All this said, I'd like to see your tree and some tip data -- can you send it 
as a Nexus file I can read into Mesquite?

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
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of dwe...@life.illinois.edu [dwe...@life.illinois.edu]
Sent: Friday, January 20, 2012 9:38 AM
To: liam.rev...@umb.edu
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] Blomberg K Statistic

Hi Liam,
  Thanks for getting back to me.
  You are correct with #2- I have many bifurcations close to the present.
The reason for this is that I am comparing between two different
habitats of 21 different species.  So, essentially, for each species,
there are 2 tips (with branch lengths of 0)- 1 for each habitat (lentic
and lotic).
  So, from what you are saying, I can't use the K statistic.  Do you (or
anyone else on this list) have an idea on a better way to test for
phylogenetic significance on a tree where comparisons are made within
species (between different habitats) as well as between species?
  Thank you for your thoughts.





-Daniel


> Hi Daniel.
>
> I can think of two possibilities:
>
> 1) This is an error.
>
> 2) Your tree has an extremely unusual shape (for instance, it has many
> bifurcations very close to the present day).
>
> On constant rate Yule trees, substituting 1s for the true branch lengths
> does not (on average) bias K in any particular direction.
>
> If you share your tree and data I would be happy to look at the issue
> more closely.
>
> 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 1/19/2012 9:53 PM, dwe...@life.illinois.edu wrote:
>> Hi,
>>I'm using the Picante package in R to calculate the Blomberg K.  I'm
>> trying to test for a phylogenetic signal in my data.  I'm using a
>> dataset with the PC score for 21 different species on a tree with
>> varying branch lengths.  I did this using the code here:
>> http://bodegaphylo.wikispot.org/IV._Testing_Phylogenetic_Signal_in_R
>>
>>I got a K statistic of 0.0006457603 and yet the resultant
>> PIC.variance.P
>> is 0.001.  If I'm correct, the PIC.variance.P is the p-value and
>> significant at 0.05.  Is that correct?
>>I then decided to play with my data and set all branch lengths equal
>> to
>> 1 to see how that would affect things.  I got a K statistic of 2.921763
>> and a PIC.variance.P value of 0.001.  My understanding is that K
>> statistics close to 0 are not significant and become significant close
>> to and above 1.
>>I'm confused why I got a significant p-value for both K statistics,
>> even
>> though one is very close to 0 (0.00065) and the other is above 2.  I
>> would appreciate any help in explaining Picante and the K statistic.
>> Thank you.
>>
>>
>>
>>
>> -Daniel
>>
>> ><º>  -><º>  ><º>  ><º>  ><º>
>> 
>>
>> Daniel P Welsh
>> PhD Candidate
>> 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
>> ht

Re: [R-sig-phylo] R-sig-phylo Digest, Vol 48, Issue 12

2012-01-19 Thread Theodore Garland Jr
I could not have said it better myself!

Thanks, Luke!

Ted

From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Luke Matthews [lmatth...@activatenetworks.net]
Sent: Thursday, January 19, 2012 6:41 AM
To: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] R-sig-phylo Digest, Vol 48, Issue 12

Ana,
I think what Ted and Paolo are getting at is you can't say the evolutionary 
relationships contributed to X% of the slope because the tree only deals with 
the nonindependence of the data points and is not itself an independent 
predictor variable.  Because of this, regular gls regression applied to data 
that are nonindependent due to phylogeny produce unbiased estimates of the 
slope.  The estimates of the standard error of the slopes, however, are biased 
to be too small when you run gls with nonindependent data.

You are correct, however, that using a phylogeny will almost always alter the 
slope.  This is because phylogenetic comparative methods (PCM) model the 
structure of the nonindependence and so change the slope estimate.  This makes 
PCM and related methods (spatial models, network models) quite different from 
some methods of rank or robust regression that can produce exactly the same 
slope estimates as gls and will only increase the standard error estimates.  In 
your particular case, the slope was higher.  So it would be accurate to say, in 
this particular case, that ignoring the phylogeny resulted in a slope that was 
underestimated (not biased) by 26%.  The phylogeny does not 'account for' this 
% of slope, but ignoring the phylogeny does produce a slope estimate that is 
inaccurate by 26% of the better PIC slope in this particular case.

Best regards,
Luke

Luke J. Matthews
Director of Data Analysis
Activate Networks, Inc.


Message: 3
Date: Wed, 18 Jan 2012 17:34:14 +0100 (CET)
From: ppi...@uniroma3.it
To: "Theodore Garland Jr" 
Cc: "r-sig-phylo@r-project.org" ,Ana Longo

Subject: Re: [R-sig-phylo] Comparing slopes from regressions and PIC
regressions
Message-ID: <2397.79.32.224.88.1326904454.squir...@mail.uniroma3.it>
Content-Type: text/plain;charset=iso-8859-1

VERY synthetically

The two r-squared are NOT comparable. Taking in to account phylogeny is useful 
just to partial out data non independence due to shared ancestry, and to 
perform better tests of significance but the r-sq could be higher or smaller 
just because of chance.

Maybe someone can add more on this.
best
paolo


Long story short, you don't want to think about it in those terms.

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
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-boun...@r-project.org
[r-sig-phylo-boun...@r-project.org] on behalf of Ana Longo [ana.lo...@gmail.com]
Sent: Wednesday, January 18, 2012 7:20 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Comparing slopes from regressions and PIC regressions

Dear all



I am currently analyzing a community dataset of two continuous traits ?
survival and disease resistance.



I ran two regressions: (1) considering each species independent data points, 
and (2) phylogenetic independent contrasts.
Both regressions were
significant.  Blomberg?s K also significant and ~ 0.38, and 0.34, respectively.



However, I am interested in the slope of these regressions. For regression 1, 
slope = 0.142, for regression 2 slope = 0.105.

I am interested in saying how much (in %) the evolutionary relationships 
contributed to the slope.  My question is:



Can I say that evolutionary relationships accounted for 74% (0.105/0.142) of 
the observed slope? Or is it only 26%?



Thanks in advance for your help, since I don't have any experience running 
these types of analyses.



Best regards,



Ana

[[alternative HTML version deleted]]


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



--
Paolo Piras
Center for Evolutionary Ecology
 and
Dipartimento di Scienze Geologiche, Universit? Roma Tre Largo San Leonardo 
Murialdo, 1, 00146 Roma
Tel: +390657338000
email: ppi...@uniroma3.it

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


Re: [R-sig-phylo] Comparing slopes from regressions and PIC regressions

2012-01-18 Thread Theodore Garland Jr
Long story short, you don't want to think about it in those terms.

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
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Ana Longo [ana.lo...@gmail.com]
Sent: Wednesday, January 18, 2012 7:20 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] Comparing slopes from regressions and PIC regressions

Dear all



I am currently analyzing a community dataset of two continuous traits –
survival and disease resistance.



I ran two regressions: (1) considering each species independent data
points, and (2) phylogenetic independent contrasts.  Both regressions were
significant.  Blomberg’s K also significant and ~ 0.38, and 0.34,
respectively.



However, I am interested in the slope of these regressions. For regression
1, slope = 0.142, for regression 2 slope = 0.105.

I am interested in saying how much (in %) the evolutionary relationships
contributed to the slope.  My question is:



Can I say that evolutionary relationships accounted for 74% (0.105/0.142)
of the observed slope? Or is it only 26%?



Thanks in advance for your help, since I don't have any experience running
these types of analyses.



Best regards,



Ana

[[alternative HTML version deleted]]


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


Re: [R-sig-phylo] split data set and topology on PGLS

2011-12-14 Thread Theodore Garland Jr
Why not just include an interaction term between your main effect coding 
variable (presumably coded as 0, 1 to indicate your two ecomorphs) and one or 
more of your continuous independent variables?

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:  tgarl...@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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Matt Pennell [mwpenn...@gmail.com]
Sent: Wednesday, December 14, 2011 12:17 PM
To: Renata Brandt
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] split data set and topology on PGLS

Hi Renata,

This seems to be an appropriate approach. (I am sure someone will correct
me if i am wrong in this). Phylogenetic regression in the way that you are
using it is basically to remove the statistical non-independence between
data points. Effectively what you are doing by splitting your data into two
morphologies is pruning your tree. Under Brownian motion, evolution along
any branch is independent of evolution along any other branch, so pruning
your tree will not change the correlation struction of the data.
(Similarily you can still do PGLS with incomplete sampling of species). So
as long as you can justify splitting the data up as you are, it seems fine.

cheers,
matt

On Wed, Dec 14, 2011 at 12:09 PM, Renata Brandt wrote:

> Hello everybody.
>
> I have some questions for you.
> When performing a phylogenetic regression between two continuous traits,
> the dependent trait clearly divides my data set in two distinct
> morphologies. This division overlaps with what I previously thought were
> two different ecomorphs. The relationship between the same traits seems to
> be different for each morphology.
>
> Now my question is:
> - Is it ok to split the data set (one data table and topology for each
> ecomorph) and reanalyze data to get the relationship between traits for
> each group? (That is what I would do if not using a phylogenetic approach).
> - If this is wrong, any hints on how should I proceed?
>
> Many thanks. Cheers.
>
> --
> Renata Brandt
> Departamento de Biologia - FFCLRP
> Universidade de São Paulo
> Brasil
> (16) 82039533
>
>  /..)
> (  (
>  )  )
>  (  (
>  )  )
> _(  (_
>  )  )
>  \ )
>\
>
>[[alternative HTML version deleted]]
>
>
> ___
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>
>

[[alternative HTML version deleted]]


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


Re: [R-sig-phylo] Comparative Methods and Pseudo-Traits

2011-11-14 Thread Theodore Garland Jr
Hi All,
This is an interesting discussion.  I'll draw your attention to two 
papers, one new and the other old.  This is the new one:
Grandcolas, P., R. Nattier, F. Legendre, and R. Pellens. 2011. Mapping 
extrinsic traits such as extinction risks or modelled bioclimatic niches on 
phylogenies: does it make sense at all? Cladistics 27:181-185.
It is written from a somewhat different perspective than we usually have on 
this list.
This is the old one, and I am taking the liberty of pasting in the 
relevant passage:
Garland, T., Jr., P. H. Harvey, and A. R. Ives. 1992. Procedures for the 
analysis of comparative data using phylogenetically independent contrasts. 
Systematic Biology 41:18-32.Pages 29-30:WHAT KINDS OF TRAITSCAN BE ANALYZED?    
 The independent contrasts approach isdesigned to investigate the correlated 
evolutionof traits that are inherited from ancestors,whatever the cause of that 
heritability.Thus, the phenotypic data for tipspecies are generally assumed to 
reflect underlyinggenetic differences among species,as could be verified 
through common-garden experiments (Garland and Adolph,1991). The tip species 
for one set of contrastscan even be different from those forthe other set, as 
long as the phylogenetictrees are isomorphic. This realization makesit possible 
to use independent contrasts toexamine coevolution of phenotypic traitssuch as 
body size and life span in coevolvedhost-parasite systems (see Harveyand 
Keymer, 1991).     In addition to the usual phenotypic traits(e.g., body size, 
metabolic rate), cultural(see Cavalli-Sforza and Feldman, 1981), 
environmental(e.g., soil or water pH, meanannual temperature), and other traits 
thatare difficult to categorize (e.g., home rangearea) can be studied as long 
as they arepassed on from ancestral to descendentspecies (or populations) and 
have a continuousdistribution. For example, many environmentalproperties, such 
as latitude ormean annual rainfall, are not inherited inthe conventional 
(genetic) sense. Nevertheless,they are inherited in the sense thatorganisms are 
born into environmentalconditions and locations experienced bytheir parents at 
the time of birth. Thus, theancestor of two species living in a desertmay also 
have lived in a desert (cf. Huey,1987), or the ancestor of one high-latitudeand 
one equatorial species may have livedat midlatitude. Similarly, if an 
environmentalcharacteristic is determined solely(without externally imposed 
constraints)through a process of habitat selection, andif species differences 
in habitat selectionare genetically based, then species differencesin the 
environmental trait will begenetically based as well. Alternatively, 
ifvariation in some (genetically based) phenotypictrait can be used as a 
precise indicatorof some environmental characteristic,then that phenotypic 
trait may be usedas a surrogate for the environmental characteristic.For 
example, toe fringes in lizardsmight indicate occupancy of sandyhabitats. 
Unfortunately, this is not unfailinglythe case; some species that glidethrough 
the air or that run across wateralso possess toe fringes (Luke, 1986). 
Finally,paleoclimatological and historicalbiogeographical data might be used in 
conjunctionto indicate environmental characteristicsof hypothetical ancestral 
(as opposedto tip) species, but this takes us intothe realm of other 
comparative methods,such as those based on minimum evolutionreconstructions of 
ancestors (Huey, 1987;Harvey and Pagel, 1991; Maddison, 1991;Martins and 
Garland, 1991). In any case,techniques for correlating phenotypes 
withenvironmental characteristics require furtherstudy.
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
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of David Bapst [dwba...@uchicago.edu]
Sent: Monday, November 14, 2011 12:54 PM
To: Liam J. Revell; Joe Felsenstein; pasquale.r...@libero.it
Cc: R Sig Phylo Listserv
Subject: Re: [R-sig-phylo] Comparative Methods and Pseudo-Traits

Liam, Joe, Pasquale, all-

Thank you for your kind input.It seems that I am not the only one who
considers this issue at length.

There is just one point I'd like clarification of. Liam, in my first
example which you used, the inherited trait is the response and the
not-directly-inheritable trait the predictor,

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

2011-11-04 Thread Theodore Garland Jr
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:  tgarl...@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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Alberto Gallano [alberto@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.garl...@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:  tgarl...@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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org]
> on behalf of Marguerite Butler [mbutler...@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 w

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

2011-11-03 Thread Theodore Garland Jr
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:  tgarl...@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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Marguerite Butler [mbutler...@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.399,
> 1e-07, 1e-07, 2.399, 1e-07, 1e-07, 5.799, 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")
>
>
> # -

Re: [R-sig-phylo] specifying weights in gls

2011-09-22 Thread Theodore Garland Jr
I think you might want to be using one over the square root of the sample size 
as the weights.  We have sometimes done this when using phylogenetically 
independent contrasts:

Bonine, K. E., and T. Garland, Jr. 1999. Sprint performance of phrynosomatid 
lizards, measured on a high-speed treadmill, correlates with hindlimb length. 
Journal of Zoology, London 248:255-265.

Perry, G., and T. Garland, Jr. 2002. Lizard home ranges revisited: effects of 
sex, body size, diet, habitat, and phylogeny. Ecology 83:1870-1885.

This paper also has some relevant things:

Ives, A. R., P. E. Midford, and T. Garland, Jr. 2007. Within-species variation 
and measurement error in phylogenetic comparative methods. Systematic Biology 
56:252-270.

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
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Will Stein [rwst...@sfu.ca]
Sent: Thursday, September 22, 2011 1:07 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] specifying weights in gls

Hi All,

I am working on a comparative analysis involving a relatively small taxa set 
(16), one continuous dependent character, one continuous independent character, 
and a dummy variable (0,1) that specifies group membership (two groups). I've 
been running bivariate regressions with and without the dummy variable in APE 
using gls and corPagel, and an ultrametric phylogeny that is well resolved.

To the issue: the species-specifc mean values that compose the continuous 
independent variable were generated from a wide array of sample sizes (range 4 
- 300). My impression is that there is heterogeneity in the precision of the 
estimates resulting from sample size variability and that both groups are 
similarly heterogeneous. I would like to account for this heterogeneity in the 
independent variable explicitly; however, I do not have the variances of the 
species-specific mean values, only the sample size they were generated from, 
which suggests using a weight that is proportional to the sample size.

I've looked into the varFunc and the associated varClass functions available in 
gls. My initial impression is that varFixed seems an appropriate varClass 
option and I am getting reasonable results with varFixed(~1/sample.size). I am 
wondering if others have dealt with this issue directly, and if so, how? This 
must be a relatively common consideration. The model set up ends being:


weighted.gls.fit <- gls(Dep.Var ~ Indep.Var, 
weights=varFixed(~1/sample.size),correlation=corPagel(0.5,phy), data=data.frame)
summary(weighted.gls.fit)

Best,

Will Stein

___
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


Re: [R-sig-phylo] squared-change parsimony reconstruction

2011-08-27 Thread Theodore Garland Jr
I have not tried this, but why should you need to set the branch lengths equal 
to one?  That is not a requirement of the squared-change parsimony algorithm 
(or ML equivalent) per se.  (With variable branch lengths, people often refer 
to it as weighted squared-change parsimony.)  Maybe this is just a limitation 
in ACE?

Also, how does ACE handle polytomies?  I know that some algorithms have trouble 
with polytomies, which may be indicated as zero-length branches.

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
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Sam Brown [s_d_j_br...@hotmail.com]
Sent: Friday, August 26, 2011 5:11 PM
To: r-sig-phylo@r-project.org; onmik...@gmail.com
Subject: Re: [R-sig-phylo] squared-change parsimony reconstruction

>> Date: Thu, 25 Aug 2011 13:13:47 +0200
>> From: Ond?ej Mikula 
>> To: r-sig-phylo@r-project.org
>> Subject: [R-sig-phylo] squared-change parsimony reconstruction
>> Message-ID:
>>  
>> Content-Type: text/plain
>>
>> Dear all,
>>
>> I would like to make squared-change parsimony reconstruction of ancestral
>> states for continuous multivariate data as recommended by:

Hi Ondrej

This can be done by setting the branch lengths of your tree to '1' and running

ace(vector_of_states, your_tree, type = "continuous", method = "ML")

See also the R-phylo wiki:
http://www.r-phylo.org/wiki/HowTo/Ancestral_State_Reconstruction

Cheers!

Samuel Brown

[[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


Re: [R-sig-phylo] R: Re: R: Re: R: ancestral state reconstruction for tips

2011-08-05 Thread Theodore Garland Jr
Hi Pas,
 
No worries, we have all done an accidental "Reply All" more than once!
 
>I estimated ancestral (and tip) values for which I have real data via
>BM assumption to see how good the fit is
 
Can you clarify?  Unless you have some a priori hypothesis to test about a 
particular tip (or set of tips, such as a whole clade), then why would you 
estimate their values and how would you do this?  Did you just delete one at a 
time, crank the numbers (presumably yielding the same values as you would get 
from Garland and Ives, 2000), and see what you got?
 
Whether it is a "tip" or a fossil taxon (which is just a tip with a branch that 
terminates before now), the confidence intervals on the predicted values will 
be hugely affected by how long the branch is to that taxon (the longer the 
branch, the wider the prediction intervals).  And also by how many "close 
relatives" are attached to the node it comes from, and by how much phenotypic 
diversity exists in those "close relatives."
 
>The bottom line is answering the question: how long should the branch
>leading to that particular species be if it evolved at the same rate of its 
>sister species?
 
That's an interesting way to look at it (a sort of inverse [perverse?] 
parameterization), but it does not give you any additional information beyond 
asking whether a taxon is an "outlier" via the tests we have discussed a bit 
ago.  Or am I missing something?
 
Cheers,
Ted
 
From: pasquale.r...@libero.it [pasquale.r...@libero.it]
Sent: Friday, August 05, 2011 12:38 PM
To: j...@gs.washington.edu
Cc: dwba...@uchicago.edu; hu...@si.edu; Theodore Garland Jr; 
r-sig-phylo@r-project.org
Subject: R: Re: R: Re: [R-sig-phylo] R: Re: R: ancestral state reconstruction 
for tips


Folks,

I was intending my most recent message to be off-list and didn't realize 
"r-sig-phylo@r-project.org" was in the CC field, which means I'm a fool. All 
kidding aside, yes Joe, I estimated ancestral (and tip) values for which I have 
real data via BM assumption to see how good the fit is. Actually, estimated 
values are very close to real values for some species, barely so for some 
others, and absolutely not for others still. The good news is that since there 
is a single mode of evolution tree wise, deviations from real values really 
mean that evolution is accelerated, or decelerated, either, in these particular 
lineages for which a significant deviation from the expected value is 
noticeable. What I', trying to do now is writing a R routine to back-calculate 
the "expected" branch lengths for the "unusual" critters, given the fitted 
ancestral values and tip values of the phenotypes, and assuming BM, in order to 
compare the actual branch lengths to the expected. The ratio of these !
 lengths, if I'm not delusional and definitely lucky, is a per-lineage rate of 
phenotypic evolution. The bottom line is answering the question: how long 
should the branch leading to that particular species be if it evolved at the 
same rate of its sister species?
Pas






Messaggio originale
Da: j...@gs.washington.edu
Data: 05/08/2011 21.04
A: "pasquale.r...@libero.it"
Cc: , , , 
"r-sig-phylo@r-project.org"
Ogg: Re: R: Re: [R-sig-phylo] R: Re: R: ancestral state reconstruction for tips




Folks --


I was intending my most recent message to be apologetic --
that I was perhaps overreactive.  Certainly Pas has not
raised unreasonable objections or been obstructive with
my grants! (Others have).


Let me raise an issue so I understand him more clearly:
Pas, are you saying that you see phenotypes in the fossils
that seem incompatible with the Brownian Motion assumption?


Joe

Joe Felsenstein  j...@gs.washington.edu
 Dept of Genome Sciences and Dept of Biology, Univ. of Washington, Box 5065, 
Seattle Wa 98195-5065
___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] R: Re: R: ancestral state reconstruction for tips

2011-08-05 Thread Theodore Garland Jr
>Having said that, my guess was that we *may* use the BM and
>computations at nodes to see where (in which lineages) do
>phenotypes appear very different from predictions.
>For instance, I think it could be somehow possible to use
>estimated ancestral charactes to see how much the inclusion
>of some fossil (or new) species changes the estimated value
>(e.g. by creating a polytomy by the inclusion of the new species),
>or even back-calculate branch lengths (under BM assumption)
>for these unusual phenotypes to see how much evolution
>accelerates in these lineages (by comparison with real branch lengths).

Yes, I think that is an excellent way to proceed.

Cheers,
Ted

From: pasquale.r...@libero.it [pasquale.r...@libero.it]
Sent: Friday, August 05, 2011 12:00 PM
To: dwba...@uchicago.edu; j...@gs.washington.edu; hu...@si.edu; Theodore 
Garland Jr
Cc: r-sig-phylo@r-project.org
Subject: R: Re: [R-sig-phylo] R: Re: R: ancestral state reconstruction for tips

Hi All,

I'm happy I have stimulated some discussion about this subject matter. For
some reason I can't imagine it looks this whole thing is going to be somehow
personal and I have not posted this last e-mail to the list as a consequence.
Joe, unfotunately I never attended a lecture of yours, and didn't raise trivial
distinctions and objections to a grant proposal you submitted. My intention was
not to be critical about BM or ICs, or whatever. I just wanted to point it out
that things are sometimes a bit too complex and some unreliable predictions
from our models may slip out unnoticed evey now and then, as I believe it is
apparent reading the literature (including my own, of course). Having said
that, my guess was that we *may* use the BM and computations at nodes to see
where (in which lineages) do phenotypes appear very different from predictions.
For instance, I think it could be somehow possible to use estimated ancestral
charactes to see how much the inclusion of some fossil (or new) species changes
the estimated value (e.g. by creating a polytomy by the inclusion of the new
species), or even back-calculate branch lenghts (under BM assumption) for these
unusual phenotypes to see how much evolution accelerates in these lineages (by
comparison with real branch lengths).
I hope I spoke my mind more clearly at this time.
Pas





>Messaggio originale
>Da: dwba...@uchicago.edu
>Data: 05/08/2011 20.23
>A: "Joe Felsenstein"
>Cc: "r-sig-phylo@r-project.org"
>Ogg: Re: [R-sig-phylo] R: Re: R: ancestral state reconstruction for tips
>
>As the diversity of explicit models of trait evolution grow, it will
>be interesting to see if any consensus develops about which models
>hold most often in general and whether any insight is gained into
>which conditions predict appearance of different models.
>
>I think Joe is right that realizing a model is an inaccurate or
>imprecise description of reality should impel us to develop better
>models of the world around us, because this partly how science moves
>forward. However, I don't think pointing out that a model is deficient
>requires that that person must themselves develop an alternative.
>After all, an alternative model that capture a more realistic level of
>complexity may not be possible in some situations (it is certainly
>possible in trait evolution models, however.) Requiring such a thing
>would put too much pressure on scientific whistle-blowers, who play a
>very important role in reminding the rest of us that the world is more
>than the models we use to understand it and make our predictions.
>
>-Dave
>
>
>
>
>On Fri, Aug 5, 2011 at 10:51 AM, Joe Felsenstein 
wrote:
>>
>> Pasquale Raia said:
>>
>>> Of course Ted is right, but my problem with this computation, or
>>> with the
>>> simple exercise I was proposing is well another: as a
>>> paleontologist I often
>>> come across pretty exceptional phenotypes (dwarf hippos and
>>> elephants, huge
>>> flightless birds, to make a few examples). When you use methods
>>> like this (I
>>> mean Garland and Ives') and compare the output with those
>>> phenotypes, as I did,
>>> you immediately realize what the the bottom line is: no matter if
>>> they are
>>> nodes or tips, by using the expected (under BM) covariance the
>>> estimated
>>> phenotypes are dull, perfectly reasonable but very different from
>>> anything
>>> exceptional you may find yourself to work with. This is why I feel
>>> it is
>>> difficult to rely on those (unobserved) values to begin with.
>>
>> I think that what is being said is that Brownian Motion is too sedate
>> a process
>> and does not predict some of the large 

Re: [R-sig-phylo] R: ancestral state reconstruction for tips

2011-08-05 Thread Theodore Garland Jr
Hi Pas,

I have not followed all of the background on this, so am not sure exactly what 
you want to do.  The relevant methods that were developed in Garland and Ives 
(2000, e.g., Figs. 2 and 3), and also shown earlier in a slightly different 
formulation here (see Fig. 4):

Garland, T., Jr., and S. C. Adolph. 1994. Why not to do two-species comparative 
studies: limitations on inferring adaptation. Physiological Zoology 67:797-828.

were intended mainly for testing hypotheses about whether a single species (of 
a priori interest) deviates significantly from, say, an allometric 
relationship.  For that purpose, I think the use of these methods and assuming 
Brownian-motion like character evolution makes sense.  The nice thing about 
these procedures from a paleontological perspective is that you can, if 
appropriate, "hang" the species of interest anywhere on the tree, including 
coming off of internal nodes by (very) short branch lengths.

If there is something different that you are trying to do, then I'd be happy to 
discuss it further.  Maybe offline with pictures?

Cheers,
Ted


From: pasquale.r...@libero.it [pasquale.r...@libero.it]
Sent: Friday, August 05, 2011 9:41 AM
To: Theodore Garland Jr; Hunt, Gene; r-sig-phylo@r-project.org
Subject: R: Re: [R-sig-phylo] R:  ancestral state reconstruction for tips

Of course Ted is right, but my problem with this computation, or with the
simple exercise I was proposing is well another: as a paleontologist I often
come across pretty exceptional phenotypes (dwarf hippos and elephants, huge
flightless birds, to make a few examples). When you use methods like this (I
mean Garland and Ives') and compare the output with those phenotypes, as I did,
you immediately realize what the the bottom line is: no matter if they are
nodes or tips, by using the expected (under BM) covariance the estimated
phenotypes are dull, perfectly reasonable but very different from anything
exceptional you may find yourself to work with. This is why I feel it is
difficult to rely on those (unobserved) values to begin with.
Any opinion?
Pas



>Messaggio originale
>Da: theodore.garl...@ucr.edu
>Data: 05/08/2011 18.24
>A: "Hunt, Gene", "r-sig-phylo@r-project.org"
>Ogg: Re: [R-sig-phylo] R:  ancestral state reconstruction for tips
>
>The methods in the Garland and Ives (2000) paper are in our package of DOS
PDAP programs, and should also be functional in the PDAP module of Mesquite.
>
>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:  tgarl...@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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org]
on behalf of Hunt, Gene [hu...@si.edu]
>Sent: Friday, August 05, 2011 8:35 AM
>To: r-sig-phylo@r-project.org
>Subject: Re: [R-sig-phylo] R:  ancestral state reconstruction for tips
>
>Also, the issue of predicting values for unknown tips using data from other
species in the tree is considered in this reference:
>
>Garland, T., and A. R. Ives. 2000. Using the past to predict the present:
confidence intervals for regression equations in phylogenetic comparative
methods. American Naturalist 155(3):346-364.
>
>Best,
>Gene
>
>
>
>On 8/5/11 11:31 AM, "pasquale.r...@libero.it" 
wrote:
>
>
>
>
>Hi Morgan,
>
>this is just stuff for thought, and remember, this is wrong anyway. But you
>may try something like this:
>
>1. compute pics,
>2. take the pic value at the ancestral node subtending to your unknown tip,
>3. pretend one of the two tips the pic was originally computed on is in fact
>your unknown species,
>4. modify the square of the summed branch lengths of the two species by using
>the "new" bl,
>5. use the formula for pics (standardized) to derive your unknown tip value
by
>using the other (real) species tip value and the new square of summed branch
>lengthts
>
>
>but again, remember this is wrong, because contrasts were computed without
>your unknown species. With ace everything turns out to be much more
complicated
>because ancestral value estimations are 'optimized' by taking the entire tree
>and distribution of values at once, so to speak.
>
>
>
>
>
>>Messaggio or

Re: [R-sig-phylo] R: ancestral state reconstruction for tips

2011-08-05 Thread Theodore Garland Jr
The methods in the Garland and Ives (2000) paper are in our package of DOS PDAP 
programs, and should also be functional in the PDAP module of Mesquite.

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:  tgarl...@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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Hunt, Gene [hu...@si.edu]
Sent: Friday, August 05, 2011 8:35 AM
To: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] R:  ancestral state reconstruction for tips

Also, the issue of predicting values for unknown tips using data from other 
species in the tree is considered in this reference:

Garland, T., and A. R. Ives. 2000. Using the past to predict the present: 
confidence intervals for regression equations in phylogenetic comparative 
methods. American Naturalist 155(3):346-364.

Best,
Gene



On 8/5/11 11:31 AM, "pasquale.r...@libero.it"  wrote:




Hi Morgan,

this is just stuff for thought, and remember, this is wrong anyway. But you
may try something like this:

1. compute pics,
2. take the pic value at the ancestral node subtending to your unknown tip,
3. pretend one of the two tips the pic was originally computed on is in fact
your unknown species,
4. modify the square of the summed branch lengths of the two species by using
the "new" bl,
5. use the formula for pics (standardized) to derive your unknown tip value by
using the other (real) species tip value and the new square of summed branch
lengthts


but again, remember this is wrong, because contrasts were computed without
your unknown species. With ace everything turns out to be much more complicated
because ancestral value estimations are 'optimized' by taking the entire tree
and distribution of values at once, so to speak.





>Messaggio originale
>Da: morgan.g.i.langi...@gmail.com
>Data: 05/08/2011 14.15
>A: 
>Ogg: [R-sig-phylo] ancestral state reconstruction for tips
>
>I was wondering if there is a way to get ancestral state
>reconstructions not for nodes within the tree but for tips that I
>don't know the trait of.  I could do this somewhat manually, by taking
>the ancestral state resconstruction from the parent and child nodes
>surrounding where my unknown tip branches off from the tree and
>averaging those results (weighted by the branch length). This approach
>seems kind of clunky, so I was hoping there was something better.
>
>
>
>Morgan Langille
>
>___
>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



--
Gene Hunt
Curator, Department of Paleobiology
National Museum of Natural History
Smithsonian Institution [NHB, MRC 121]
P.O. Box 37012
Washington DC 20013-7012
Phone: 202-633-1331  Fax: 202-786-2832
http://paleobiology.si.edu/staff/individuals/hunt.cfm

___
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


Re: [R-sig-phylo] pic() vs gls()

2011-07-14 Thread Theodore Garland Jr
The independent contrasts algebra for what Joe is talking about can be found in 
these papers:

Garland, T., Jr., P. E. Midford, and A. R. Ives. 1999. An introduction to 
phylogenetically based statistical methods, with a new method for confidence 
intervals on ancestral values. American Zoologist 39:374-388.

Garland, T., Jr., and A. R. Ives. 2000. Using the past to predict the present: 
Confidence intervals for regression equations in phylogenetic comparative 
methods. American Naturalist 155:346-364.

Cheers,
Ted

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Joe Felsenstein [j...@gs.washington.edu]
Sent: Thursday, July 14, 2011 6:35 AM
To: ppi...@uniroma3.it
Cc: r-sig-phylo
Subject: Re: [R-sig-phylo] pic() vs gls()

Paolo Piras wrote --

> Citing
> http://www.r-phylo.org/wiki/HowTo/Ancestral_State_Reconstruction:
> Using Felsenstein's (1985) phylogenetic independent
> contrasts (pic); This is also a Brownian-motion based
> estimator, but it only takes descendants of each node
> into account in reconstructing the state at that node.
> More basal nodes are ignored.
>
> I  THINK that, on the opposite, more basal nodes are
> NOT ignored in gls and for this reason results can
> differ slightly
> I'm wrong?

The contrast algorithm if continued to the root,
makes the correct ancestral reconstruction for the root.
You are correct that values for higher nodes in the
tree are not the correct ML reconstruction for those
nodes.  If the tree is rerooted at any interior node
and the algorithm used for that, then that node's
reconstruction will be correct.  There are ways of
re-using information so that the total effort of doing this
for all interior nodes will be no worse than about twice
that of a single pass through the tree.

However people may prefer to use PGLS, which if
properly done should give the proper estimates for
all nodes.  There is some discussion of this in
Rohlf's 2001 paper in Evolution.

Joe

Joe Felsenstein, j...@gs.washington.edu
  Dept. of Genome Sciences, Univ. of Washington
  Box 355065, Seattle, WA 98195-5065 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


Re: [R-sig-phylo] ancestral state reconstruction with fixed internal node(s)

2011-06-30 Thread Theodore Garland Jr
Hi Graham,

I, too, have done this under Brownian motion and "squared-change parsimony" 
reconstructions.
In my experience (which was a while ago, and memory fades ...), the confidence 
intervals for nodes near to the one you constrain ("near" in terms of the 
length of the branches connecting the nodes) should be reduced, and sometimes 
substantially, if the constrained node is close by.  Right? 

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
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Graham Slater [gsla...@ucla.edu]
Sent: Thursday, June 30, 2011 10:09 AM
To: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] ancestral state reconstruction with fixed internal 
node(s)

Hi AnneMarie,

The way Paolo suggests would be the best/right way to do this. We're
working on some methods for incorporating fossil info in comparative
methods and I have some code that will do this that i can send you
off-list if you would like. I should add that, at least based on what
we've found so far, doing this probably won't make much difference to
your reconstructed ancestral states, simply because under BM, your CIs
are so wide without constraining nodes that doing so has little effect.

best,

Graham

On 06/30/2011 09:40 AM, ppi...@uniroma3.it wrote:
> Hi AnneMarie,
> I dont really know if this makes sense; in fact
> ancestral state reconstruction is an ** a posteriori
> estimation ** of nodal values starting from tips
> observations.
>
> A trick could be to add a false taxon lnked to that
> node  and giving to it a 0 branch length (i.e.
> plitomized - you can then resolve this during
> computation using multi2di() ) and assigning your
> desired trait value.
>
> I'm not sure if this helps
>
> Best
> Paolo
>
>
>
>
>
>
> Dear phylo-sig list people,
>
> I want to do ancestral state reconstruction
> (preferably with ace) with
> one (or more) of the internal nodes 'fixed' for a
> range / a distribution
> of values. For instance, I want a node leading to one
> particular clade
> that is present a subset of my trees to have a value
> from 0.2-0.5, and
> then do the ancestral state reconstruction with this
> restriction on that
> node.
>
> I have been searching the archives and the net for
> discussion of this
> (but maybe with the wrong search terms), and I cannot
> find anything
> about it - not how to do it in R or in any other
> package.
>
> Thanks for your input!
> Annemarie
>
> --
> Annemarie Verkerk, MA
> Evolutionary Processes in Language and Culture (PhD
> student)
> Max Planck Institute for Psycholinguistics
> P.O. Box 310, 6500AH Nijmegen, The Netherlands
> +31 (0)24 3521 185
> http://www.mpi.nl/research/research-projects/evolutionary-processes
>
> ___
> 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

___
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


Re: [R-sig-phylo] small sample size and detecting phylogenetic signal with Blombergs K statistic

2011-06-30 Thread Theodore Garland Jr
Dear Charlotte,

No, you do not want to do this.
As shown in Blomberg et al. (2003), the tests for statistical significance do 
not work well when you have fewer than about 20 species.
The estimate of the K statistic (indicating the amoung of phylogentic signal) 
is fine for small sample sizes, but the test of its statistical significance is 
not.  You can compare your value of K against the many other values reported in 
our paper to see if it is "typical" for that type of trait.

Note that K can range from close to zero to somewhat grater than one for real 
data.  See the values in Blomberg et al. (2003).  Typical values are in the 
range of about 0.4 to 0.8, and those values are tyupically significantly 
greater than zero when you have decent sample size (greater than 20 or so).  A 
value a bit below one does NOT mean no phylogenetic signal. 

In general, it is better to use statistical models that simultaneously 
estiumate the strength of phylogenetic signal and the other parameters (e.g., 
partial regression slopes).  However, unfortunately, this also does not work 
well with small samples sizes.

So, I suggest you do both conventional statistical analyses and 
phylogenetically independent contrasts (which is equivalent to PGLS models 
without any sort of branch length transform).  Hopefully, results will be 
similar.  If not, then you probably cannot conclude much from your data.

Sincerely,
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
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-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of charlotte De Busschere [charlotte.debussch...@ugent.be]
Sent: Thursday, June 30, 2011 8:45 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] small sample size and detecting phylogenetic signal  
with Blombergs K statistic

Dear all,

I'm currently describing phenotypic divergence patterns of several traits
within a radiated genus (5 species). Several comparative studies suggest to
take into account the phylogenetic relationships among the species by means of
PIC or PLGS etc. for which I agree
But before applying these methods I guess I should first detect whether there
is Phylogenetic signal (PS)in the data and if not then I suppose I can use
classic statistical methods
(correct me if my reasoning is wrong)

Hence I calculated Blombergs K statistics with Picante and almost all traits
have K values<1 i.e. no PS (but no p values < 0.05)
hence my question concerns about the accuracy of this statistic in a small
data set (N=5)

Blomberg et. al. 2003 (Evolution) mentioned that it is practically impossible
to get a statistical significant result if N<7

Hence, can I put confidence in this statistic?

Sincerely greetings,

Charlotte

Drs. Charlotte De Busschere
Ghent University
Biology Department
Terrestrial Ecology Unit
Ledeganckstraat 35
B-9000 Gent
Belgium

tel:++32 (0)92645039
http://www.ecology.ugent.be/terec/personal.php?pers=cd

___
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