Re: [R-sig-phylo] Sampling bias in discrete trait estimation

2013-11-11 Thread Matt Pennell
Hi Luiz, Yes, non-random sampling of traits, if not taken into account will certainly bias the estimation of the transition parameters. Methods for addressing this have been developed by Rich FitzJohn and colleagues http://sysbio.oxfordjournals.org/content/58/6/595.short (this was discussed in

Re: [R-sig-phylo] Sampling bias in discrete trait estimation

2013-11-11 Thread Luiz Max Carvalho
This definitely looks like something. Thanks, Matt! Cheers, Luiz 2013/11/11 Matt Pennell mwpenn...@gmail.com Hi Luiz, Yes, non-random sampling of traits, if not taken into account will certainly bias the estimation of the transition parameters. Methods for addressing this have been

[R-sig-phylo] PGLS from taxonomy and computational time

2013-11-11 Thread Matthew Leo Knope
Dear all, I am attempting to run a PGLS in R (please see code below) where I am accounting for phylogenetic affinity (via taxonomy) to the class level and then testing for the potential relationship between 3 basic ecological axes (habitat tiering, motility level, and feeding mode) on body

Re: [R-sig-phylo] PGLS from taxonomy and computational time

2013-11-11 Thread Dan Rabosky
Hi Matthew- Rob Freckleton had a short paper last year demonstrating the calculations for PGLS (using Felsenstein's 1973 algorithm) without the need for numerically challenging (perhaps impossible in this case) matrix inversion for a dataset of this size.

[R-sig-phylo] match two tree edges

2013-11-11 Thread Jingchun Li
Dear all, I am trying to make a tree figure and I can not figure out the right way to do it. I have two trees, A and B. They have the same set of taxa but are in different orders. A is in the default order when read by read.tree(). B is ladderized. For my purpose, I want to plot A and label

Re: [R-sig-phylo] match two tree edges

2013-11-11 Thread Liam J. Revell
Hi Jingchun. The function ladderize in ape does not change the node numbers of the tree in phy$edge, only the order of the edges in the matrix. To verify this, you can use the phytools function matchNodes which matches nodes between two trees. Note that if a tree that is ladderized using

Re: [R-sig-phylo] match two tree edges

2013-11-11 Thread Jingchun Li
Thanks Liam. Unfortunately for now, the second tree is read in separately because it is generated from a different software. So the nodes numbers do not match. But I get the general idea. I'll have to think more about it. Cheers, Jingchun On Mon, Nov 11, 2013 at 6:02 PM, Liam J. Revell

Re: [R-sig-phylo] match two tree edges

2013-11-11 Thread Liam J. Revell
If the trees are indeed identical, you can just go through the matrix matching nodes in the two trees (matrix M, here) and find out the order of the edges in B with respect to A. Try this: library(phytools) # uses phytools n-length(A$tip.label) ## matrix matching tip internal nodes

Re: [R-sig-phylo] PGLS from taxonomy and computational time

2013-11-11 Thread Lam Ho
Hi Matthew, You could try phylolm() in my R package phylolm which uses a linear time algorithm: http://cran.r-project.org/web/packages/phylolm/index.html Another option is the function fitContinuous() in geiger package: http://cran.r-project.org/web/packages/geiger/index.html Lam. On Mon, Nov

Re: [R-sig-phylo] match two tree edges

2013-11-11 Thread Emmanuel Paradis
Hi, Have a look at the function makeNodeLabel with the option method = md5sum: it will create a label to each node depending on the tips descending from it. You can then use them to match nodes and edges of different trees. Best, Emmanuel -Original Message- From: Jingchun Li