Re: [R-sig-phylo] Alllowing and considering "missing data" as values for reconstruction of ancestral character states

2020-02-26 Thread Liam J. Revell
.summary,ftype="off",lwd=1,cex=c(0.7,0.4)) map.summary$ace ## probabilities at nodes All the best, Liam Liam J. Revell Associate Professor, University of Massachusetts Boston Profesor Asistente, Universidad Católica de la Ssma Concepción web: http://faculty.umb.edu/liam.revell/, http:/

Re: [R-sig-phylo] Alllowing and considering "missing data" as values for reconstruction of ancestral character states

2020-02-21 Thread Liam J. Revell
changes, but ancestral states are the same.) I hope this is helpful. All the best, Liam Liam J. Revell Associate Professor, University of Massachusetts Boston Profesor Asistente, Universidad Católica de la Ssma Concepción web: http://faculty.umb.edu/liam.revell/, http://www.phytools.org Academic Direct

Re: [R-sig-phylo] size-free morphometrics in phylogenetic framework

2009-04-06 Thread Liam J. Revell
will be increased for more realistic birth-death trees (in which there are more shorter branches towards to tips of the tree). Thanks! - Liam Liam J. Revell Department of Organismic and Evolutionary Biology Harvard University web: http://anolis.oeb.harvard.edu/~liam/ email: lrev...@fas.harvard.edu

Re: [R-sig-phylo] Trait simulations

2009-05-19 Thread Liam J. Revell
Liam J. Revell Department of Organismic and Evolutionary Biology Harvard University web: http://anolis.oeb.harvard.edu/~liam/ email: lrev...@fas.harvard.edu On Mon, 18 May 2009, jeremy.beaul...@yale.edu wrote: Hi all~ I was just wondering if there is a package or function in R that can simulate

Re: [R-sig-phylo] Standardising independent contrasts

2009-09-15 Thread Liam J. Revell
the direction of subtraction is arbitrary..., so only standard deviations are needed. - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org On Tue, 15 Sep 2009, Manabu Sakamoto wrote: Dear list, I am trying to standardise

Re: [R-sig-phylo] Standardising independent contrasts

2009-09-16 Thread Liam J. Revell
,scaled=FALSE,var.contrasts=TRUE) cont.x-cont.X[,1]/sqrt(cont.X[,2]) you will get the same vector of contrasts as you would obtain with: cont.x-pic(x,tree) - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org Manabu Sakamoto

Re: [R-sig-phylo] Standardising independent contrasts

2009-09-16 Thread Liam J. Revell
, however, diagnostic tests on contrasts usually use absolute values (or squares) of contrasts. In general, these should not be used in statistical analyses such as correlation (although positivized contrasts may be used with no ill effect). - Liam Liam J. Revell NESCent, Duke University web

Re: [R-sig-phylo] inverting C matrices from Yule trees

2009-11-04 Thread Liam J. Revell
(birthdeath.tree(1,0, taxa.stop=11),11))); This seems to work. - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org Santiago Claramunt wrote: Hi all, I'm having problems computing the inverse of the expected variance-covariance

Re: [R-sig-phylo] correlation between discrete and continuous variables?

2009-12-01 Thread Liam J. Revell
regression for binary dependent variables. Systematic Biology (Advance Access). URL: http://sysbio.oxfordjournals.org/cgi/content/abstract/syp074v1. Others on this list-serve might also be well suited to comment on this paper method. Sincerely, Liam Liam J. Revell NESCent, Duke University web

Re: [R-sig-phylo] Estimate correlation coefficient of a linear GLS model

2010-01-04 Thread Liam J. Revell
Thanks. That is very helpful information, actually! - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu NEW email: lrev...@nescent.org -Original Message- From: Emmanuel Paradis emmanuel.para...@mpl.ird.fr Sent: Monday, January 04, 2010 7:51 AM To: Liam J

Re: [R-sig-phylo] Transforming a data.frame into a phylogenetic tree

2010-01-27 Thread Liam J. Revell
(edge=edge,tip.label=tip.label,edge.length=edge.length,Nnode=Nnode); class(obj) - phylo; obj-collapse.singles(obj); obj; } I hope this works! - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org Timothee POISOT wrote

Re: [R-sig-phylo] transition matrix in geiger (sim.char)

2010-02-03 Thread Liam J. Revell
convenient form, from which: results-as.matrix(results[,,1]); puts all the results from all 10 simulations into one numspecies x 10 matrix. Good luck! - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org Alexandre Antonelli wrote

Re: [R-sig-phylo] selecting terminal branch lengths?

2010-02-08 Thread Liam J. Revell
)]; # 3. label terminal branches by tip label names(terminal.edges)-tree$tip.label; I think that should work. - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org mgavil2 wrote: Dear All I am trying to find a way to get a vector

Re: [R-sig-phylo] estimate likelihood of data for given model and parameters

2010-03-19 Thread Liam J. Revell
a-solve(t(ones)%*%solve(sig2*C)%*%ones)%*%t(ones)%*%solve(sig2*C)%*%x; # estimate ancestor logL--(1/2)*(t(x-ones%*%a)%*%solve(sig2*C)%*%(x-ones%*%a))-(n/2)*log(2*pi)-(1/2)*log(det(sig2g*C)); # compute the log-likelihood Hope this is helpful! - Liam Liam J. Revell NESCent, Duke University web

Re: [R-sig-phylo] Phylogenetic ANOVA

2010-07-26 Thread Liam J. Revell
then that obtained for every last one of your simulated datasets, then the P-value will be entirely determined by the number of simulations that are used (as Luke says). This seems to be case for your data (not surprising given the very large values for F that were obtained). - Liam Liam J

Re: [R-sig-phylo] Question regarding simulate character option in geiger

2010-08-04 Thread Liam J. Revell
) # for instance There are also several other related transformations, such as lambdaTree() and deltaTree. These can be reviewed by querying: ?ouTree Hope this is of some help. Sincerely, Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev

Re: [R-sig-phylo] retrieving simulated ancestral states from sim.char{geiger}

2010-08-04 Thread Liam J. Revell
: # conducts BM simulation by ascending through the tree from the root node to the tips # by Liam J. Revell sim.bm-function(tree,bm.rate,root.state){ # generate random normal deviates dev-rnorm(n=length(tree$edge.length)) # give them appropriate variances dev-dev*sqrt(bm.rate*tree

Re: [R-sig-phylo] Plotting trees - 'main' does not seem to work

2010-12-29 Thread Liam J. Revell
, but in case not - I thought I would pass it along. - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ email: lrev...@nescent.org, (new) liam.rev...@umb.edu (new) blog: http://phytools.blogspot.com On 12/29/2010 12:42 PM, Steve L wrote: I've tried plotting

Re: [R-sig-phylo] Cant read PHYLIP tree

2011-01-21 Thread Liam J. Revell
. p.s - the tree is attached. Chris ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo -- Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev

Re: [R-sig-phylo] R: Re: R: Re: Simulation of Continuous Trait with Active Trend

2011-02-17 Thread Liam J. Revell
it out. - Liam -- Liam J. Revell University of Massachusetts Boston web: http://www.bio.umb.edu/facstaff/faculty_Revell.html (new) email: liam.rev...@umb.edu (new) blog: http://phytools.blogspot.com On 2/17/2011 12:22 PM, pasquale.r...@libero.it wrote: Hi all, to feed Dave's questions; I have

Re: [R-sig-phylo] R: Re: R: Re: Simulation of Continuous Trait with Active Trend

2011-02-21 Thread Liam J. Revell
://anolis.oeb.harvard.edu/~liam/R-phylogenetics/anc.trend/v0.1/anc.trend.R): # written by Liam J. Revell 2011 anc.trend-function(phy,x,maxit=2000){ # preliminaries # require dependencies require(ape) # set global tol-1e-8 # compute C D-dist.nodes(phy

Re: [R-sig-phylo] PGLS, polytomies, degrees of freedom and multiple specimens

2011-02-22 Thread Liam J. Revell
to this issue beyond what I am able to offer. - Liam -- Liam J. Revell University of Massachusetts Boston web: http://www.bio.umb.edu/facstaff/faculty_Revell.html (new) email: liam.rev...@umb.edu (new) blog: http://phytools.blogspot.com On 2/22/2011 5:31 AM, Popko Wiersma wrote: Dear all, Can

Re: [R-sig-phylo] Problems with transferring trees back into ape from Mesquite

2011-03-03 Thread Liam J. Revell
, and then use di2multi(). - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ (new) email: liam.rev...@umb.edu (new) blog: http://phytools.blogspot.com On 3/3/2011 3:12 PM, sd...@duke.edu wrote: I have had similar challenges with going back and forth

Re: [R-sig-phylo] Pruning a tree

2011-03-04 Thread Liam J. Revell
$tip.label[-match(species.to.keep[,1], tree$tip.label)]) - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ (new) email: liam.rev...@umb.edu (new) blog: http://phytools.blogspot.com On 3/4/2011 6:52 AM, Eugen Egorov wrote: First of all, thank you

Re: [R-sig-phylo] Pruning a tree

2011-03-04 Thread Liam J. Revell
not anticipate this. To get around it, just do: pruned.tree-drop.tip(tree,tree$tip.label[-na.omit(match(species.to.keep[,1],tree$tip.label))]) - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ (new) email: liam.rev...@umb.edu (new) blog

Re: [R-sig-phylo] Dealing with Bounded Trait Measures

2011-03-05 Thread Liam J. Revell
just bounce back any phenotypes that exceed the lower or upper boundary conditions specified by the user (by default they are -Inf and Inf). I think I did this properly. Feedback welcome though. - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell

Re: [R-sig-phylo] The Speed of Different Methods For Obtaining the Descendant Tip Taxa per Node

2011-03-06 Thread Liam J. Revell
object. This is stored as phy$Aparam$nlea for phylog object phy. Unfortunately, it seems like newick2phylog() is very slow for large trees. - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http

Re: [R-sig-phylo] reverse order plotting of newick tree/phylo object

2011-03-17 Thread Liam J. Revell
of nodes, but I was not able to get this to work.] - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://phytools.blogspot.com On 3/17/2011 10:51 AM, Thierry Janssens - TNW wrote: Dear R-sig-phylo, I am looking

Re: [R-sig-phylo] reverse order plotting of newick tree/phylo object

2011-03-17 Thread Liam J. Revell
Dan is right on - and I also suspect that the issue of the non-rotating node is probably due to a polytomy at that node. Thanks for the insight Dan. - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http

Re: [R-sig-phylo] Branch and Bound Maximum Parsimony (Matthew Vavrek)

2011-03-28 Thread Liam J. Revell
the score for parts of the tree that don't change among a set of trees - instead of recalculating it each time anew. That I don't know. - 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

Re: [R-sig-phylo] Adding a taxon to a pre-exisiting tree

2011-04-01 Thread Liam J. Revell
)) trees[[i]]-bind.tree(tree,new.tip,where=tree$edge[i,2],position=0.5) # now plot them to see what we have done plot(trees,type=unrooted,use.edge.length=F) Of course I would be happy to see a more elegant solution! Sincerely, Liam -- Liam J. Revell University of Massachusetts Boston web: http

Re: [R-sig-phylo] Adding a taxon to a pre-exisiting tree

2011-04-01 Thread Liam J. Revell
=((George,Paul),(Ringo,John));) trees-add.everywhere(tree,Pete_Best) plot(trees,type=unrooted) -- 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 4/1/2011 11:33 PM, Liam J. Revell wrote: Hi

Re: [R-sig-phylo] Converting from DNAbin to a matrix

2011-04-07 Thread Liam J. Revell
this, but if you already have the object in memory, you can write it to file and then read it back in using read.dna(...,as.character=T), as above. - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http

[R-sig-phylo] Possible bug in bind.tree()

2011-04-19 Thread Liam J. Revell
# now bind tr1 to tr2, where it was removed tr.bound-bind.tree(tr2,tr1,where=which(tr2$tip.label==NA)) # now plot, to visualize the result plot(tree); x11(); plot(tr.bound) Thanks. - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev

Re: [R-sig-phylo] phylogenetically-informed Reduced Major Axis regression in R?

2011-04-20 Thread Liam J. Revell
would be fairly simple using equations 15 of Ives et al., I think (I will do this when I get a chance); adding the latter not so much. I believe Tony Ives may have MATLAB code that does this already. Maybe he can comment. I hope this is somewhat helpful. Sincerely, Liam -- Liam J. Revell

Re: [R-sig-phylo] Convert filogenetic tree to binary matrix

2011-04-28 Thread Liam J. Revell
Hi Vanderlei, Try this which uses ape function prop.part(): temp-prop.part(tree) X-matrix(0,nrow=length(tree$tip),ncol=length(temp),dimnames=list(tree$tip.label,tree$node.label)) for(i in 1:ncol(X)) X[temp[[i]],i]-1 - Liam -- Liam J. Revell University of Massachusetts Boston web: http

Re: [R-sig-phylo] Generating a tree based on a distance matrix?

2011-05-12 Thread Liam J. Revell
0.005683385 7,1 0.516492136 7,8 0.761613776 8,2 0.714302898 8,3 0.071461088 6,4 0.217680734 6,5 0.393926894 You can easily see that they are the same branch lengths as in our original tree. I hope this is helpful. Sincerely, Liam -- Liam J. Revell University of Massachusetts Boston web: http

Re: [R-sig-phylo] ACE - ML

2011-05-17 Thread Liam J. Revell
Sorry, I didn't see that this had already been addressed. -- 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 5/17/2011 12:39 PM, David Bapst wrote: Alanna- It's because when multi2di

Re: [R-sig-phylo] ACE - ML

2011-05-17 Thread Liam J. Revell
Hi Alanna, You can get this kind of error if your tree has tip edges with zero length. Then C-vcv.phylo(tree) will be exactly singular. Could this be true of your tree? Best, Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev

Re: [R-sig-phylo] fitContinuous in geiger

2011-05-18 Thread Liam J. Revell
not have this issue. Good luck. - 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 5/18/2011 3:50 AM, Annemarie Verkerk wrote: Hi all, I’m having some trouble with the function

Re: [R-sig-phylo] fitContinuous in geiger

2011-05-23 Thread Liam J. Revell
,x,method=lambda,test=TRUE) Best of luck. - 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 5/23/2011 2:46 PM, Carl Boettiger wrote: Hi Annemarie, No problem, tried to give some

Re: [R-sig-phylo] ancestral state reconstruction with fixed internal node(s)

2011-06-30 Thread Liam J. Revell
resolve our multifurcating tree after we attached the extra tip). Hope this helps. - 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 6/30/2011 12:40 PM, ppi...@uniroma3.it wrote

Re: [R-sig-phylo] a question about pic function(ape package)

2011-07-11 Thread Liam J. Revell
J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://phytools.blogspot.com On 7/11/2011 10:44 PM, wrote: dear all, I have a question when I used the pic funtion, it appeared an error:'phy' is not rooted and fully

Re: [R-sig-phylo] pic() vs gls()

2011-07-13 Thread Liam J. Revell
here as if smdata is a data frame, then smdata[,1] does not inherit the rownames of smdata and pic() will return an incorrect set of contrasts.) I hope this helps. No doubt other subscribers to the list may have something to add. Best, Liam -- Liam J. Revell University of Massachusetts

Re: [R-sig-phylo] follow up for lambda transform - query: how to use an existing covariance matrix directly in a gls procedure in R?

2011-07-15 Thread Liam J. Revell
(given a set value of lambda) is just: mat.lambda-lambda*(mat-diag(diag(mat)))+diag(diag(mat)) I'm not sure whether or not this is exactly what you're looking for, but I hope it helps. Best, Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] LTT plot non-ultrametric trees

2011-08-10 Thread Liam J. Revell
This is implemented in my phytools package. This is not yet on CRAN, but can be downloaded from http://anolis.oeb.harvard.edu/~liam/R-phylogenetics/. The function is ltt(). It is slow, but seems to work. Please let me know if you have success with this. - Liam -- Liam J. Revell

Re: [R-sig-phylo] LTT plot non-ultrametric trees

2011-08-11 Thread Liam J. Revell
the differences in maximum ages! Cheers, Rob On 11 August 2011 14:05, Liam J. Revell liam.rev...@umb.edu mailto:liam.rev...@umb.edu wrote: Hi Rob. I can reproduce your error, but I haven't figured out the problem yet. You can try an earlier version of this function, which seems to work

Re: [R-sig-phylo] Interpreting rate.evol.mcmc output

2011-08-12 Thread Liam J. Revell
as the mean or median; as well as HPD intervals and ESSs using, for instance, the MCMC diagnostics package coda.) I hope this is helpful. Thanks again for giving the method a try. Please don't hesitate to contact me for further clarification. Best of luck. - Liam -- Liam J. Revell

Re: [R-sig-phylo] Blomberg's K and assumptions regarding independent contrasts

2011-08-22 Thread Liam J. Revell
) on this tree (and any star tree). I hope this is helpful. Sorry for the slow reply. 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 8/12/2011 1:35 AM, Manabu

Re: [R-sig-phylo] Maximum Parsimony branch lengths

2011-09-02 Thread Liam J. Revell
() tree-acctran(tree,dna) I hope this helps. - 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 9/2/2011 8:35 AM, Velzen, Robin van wrote: Dear R-sig phylo list members, I am

Re: [R-sig-phylo] edge representation of trees produced by birthdeath.tree() in geiger

2011-09-09 Thread Liam J. Revell
labels 8 9, just as we see with: plot(tre); nodelabels() I hope this clears things up somewhat. 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 9/9/2011 7:51 AM

Re: [R-sig-phylo] post-order tree traversal

2011-09-14 Thread Liam J. Revell
if you just label the nodes as they are first encountered in the matrix this would be in the order of a post-order traversal of the tree. 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

Re: [R-sig-phylo] Simulating binomial trait shifts on a phylogeny

2011-10-11 Thread Liam J. Revell
, 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 10/11/2011 6:18 PM, Antigoni Kaliontzopoulou wrote: Hello everyone, I am studying a binomial trait across a phylogeny and I'm trying

Re: [R-sig-phylo] Simulating a phylogeny with outgroup on long branch

2011-10-13 Thread Liam J. Revell
,tr2) # plot the full tree plot(tr3) I hope this is kind of what you are going for. 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 10/13/2011 5:32 PM, Scott

Re: [R-sig-phylo] basal dichotomy in phylo object

2011-10-25 Thread Liam J. Revell
500 is tipward of 174 in the tree, to re-root the tree halfway along the edge leading to node number 500 (in tree$edge), you would just do: rooted.tree-reroot(tree,node.number=500,position=tree$edge.length[tree$edge[,2]==500]/2) I think. All the best, Liam -- Liam J. Revell University

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

2011-11-10 Thread Liam J. Revell
; or, better yet, Stone 2011, Syst. Biol. doi:10.1093/sysbio/syq098.) Regarding extinction probability, perhaps someone else on the list can address that specific example. All the best, Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] on phylosig

2011-11-12 Thread Liam J. Revell
(which could be interpreted as a test for departure from BM). This can be done by using fitContinuous(...,model=lambda) and fitContinuous(...,model=BM), and then comparing the likelihoods. I hope this is helpful. Liam Liam J. Revell University of Massachusetts Boston web: http

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

2011-11-14 Thread Liam J. Revell
regression of Ives Garland (2009), but I'm not too familiar with this method. 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 11/14/2011 3:54 PM, David Bapst wrote: Liam

Re: [R-sig-phylo] covriance matrix internal nodes

2011-11-23 Thread Liam J. Revell
,full=anc.nodes)[c(1:n,anc.nodes*(n+2:tree$Nnode)),c(1:n,anc.nodes*(n+2:tree$Nnode))] C-matrix(h[M],nrow(M),ncol(M)) if(anc.nodes) rownames(C)-colnames(C)-c(tree$tip.label,n+2:tree$Nnode) else rownames(C)-colnames(C)-tree$tip.label return(C) } All the best. - Liam -- Liam J. Revell

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

2011-12-14 Thread Liam J. Revell
: evol.vcv). 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 12/14/2011 3:26 PM, Theodore Garland Jr wrote: Why not just include an interaction term between your main

Re: [R-sig-phylo] Measures of dissimilarity between phylogenetic trees

2011-12-26 Thread Liam J. Revell
-- 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 12/26/2011 6:27 PM, Bruno de Medeiros wrote: Hi everyone, I am simulating characters evolving in a phylogetic tree under a number of models

Re: [R-sig-phylo] phyDat format problem

2012-01-09 Thread Liam J. Revell
: p2 10 sequences with 5 character and 5 different site patterns. The states are 0 1 -- 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/9/2012 9:14 AM, J Greenwood wrote: Hi all, I am

Re: [R-sig-phylo] Lambda; PIC vs. PGLS

2012-01-13 Thread Liam J. Revell
caper:pgls r2-pgls(y~x,data=comparative.data(tree,data,Species),lambda=ML) # fit using phytools:phyl.resid r3-phyl.resid(tree,x,y,method=lambda) -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://phytools.blogspot.com

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

2012-01-19 Thread Liam J. Revell
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

Re: [R-sig-phylo] Bug in geiger::fitContinuous with meserr

2012-02-02 Thread Liam J. Revell
be changed to o-match(rownames(td$data),rownames(meserr)) meserr-as.matrix(meserr[o,]) because the former inadvertently converts meserr to a vector, when a matrix is subsequently needed. - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] Reconstructing Ancestral Characters and Exporting Data

2012-02-08 Thread Liam J. Revell
-- 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 2/8/2012 1:59 PM, Amy Boddy wrote: Hello, I was wondering if somebody could help me with a problem I am having in APE. I want

Re: [R-sig-phylo] differing sigma2 results

2012-02-11 Thread Liam J. Revell
to the same rescaled data! 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 2/11/2012 10:20 AM, Pascal Title wrote: Hello all I am trying to calculate sigma2 values

Re: [R-sig-phylo] problem calculating independent contrasts

2012-02-20 Thread Liam J. Revell
] Chlorocebus pygerythrus - 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 2/20/2012 7:30 PM, Graham Slater wrote: Hi Tom, have you tried running name.check(t.100species

Re: [R-sig-phylo] convergence issues with hansen model

2012-03-13 Thread Liam J. Revell
Hi Rafael. I don't want to speak on behalf of the authors who are also on this list, but OUwie can read in modified phylo objects created by the phytools functions read.simmap make.simmap. All the best, Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] estimate ancestral states of specific internal nodes

2012-05-08 Thread Liam J. Revell
,function(a,x,sp) ace(x,a)$ace[as.character(findMRCA(a,sp))],x=x,sp=sp) Or, of course, you could just as easily use a simple for loop. Perhaps this helps? All the best, Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog

Re: [R-sig-phylo] more problems with branch names

2012-05-09 Thread Liam J. Revell
Looks like this may be because your row names in your data frame have spaces, while your tree tip labels do not. Try: rownames(example)-sub( ,,rownames(example)) example-example[tree$tip.label,] Help? - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] Non-parametric alternative to phylogenetic ANOVA?

2012-05-30 Thread Liam J. Revell
means for each factor) and standard errors. These can be used to conduct posthoc comparison of means using t-tests in the standard way. I hope this helps. All the best, Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu

Re: [R-sig-phylo] Question about Kcalc with 1 data points per species

2012-06-06 Thread Liam J. Revell
[,1] # replace NA with mean variance xvar[is.na(xvar)]-mean(xvar,na.rm=TRUE) # get the N per species n-as.vector(table(names(y))) # compute the standard errors se-sqrt(xvar/n) # compute K K-phylosig(tree,xbar,se=se) Hopefully that works for you. All the best, Liam -- Liam J. Revell University

Re: [R-sig-phylo] Error estimating RMA in phytools

2012-06-22 Thread Liam J. Revell
the analysis. You might also get this error (or one quite similar) if you tree has zero-length terminal edges or y=k*x for non-zero scalar constant k (i.e., r(x,y)==1 or -1). All the best, Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] Phylogenetic Canonical Correlations

2012-07-13 Thread Liam J. Revell
matrix # is a scalar constant - 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://phytools.blogspot.com On 7/13/2012 1:32 PM, Jonathan Mitchell wrote: Hello all, I'm trying

Re: [R-sig-phylo] Within-species error in PGLS (or similar)

2012-07-17 Thread Liam J. Revell
to compare to Ives Garland's MATLAB code I would love to hear the result as I only hope I got this right. 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

Re: [R-sig-phylo] simulate traits evolution in correlated with body mass

2012-07-24 Thread Liam J. Revell
Hi Andrew. For desired correlation r, size data x, and tree you could just do: library(phytools) y-r*x+sqrt(1-r^2)*fastBM(tree) This should give you the correlation r on average and the y|x should be Brownian. (If x is Brownian, then both y x y|x will be too.) - Liam Liam J. Revell

Re: [R-sig-phylo] simulate traits evolution in correlated with body mass

2012-07-24 Thread Liam J. Revell
Actually, modify my previous email. That only works for sig^2(x)=1.0. It should be: library(phytools) y-r*x+sqrt(1-r^2)*fastBM(tree,sig2=mean(pic(x,tree)^2)) - Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] find mrca of multiple taxa.

2012-08-15 Thread Liam J. Revell
Hi Ben. Take a look at the function findMRCA in my package, phytools. I think this does what you want. Good luck. 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 -Original

Re: [R-sig-phylo] Plot size

2012-08-28 Thread Liam J. Revell
your tree has no edge lengths plotTree(tree,fsize=0.2,ftype=i,lwd=0.4,pts=F) savePlot(test2.pdf,type=pdf) In addition, in an interactive session the tree (but not the labels) will automatically resize when you manually resize the plotting window. Is this at all helpful? All the best, Liam Liam J

Re: [R-sig-phylo] Alter the branch lengths of a Tree

2012-08-28 Thread Liam J. Revell
tree$edge.length[tree$edge.length1]-2 tree$edge.length plot(tree) 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

Re: [R-sig-phylo] tips to root brach length

2012-09-03 Thread Liam J. Revell
Hi. Try: diag(vcv.phylo(tree)) nodeHeights in phytools will also give you a matrix with all the heights of internal and terminal nodes in the same order as tree$edge. - Liam Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu

Re: [R-sig-phylo] variation in rates over time

2012-09-17 Thread Liam J. Revell
a different rate of evolution than the rest of the tree, you could do this as follows: library(phytools) # load phytools tree-make.era.map(tree,c(0,max(nodeHeights(tree))-3.4)) plotSimmap(tree,pts=F,lwd=3) # visualize fit-brownie.lite(tree,x) # fit model That's it. Good luck. Liam Liam J. Revell

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

2012-09-18 Thread Liam J. Revell
of brownie.lite in one of its functions. 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://phytools.blogspot.com On 9/18/2012 4:08 PM, Agus Camacho wrote: Dear

Re: [R-sig-phylo] phy.manova from Geiger package gives an error of different variable length with variables of equal length

2012-09-25 Thread Liam J. Revell
Hi Agus. I think the problem is that c() concatenates your data for the continuous dependent variables in your model into one long vector. Try instead: table-as.matrix(table) Y-cbind(table[,2],table[,3]) x-as.factor(table[,1]) phy.manova(tree,Y,x) Good luck. - Liam Liam J. Revell

Re: [R-sig-phylo] breaking up phylogeny figure

2012-11-14 Thread Liam J. Revell
with links to the code, on my blog: http://blog.phytools.org/2012/11/function-to-break-up-plotted-tree-into.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

Re: [R-sig-phylo] Phylogenetic signal and PGLS

2012-11-28 Thread Liam J. Revell
with generic functions such as summary residuals. (With the *possible* exception that phyl.resid seems to be a little bit faster on large trees. pgls in caper, for instance, took more than 4 min. to run a tree of 1000 tips on my computer.) I hope this helps. All the best, Liam Liam J. Revell

Re: [R-sig-phylo] truncated downwards plot.phylo and plot margin

2013-03-05 Thread Liam J. Revell
found via trial error that: plot(bird.orders,x.lim=c(1.3,35.5),y.lim=c(1.5,22.4),no.margin=T) got me pretty darn close. 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

Re: [R-sig-phylo] testing for correlates of rates of evolution

2013-03-11 Thread Liam J. Revell
-1,foo(tree,V))) P-mean(abs(r.null)=abs(r)) return(list(beta=beta,r=r,P=P,method=method)) } Perhaps this is a good idea. I don't know. 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

Re: [R-sig-phylo] testing for correlates of rates of evolution

2013-03-12 Thread Liam J. Revell
I did a little further exploration of this proposed method - the results discussion are here: http://blog.phytools.org/2013/03/investigating-whether-rate-of-one.html Maybe this will be of some help in deciding the best approach to go forward with. All the best, Liam Liam J. Revell

Re: [R-sig-phylo] testing for correlates of rates of evolution

2013-03-15 Thread Liam J. Revell
(i.e., the rate of evolution in y, sensu O'Meara et al. 2006 and other refs). 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 7

Re: [R-sig-phylo] Concatenation of character matrices

2013-03-20 Thread Liam J. Revell
,colnames))) XX-matrix(NA,length(aa),length(bb),dimnames=list(aa,bb)) for(i in 1:length(YY)) XX[rownames(YY[[i]]),colnames(YY[[i]])]-YY[[i]] at least. Hope this is helpful. Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell

Re: [R-sig-phylo] ace in ape how to derive ancestral states (which.max)

2013-03-20 Thread Liam J. Revell
the marginal or joint reconstructions instead). 2) Extracting only the most likely state as *the* ancestral state at the node ignores the uncertainty of our estimate. Really we have a probability distribution for the states at each node. - Liam Liam J. Revell, Assistant Professor of Biology

Re: [R-sig-phylo] ace in ape how to derive ancestral states (which.max)

2013-03-21 Thread Liam J. Revell
as ancestral state estimates (except at the root). 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/20/2013 6:02 PM, Liam J. Revell wrote

Re: [R-sig-phylo] Information on {ape] function nodelabels

2013-03-25 Thread Liam J. Revell
for the subtree, not marginal ancestral state reconstructions. I believe that the help page for ace will be clarified in future versions of ape. Good luck. Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev

Re: [R-sig-phylo] combining p-values in PCMs

2013-04-02 Thread Liam J. Revell
that seems reasonable to you. 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/2/2013 7:27 PM, Vladimir Minin wrote: Hi Liam, When you say I

Re: [R-sig-phylo] pruning a tree

2013-04-05 Thread Liam J. Revell
isn't working because your species names are not row names in your data matrix. To have that, you could do: birddata-read.csv(H:/birddata_family_20130405.csv,header=T,row.names=1) All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] Exporting Ancestor Reconstruction from Mesquite to R for ouch

2013-04-05 Thread Liam J. Revell
that they can be easily aggregated across mappings. Good luck. 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/5/2013 6:13 PM, Martin Turcotte

Re: [R-sig-phylo] statistically test whether two characters evolve dependently

2013-04-08 Thread Liam J. Revell
two traits; Threshml can analyze more than two traits - but I believe is still limited to binary discrete characters. Please let me know if it would be helpful to your research to extend threshBayes to allow for multistate (ordered, naturally) discrete characters. All the best, Liam Liam J

Re: [R-sig-phylo] statistically test whether two characters evolve dependently

2013-04-08 Thread Liam J. Revell
). - 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/8/2013 8:27 PM, Liam J. Revell wrote: Hi Peter. I'm not sure if this is what you mean, but Felsenstein

  1   2   3   4   5   >