19082355898663e-30 found after 0 nearest neighbor
interchange(s).
> test$edge.length
[,1]
6,7 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.
ive you the correct 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
u the
true tree and branch lengths - so there should be no need to use my
function anyway. (See Felsenstein 2004; p. 166.)
- 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/13
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 whe
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/
em
netics/ which does 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 tro
value of
the mean 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
netics/phylosig/v0.3/phylosig.R";)
> fit<-phylosig(tree,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/
t;atree" are different
(because the latter has a different number of tips) *and* we have a
different number of them (because we used multi2di() to fully resolve
our multifurcating tree after we attached the extra tip).
Hope this helps.
- Liam
--
Liam J. Revell
University of Massachusett
UE
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 7/11/2011 10:44 PM, wrote:
dear all,
I have a question when I used the pic funtion, it appeared an
er
ields the same results and P-value. (Note that
smdata<-as.matrix(smdata) seems to be important 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
trix after
lambda transformation (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: htt
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
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
ALSE)
Sorry about 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.
rstanding about the
differences in maximum ages!
Cheers,
Rob
On 11 August 2011 14:05, Liam J. Revell 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 s
()
differ by 3 instead of 2). I'm sure that this can be fixed easily.
Thanks for sharing this.
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/11/2011 7:52 PM, Rob La
nstance, you can compute parameter
estimates 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 clarific
) 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
uot;)
> tree<-pratchet(dna) # or you could use optim.parsimony()
> 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/201
ot;
This tells us, to take your example, that node 13 should be connected to
tips 1 & 2, which tre$tip.label tells us have labels "8" & "9", just as
we see with:
> plot(tre); nodelabels()
I hope this clears things up somewhat.
All the best, Liam
instance 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
now if this is useful or if you have any questions or
difficulties implementing.
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/11/2011 6:18 PM, Antigoni
r3$tip.label=="tr1"]<-"NA"
tr3<-paste.tree(tr3,tr1)
tr3$tip.label[tr3$tip.label=="tr2"]<-"NA"
tr3<-paste.tree(tr3,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
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
e this helps. Also, thanks Klaus.
- 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/25/2011 11:19 AM, Klaus Schliep wrote:
Dear Ondrej,
there is also a function midpoint in ph
e Revell 2010, MEE; 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/
s, and then
compare 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/
of
contrasts 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
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
ge, phytools, also can conduct this test:
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.
of lambda=1.0 (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
tic 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
C)),c(1:ntips,(ntips+2):ncol(C))]
return(C)
} else return(vcv.phylo(phy))
}
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/21/2011 12:09 PM, ppi...@uniroma3.it wrote:
&
C)),c(1:ntips,(ntips+2):ncol(C))]
return(C)
} else return(vcv.phylo(phy))
}
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/21/2011 12:09 PM, ppi
r1)))
radial.phylog(newick2phylog(write.tree(tr2)))
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 R
tion: 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
other metrics
of tree distance.
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/26/2011 6:27 PM, Bruno de Medeiros wrote:
Hi everyone,
I am simulating charact
th 10 character and 9 different site patterns.
The states are 0 1
However:
p<-as.data.frame(p)
p2<-phyDat(p,type="USER",levels=c(0,1))
Gives me:
> p2
10 sequences with 5 character and 5 different site patterns.
The states are 0 1
--
Liam J. Revell
University of Massachusetts Bo
lt;-gls(y~x,data=data,correlation=corPagel(0.5,tree,fixed=FALSE),method="ML")
# fit using 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.
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
mes(meserr))
meserr<-meserr[o,]
should 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
w
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 2/8/2012 1:59 PM, Amy Boddy wrote:
Hello,
I was wondering if somebody could help me with a problem I am having i
should not alter the relative likelihoods of different
models fit 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,
;
$Data.not.tree
[1] "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 ru
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
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 Massachuset
uence
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 Ver
set of trees is simple, for instance,
using sapply:
sp<-c("t1","t3","t8")
target.state<-sapply(trees,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?
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 Mass
also give you parameter estimated (fitted 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
,2]; names(xvar)<-temp[,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
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/
em
matrices in which each column of each 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, Jonath
as before.
If anyone would like 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.re
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
Lia
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.rev
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
e plotting window.
Is this at all helpful?
All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com
On 8/28/2012 1:34 PM, Gwennaël Bataille wrote:
Dea
llows:
tree$edge.length<-runif(n=nrow(tree$edge),min=0,max=2)
tree$edge.length
tree$edge.length[tree$edge.length<1]<-1
tree$edge.length[tree$edge.length>1]<-2
tree$edge.length
plot(tree)
I hope this is of some help.
All the best, Liam
Liam J. Revell, Assistant Professor of Bio
will also see that there
was considerable discussion about whether it was possible to fit the
same model using MCMCglmm.
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:
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
t works.
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/12/2012 3:53 PM, Agus Camacho wrote:
Dear all,
Im trying to ha
ary(phytools); library(geiger)
fit<-fitContinuous(tree,x,model="OU")$Trait1
ou<-ace(x,ouTree(tree,fit$alpha))
# or
ou<-anc.ML(ouTree(tree,fit$alpha),x)
Good luck.
- Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/li
o fix.
You can do:
Y<-phyDat(X,type="USER",levels=unique(as.vector(X))
lik<-pml(tree,Y,Q=Q)
This will compute the likelihood you want, I think.
All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell
oot(...)) &
root(...,resolve.root=TRUE) don't produce the same rooted phylogenies.
The former, not the latter, should be used in this case.
- Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.r
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
Lia
trees to do the analyses 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 Camac
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
Hi Philipp.
As I'm not responsible for ape or plot.phylo, I'm not sure why this would be
the case, but reorde.phylo() seems to solve your problem:
tree<-reorder(tree)
plot(tree, type="unrooted")
You might also try:
tree<-read.tree(text=write.tree(tree))
- Liam
Li
)
This should give the same result as branching.times for ultrametric
trees, but will not be "messed up" for trees containing lineages that
terminate before the present.
- Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.um
along
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:
ip<-list(edge=matrix(c(2,1),1,2),
tip.label="species.name",
edge.length=1.0,
Nnode=1)
class(tip)<-"phylo"
# attach to any node (say, node 16)
btree<-bind.tree(tree,tip,where=16)
plotTree(btree)
Hopefully that works. Good luck. - Liam
Liam J. Revell,
than 4 min. to run a tree
of 1000 tips on my computer.)
I hope this helps.
All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org
On 11/28/201
x.lim. For instance, I 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/
em
names(a)]^2
r<-cor(a,b,method=method)
return(r)
}
r.null<-c(r,replicate(nsim-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, As
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
etic datasets.)
All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org
On 3/15/2013 8:18 AM, Alejandro Gonzalez wrote:
Hello,
I am using ape to obtain
e
Brownian process of evolution in y (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...@um
).
Presently plotSimmap only plots right & left-facing square phylograms.
If this is what you're looking for, please let me know if you need any
assistance using these phytools functions.
All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
mes)))
bb<-sort(unique(sapply(YY,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 Bos
on (we should use 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
Fitzjohn's package diversitree can be used to obtain the joint
reconstructions under likelihood.
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
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
ditional likelihoods 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.um
ted by
varBeta<-var(BB[,"beta"])+mean(BB[,"var(beta)"])
t.beta<-mean(BB[,"beta"])/sqrt(varBeta)
P.beta<-2*pt(abs(t.beta),df=length(trees[[1]]$tip)-2,lower.tail=FALSE)
I think that's right.
All the best, Liam
Liam J. Revell, Assistant Professor of Bio
gle consensus
or "best" tree will surely be too small.
I hope 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.phytool
that method 2 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 o
ganize your results of
interest more sensibly than this so 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
blo
cters & 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, Lia
uous). - 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 Fe
. Several people have made suggestions about this to
me but I'm not sure I understand them.
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
Hi Elaine.
A tree of 10,000 tips written to file should not take up 3.9 GB. Even a
1000 Newick trees of this size should not take up this much space. Are
you sure this is the size of your file?
All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts
quiet = TRUE,
skip = 0, comment.char = "#", nlines=1)
tree<-read.tree(text=temptree)
- 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/12/2013 11
bda<-phylosig(tree,x,method="lambda")$lambda # obs. lambda
# lambda from randomized tips
ff<-function(x){ x$tip.label<-sample(x$tip.label); x }
ll<-replicate(nn-1,phylosig(ff(tree),x,method="lambda")$lambda)
p<-mean(c(lambda,ll)>=lambda) # p.value from rand
d to put priors on everything (or nothing, in which a pretty
uninformative prior is used). If you decide this is what you want to do
& have difficulty figuring it out, please let me know.
All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
w
ion that I think does this - I posted it to my
blog here:
http://blog.phytools.org/2013/04/computing-strahler-numbers-for-nodes-on.html.
Check it out and let us know if this does what it is supposed to.
All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts
Glad to hear it Alastair.
I posted an answer to your second question (how to extract the set of
most inclusive clades with Strahler number i) here:
http://blog.phytools.org/2013/04/extracting-set-of-most-inclusive-clades.html.
All the best, Liam
Liam J. Revell, Assistant Professor of
r reconstruction using parsimony & maximum likelihood
(http://tinyurl.com/cq93pyj).
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 5/2/
This is exactly what findMRCA in phytools does, but I wrote it a while
ago so I'm not sure how fast it is
- 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:
1 - 100 of 530 matches
Mail list logo