Hi Jake & Diego,

Maybe a very small modification to ace() could help to accomodate some of these 
issues. Currently, ace(type = "discrete") checks the branch lengths of the tree 
and throws an error if any of them is zero or negative. I think zero-length 
branches could be allowed. This seems quite reasonable since matrix exponential 
works as expected in this situation, e.g., with expm:

R> expm::expm(matrix(rep(0, 4), 2, 2))
     [,1] [,2]
[1,]    1    0
[2,]    0    1

I'm not sure why the current check rejects trees with zero-length branches 
(probably there was a good reason some time ago). If this is changed, then 
calling ace() with a tree modified with multi2di() will be easier since the 
last function adds zero-length branch(es) in the tree.

Best,

Emmanuel

----- Le 15 Sep 21, à 21:33, Jacob Berv jakeberv.r.sig.ph...@gmail.com a écrit :

> Hi Diego,
> 
> If your tree has polytomies and the branches have no length information, I am
> not sure if likelihood model-based reconstruction is right.
> 
> The ace function (and all other similar functions based on likelihood) will
> assume that your branch lengths represent some kind biological information
> (usually time), and the degree to which characters evolve will be related to
> the branch length. I therefore might prefer parsimony in this situation to get
> a general sense of what is going on.
> 
> As an experiment, you could assign all branches to be equal (e.g. = 1), but 
> then
> you are imposing this assumption on the analysis. In order to evaluate the
> effects of this assumption, and if you are specifically interested in
> reconstructing the ancestral states for a particular node, you could generate 
> a
> few sets of simulated branch lengths (which you could then pass to ace), to 
> see
> if the reconstruction is robust to a range of variation in branch lengths. You
> could also replicate using multi2di to see how robust your reconstruction is 
> to
> alternative resolutions.
> 
> Best,
> Jake
> 
> 
>> On Sep 15, 2021, at 2:16 AM, Diego Almeida-Silva 
>> <silva.diego.alme...@gmail.com>
>> wrote:
>> 
>> Dear colleagues,
>> 
>> I am trying to estimate ancestral states for two binary characters in a
>> full morphology-based phylogenetic tree. I am using ace function,
>> type="discrete" and kappa=0 as arguments. Unfortunately, I am dealing with
>> two problems about this issue: my topology have three polytomies and tree
>> branches have no lengths.
>> 
>> To perform ancestral state estimation, I firstly used the multi2di
>> function. However, this procedure creates artificial nodes in the topology.
>> This becomes a new problem, since states at these new nodes are also being
>> estimated.
>> 
>> Is there another way to deal with this situation? There are functions (or
>> packages) other than those of phytools that are able to deal with
>> polytomies and the absence of branch lengths in ancestral state
>> reconstruction?
>> 
>> Thanks in advance!
>> Diego
>> 
>>      [[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-sig-phylo mailing list - R-sig-phylo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
> 
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to