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

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

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] negative lambda in gls with corPagel?

of lambda are dependent on the starting value, but this is speculative since I can't initialize lambda at lambda0 with corPagel. Sorry I can't be more definitive on 2. Perhaps someone else has a better answer. Good luck. Liam Liam J. Revell NESCent, Duke University web: http

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

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

,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

, 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

(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?

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

calculations will give you exactly the same correlation coefficient as: pic.FemMass-pic(FemMass,tree.orig); pic.HomeRange-pic(HomeRange,tree.orig); r.pic-cor.origin(pic.FemMass,pic.HomeRange); Try it. - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email

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

, Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org tgarl...@ucr.edu wrote: Maybe I am missing something here, but as IC = GLS, the correlation coefficient is the same. GLS will not give you anything different. Cheers, Ted

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

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

(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)

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?

)]; # 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

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

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

) # 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}

: # 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] (no subject)

or on my website (URL below). I hope this is of some help. - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org Anne Kempel wrote: Dear Phylo-people, I have a little question. I am doing phylogenetically corrected

### Re: [R-sig-phylo] ape-package/ possibility to get the transformed residuals (phylogentic corrected residuals)?

the model residuals. You can also get the residuals using the function resid(), i.e.: resid(result) Residual standard error is: result$sigma so residual sum of squares should just be: resid.SS-n*result$sigma^2 for n species. Hope this is helpful. - Liam Liam J. Revell NESCent, Duke University web

### Re: [R-sig-phylo] trees to matrix and gamma-statistic

can also compute D-cophenetic(tree) which yields a matrix containing the distances between all the tips in the tree, I think. - Liam Liam J. Revell NESCent, Duke University web: http://anolis.oeb.harvard.edu/~liam/ NEW email: lrev...@nescent.org On 12/2/2010 10:01 PM, Emmanuel Paradis wrote: Hi

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

, 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

. 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] Model-Selection vs. Finding Models that Fit Well

]] ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo -- 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

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

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

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

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] problem matching data and tip.labels

attaching anolis.dat you can just call micro directly tiplabels(micro,frame=none, bg=white, adj=0.1, cex=0.4) -- 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 2/27/2011 1:00

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

, 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

$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

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

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

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] Ancestral Character Estimation in ape

- although I'm not sure what it tells you about your data. 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 3/7/2011 10:59 AM, Alanna Maltby wrote: Dear all I am trying

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

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

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] Help Interpreting Phylogenetic ANOVA Results

to the terminal edges tree$edge.length[tree$edge[,2]=32]-tiny.edge # compute phylogenetic anova phy.anova(tree,y,x) -- 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 5:32 PM, tgarl

### Re: [R-sig-phylo] Pagel's lambda greater than one?

(...,correlation=corPagel(...)) is high at the root of the tree and decreases towards the tips. - 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/25/2011 7:49 PM, Dan Rabosky wrote

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

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

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

=((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] Adding a taxon to a pre-exisiting tree

this function is *very* slow for more than 7 or 8 tips.] An example execution would be: source(exhaustiveMP.R) # load from source mp.trees-exhaustiveMP(data) # which will do BB or mp.trees-exhaustiveMP(data,method=exhaustive) for instance. - Liam -- Liam J. Revell University of Massachusetts

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

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()

# 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?

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] Phylogenetic correlation

Hi Scott. Phylogenetic correlation using contrasts is super easy. For phylogeny, tree, and named vectors x y: r.pic-pic(x,tree)%*%pic(y,tree)/sqrt(sum(pic(x,tree)^2)*sum(pic(y,tree)^2)) - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell

### Re: [R-sig-phylo] extract lambda from model

In this case I believe it should will be: lambda-attr(myMod$apVar,Pars)[corStruct] but double check that this is correct. - 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 4/21

### Re: [R-sig-phylo] simulating trees

extinct before the first speciation). If this is not quite correct, I'm sure that Dan R. or Luke H. (or others) can correct me. - 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 4/27

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

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?

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] Generating a tree based on a distance matrix?

tree? Keep in mind that NJ will return an unrooted tree and that the branches might be rotated around any node (thus, your plotted tree may seem quite different from the ML tree). - Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev

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

node (thus, your plotted tree may seem quite different from the ML tree). - 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/12/2011 5:28 PM, mgavil2 wrote: Hi Nick, I tried nj

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

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

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

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] Simulating BM data on phylogeny

for increased variance in the simulated distribution. Try this to see what I mean: xbar-vector() for(i in -5:5) xbar[i+6]-abs(mean(rnorm(n=1000,sd=(10^i)^2))) plot(10^c(-5:5),xbar,log=xy) Sincerely, Liam -- Liam J. Revell University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell

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

,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)

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)

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()

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?

(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] Converting a List of Trees into a multiPhylo Object

Try: class(y)-multiPhylo for list y. Does that work? - Liam Liam J. Revell University of Massachusetts Boston web: http://www.bio.umb.edu/facstaff/faculty_Revell.html email: liam.rev...@umb.edu blog: http://phytools.blogspot.com -Original Message- From: David Bapst dwba

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

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

this. Also: max(p1$times)==max(p2$times) can be FALSE because if drop.extinct is set to TRUE, then the crown age of the pruned tree can be smaller than in the full tree if some lineages arising at the root of the tree do not leave any extant descendants. - Liam -- Liam J. Revell University

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

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

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

) 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

() 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

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

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

, 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

,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

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

; 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] Comparative Methods and Pseudo-Traits

them using likelihood. This seems the most prudent course of action for this type of 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 11/10/2011 4:44 PM, Joe

### Re: [R-sig-phylo] question about pic3

will not be. Also, in a bit of self promotion, I will also note that phylosig in the phytools package can compute K for trees with polytomies with no problem because it does not use contrasts: library(picante) K-phylosig(tr1,x) All the best, Liam -- Liam J. Revell University of Massachusetts

### Re: [R-sig-phylo] question about pic3

BTW: library(picante) K-phylosig(tr1,x) should actually be: library(phytools) K-phylosig(tr1,x) 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/11/2011 12:26 PM

### Re: [R-sig-phylo] extremely small yet highly significant values for Pagel's lambda in fitContinuous

: require(phytools) fitLambda-phylosig(tree,x,method=lambda,test=T) 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/12/2011 11:28 AM, Nina Hobbhahn wrote: Hi there, I

### Re: [R-sig-phylo] on phylosig

(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

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

,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] Rotating a fan tree

))) Hopefully someone else has a better idea. - 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/1/2011 11:45 PM, Alison R. Davis Rabosky wrote: Hi everyone, I was wondering

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

: 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

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

: 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

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

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

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

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

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

] 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

You might want to try the OUWie package by Beaulieu O'Meara (http://cran.r-project.org/web/packages/OUwie/index.html). I have not tried it yet, but it promises to do multi-optimum OU model fitting as well. All the best, Liam -- Liam J. Revell University of Massachusetts Boston web: http

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

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] estimating branch lengths on existing tree topology without branch lengths

Reconstruction (http://cran.r-project.org/web/packages/phangorn/index.html) for details. - 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 4/30/2012 11:36 AM, Annemarie Verkerk wrote

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

,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

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?

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

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

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

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