Re: [R-sig-phylo] ape-package: unknown states in ace analyses?

2018-06-25 Thread Théo Léger
Paradis Envoy� : vendredi, 22 juin 2018 15:45:05 � : Th�o L�ger; r-sig-phylo@r-project.org Objet : Re: [R-sig-phylo] ape-package: unknown states in ace analyses? Two more comments: 1/ The first insertion in the code of ace() below is not needed if the user replaces "?" (or any coding fo

Re: [R-sig-phylo] ape-package: unknown states in ace analyses?

2018-06-22 Thread Jacob Berv
This is so cool. Thanks Liam! J > On Jun 21, 2018, at 8:22 PM, Liam J. Revell wrote: > > Dear Theo. > > This can be done with the function rerootingMethod as described here > http://blog.phytools.org/2013/04/estimating-ancestral-states-when.html, > although it is *very* important to note

Re: [R-sig-phylo] ape-package: unknown states in ace analyses?

2018-06-22 Thread Emmanuel Paradis
Two more comments: 1/ The first insertion in the code of ace() below is not needed if the user replaces "?" (or any coding for unknown/uncertain state) with NA -- which seems reasonable to do. 2/ This approach of taking uncertainty into account in likelihood ancestral state reconstruction

Re: [R-sig-phylo] ape-package: unknown states in ace analyses?

2018-06-22 Thread Emmanuel Paradis
Hi Théo, It is possible to modify the code of ace() to take uncertain character states into account. If you edit the code with fix(ace), after these four lines: if (method != "ML") stop("only ML estimation is possible for discrete characters.") if (any(phy$edge.length <= 0))