Re: [R-sig-phylo] PGLS transformations

2015-04-14 Thread Liam J. Revell

Hi Sergio.

Yesterday you asked if it would be reasonable to use the tree with 
branch lengths simulated assuming a Yule process if the topology is 
known in phylogenetic regression. I wondered what would happen if, for a 
given tree topology, we simulated a set of trees with branches as if the 
tree arose under a Yule process, and then fit our regression model to 
each tree. We could then add the variance among fitted regression slopes 
to the mean variance of each slope to get the total variance, from which 
we could test a hypothesis that (for instance) the slope is not 
different from zero.


Well, I tried this (details here: 
http://blog.phytools.org/2015/04/phylogenetic-regression-when-branch.html), 
and, assuming I have done so correctly, it seems as though the approach 
is too conservative - leading to low power and a type I error rate lower 
than the nominal level. Using arbitrary branch lengths (all branch 
lengths equal to 1.0, Grafen's branch lengths) results in elevated type 
I error, but not incredibly badly inflated type I error.


I thought you  other R-sig-phylo readers might be interested in this 
result (newly obtained), or could correct it if I have done something wrong.


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/13/2015 2:20 PM, Liam J. Revell wrote:

I wouldn't go as far as to call it a suggestion - but this is one thing
that you could do.

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/13/2015 2:04 PM, Sergio Ferreira Cardoso wrote:

Hello,

So what you're suggesting is that I do that and then
fit-gls(X~Y,corr=corBrownian(1,t.pb),data=df,method=ML, right?

Thanks.

Best regards,
Sérgio.
ᐧ

2015-04-13 18:42 GMT+01:00 Liam J. Revell liam.rev...@umb.edu
mailto:liam.rev...@umb.edu:

Hi all.

I just wanted to add that it should be straightforward to sample
edge lengths as if they arose under a specific process. For
instance, here on my blog I show how to sample branching times 
edge lengths as if they arose under a pure-birth (i.e., 'Yule')
process, given a particular input topology:

http://blog.phytools.org/2015/__04/sampling-edge-lengths-__under-yule-process.html


http://blog.phytools.org/2015/04/sampling-edge-lengths-under-yule-process.html.

For things like the phylogenetic (contrasts) regression, this may be
preferable to Grafen's edge lengths, which tend to make recent edge
lengths very short, giving very high weight to the associated
contrasts.

All the best, Liam

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


On 4/13/2015 1:13 PM, Sergio Ferreira Cardoso wrote:

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
emmanuel.para...@ird.fr mailto:emmanuel.para...@ird.fr:

Hi Sérgio,

There is indeed generally a 

Re: [R-sig-phylo] PGLS transformations

2015-04-14 Thread Sergio Ferreira Cardoso
Thank you Liam. I'll check it now.

Best regards,
Sérgio.

2015-04-14 18:27 GMT+01:00 Liam J. Revell liam.rev...@umb.edu:

 Hi Sergio.

 Yesterday you asked if it would be reasonable to use the tree with branch
 lengths simulated assuming a Yule process if the topology is known in
 phylogenetic regression. I wondered what would happen if, for a given tree
 topology, we simulated a set of trees with branches as if the tree arose
 under a Yule process, and then fit our regression model to each tree. We
 could then add the variance among fitted regression slopes to the mean
 variance of each slope to get the total variance, from which we could test
 a hypothesis that (for instance) the slope is not different from zero.

 Well, I tried this (details here: http://blog.phytools.org/2015/
 04/phylogenetic-regression-when-branch.html), and, assuming I have done
 so correctly, it seems as though the approach is too conservative - leading
 to low power and a type I error rate lower than the nominal level. Using
 arbitrary branch lengths (all branch lengths equal to 1.0, Grafen's branch
 lengths) results in elevated type I error, but not incredibly badly
 inflated type I error.

 I thought you  other R-sig-phylo readers might be interested in this
 result (newly obtained), or could correct it if I have done something wrong.

 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/13/2015 2:20 PM, Liam J. Revell wrote:

 I wouldn't go as far as to call it a suggestion - but this is one thing
 that you could do.

 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/13/2015 2:04 PM, Sergio Ferreira Cardoso wrote:

 Hello,

 So what you're suggesting is that I do that and then
 fit-gls(X~Y,corr=corBrownian(1,t.pb),data=df,method=ML, right?

 Thanks.

 Best regards,
 Sérgio.
 ᐧ

 2015-04-13 18:42 GMT+01:00 Liam J. Revell liam.rev...@umb.edu
 mailto:liam.rev...@umb.edu:

 Hi all.

 I just wanted to add that it should be straightforward to sample
 edge lengths as if they arose under a specific process. For
 instance, here on my blog I show how to sample branching times 
 edge lengths as if they arose under a pure-birth (i.e., 'Yule')
 process, given a particular input topology:

 http://blog.phytools.org/2015/__04/sampling-edge-lengths-__
 under-yule-process.html


 http://blog.phytools.org/2015/04/sampling-edge-lengths-
 under-yule-process.html.

 For things like the phylogenetic (contrasts) regression, this may be
 preferable to Grafen's edge lengths, which tend to make recent edge
 lengths very short, giving very high weight to the associated
 contrasts.

 All the best, Liam

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


 On 4/13/2015 1:13 PM, Sergio Ferreira Cardoso wrote:

 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,
 

Re: [R-sig-phylo] PGLS transformations

2015-04-14 Thread Sergio Ferreira Cardoso
Than you all.


Best regards,
Sérgio.
ᐧ

2015-04-13 22:02 GMT+01:00 Emmanuel Paradis emmanuel.para...@ird.fr:

 Le 13/04/2015 19:13, Sergio Ferreira Cardoso a écrit :

 Hello,

 Thank you both for the help.
 Emmanuel, so is there a way to see contrasts in R?


 Yes! The function pic() has been in ape since its first release (ver. 0.1
 in Aug 2002), and there is an option to output the contrasts scaled or not.

 best,

 Emmanuel

  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 emmanuel.para...@ird.fr
 mailto:emmanuel.para...@ird.fr:

 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





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

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 emmanuel.para...@ird.fr:

 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-13 Thread Sergio Ferreira Cardoso
Hello,

So what you're suggesting is that I do that and then
fit-gls(X~Y,corr=corBrownian(1,t.pb),data=df,method=ML, right?

Thanks.

Best regards,
Sérgio.
ᐧ

2015-04-13 18:42 GMT+01:00 Liam J. Revell liam.rev...@umb.edu:

 Hi all.

 I just wanted to add that it should be straightforward to sample edge
 lengths as if they arose under a specific process. For instance, here on my
 blog I show how to sample branching times  edge lengths as if they arose
 under a pure-birth (i.e., 'Yule') process, given a particular input
 topology: http://blog.phytools.org/2015/04/sampling-edge-lengths-
 under-yule-process.html. For things like the phylogenetic (contrasts)
 regression, this may be preferable to Grafen's edge lengths, which tend to
 make recent edge lengths very short, giving very high weight to the
 associated contrasts.

 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/13/2015 1:13 PM, Sergio Ferreira Cardoso wrote:

 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 emmanuel.para...@ird.fr:

  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/

Re: [R-sig-phylo] PGLS transformations

2015-04-13 Thread Liam J. Revell

Hi all.

I just wanted to add that it should be straightforward to sample edge 
lengths as if they arose under a specific process. For instance, here on 
my blog I show how to sample branching times  edge lengths as if they 
arose under a pure-birth (i.e., 'Yule') process, given a particular 
input topology: 
http://blog.phytools.org/2015/04/sampling-edge-lengths-under-yule-process.html. 
For things like the phylogenetic (contrasts) regression, this may be 
preferable to Grafen's edge lengths, which tend to make recent edge 
lengths very short, giving very high weight to the associated contrasts.


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/13/2015 1:13 PM, Sergio Ferreira Cardoso wrote:

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 emmanuel.para...@ird.fr:


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.









___
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 Emmanuel Paradis

Le 13/04/2015 19:13, Sergio Ferreira Cardoso a écrit :

Hello,

Thank you both for the help.
Emmanuel, so is there a way to see contrasts in R?


Yes! The function pic() has been in ape since its first release (ver. 
0.1 in Aug 2002), and there is an option to output the contrasts scaled 
or not.


best,

Emmanuel


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 emmanuel.para...@ird.fr
mailto:emmanuel.para...@ird.fr:

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


___
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 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.



___
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=enuser=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/


[R-sig-phylo] PGLS transformations

2015-04-12 Thread Sergio Ferreira Cardoso
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/