Re: [R-sig-phylo] Problem with negative ages in OUwie.boot?

2018-05-07 Thread Eliot Miller
Unless it does something internally already, you might need to do something
like: options(digits=10) before running the node.depth.edgelength(tree) to
identify your problem.

Yes, I wasn't referring to branching.times. I was talking about various
methods, e.g., BAMM, that don't perform well (or at all) with zero-length
branches.

Cheers,
Eliot

On Mon, May 7, 2018 at 5:27 PM, David Bapst  wrote:

> Interesting, Rafael. Perhaps it is just barely within tolerance for
> force.ultrametric, but not within the zone to avoid issues with
> branching.times?
>
> What did
>
> node.depth.edgelength(tree)
>
> return? That should give us an idea how far each tip is from the root.
>
> As a note, Eliot, I don't think I've seen branching.times have
> problems with tree with zero-length branches, although that is pretty
> unusual with the ultrametric trees valid with branching.times.
>
> Cheers,
> -Dave
>
> On Fri, May 4, 2018 at 8:32 AM, Rafael S Marcondes
>  wrote:
> > Hi Elliot et al,
> >
> > Thanks for all the helpful answers, and sorry for my delay in getting
> back.
> > min(tree$edge.length) returns a nonzero positive number, but running
> > force.ultrametric on the tr did not cause that warning message to go
> away...
> >
> > --
> > Rafael Sobral Marcondes
> > PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
> >
> > Museum of Natural Science
> > Louisiana State University
> > 119 Foster Hall
> > Baton Rouge, LA 70803, USA
> >
> > Twitter: @brown_birds
> >
> >
> >
> > On Fri, May 4, 2018 at 8:22 AM Eliot Miller 
> wrote:
> >>
> >> I suggest calling min(tree$edge.length) on any tree you plan to use for
> >> comparative methods, including the one you're having trouble with
> Rafael. If
> >> you get a negative value, then something is really funny and you need to
> >> solve it. If you get a zero then various comparative methods will throw
> >> errors, but it's not the end of the world--there are workarounds. If
> neither
> >> of these things is true, and the tree is still returning FALSE to
> >> is.ultrametric, then assuming the tree is supposed to be ultrametric,
> it's
> >> almost certainly a tolerance thing (which you can check directly by
> tweaking
> >> the tol method in the is.ultrametric function). In that case, I've had
> good
> >> experiences using the phangorn/phytools approach to force the tree
> >> ultrametric.
> >>
> >> Eliot
> >>
> >> On Thu, May 3, 2018 at 5:08 PM, Liam J. Revell 
> >> wrote:
> >>>
> >>> Just to clarify, force.ultrametric is not a formal rate-smoothing
> method
> >>> or anything like that. It is intended only for use to resolve numerical
> >>> precision issues such as the one raised in this thread.
> >>>
> >>> Liam J. Revell, Associate Professor of Biology
> >>> University of Massachusetts Boston
> >>> & Profesor Asociado, Programa de Biología
> >>> Universidad del Rosario
> >>> web: http://faculty.umb.edu/liam.revell/
> >>>
> >>> On 5/3/2018 4:21 PM, Theodore Garland wrote:
> 
>  I'll just add that it is always a really good idea to view the trees
> you
>  (think you) are using, not just rely on the variance-covariance
> matrices
>  derived from them and used in PGLS analyses, etc.  Several times when
> I was
>  compiling trees and data from the literature authors sent me tree
> files
>  (e.g., Nexus) that did not match what they showed in a paper or
> described in
>  the methods.  Sometimes this was because the default display in
> Mesquite is
>  NOT "branches proportional to lengths," but I am sure potentially
> misleading
>  displays occur in some other programs as well.
> 
>  If one does force a tree to become ultrametric, then make sure you
>  provide that tree and the original in the Online Supplemental
> Material or
>  whatever, and clearly say what you did.
> 
>  Cheers,
>  Ted
> 
> 
> 
>  Theodore Garland, Jr., Distinguished Professor
> 
>  Department of Evolution, Ecology, and Organismal Biology (EEOB)
> 
>  University of California, Riverside
> 
>  Riverside, CA 92521
> 
>  Office Phone: (951) 827-3524 
> 
>  Facsimile: (951) 827-4286  (not
> confidential)
> 
>  Email: tgarl...@ucr.edu 
> 
>  http://www.biology.ucr.edu/people/faculty/Garland.html
> 
>  http://scholar.google.com/citations?hl=en&user=iSSbrhwJ
> 
> 
>  Director, UCR Institute for the Development of
>  Educational Applications 
> 
> 
>  Editor in Chief, /Physiological and Biochemical Zoology
>  /
> 
> 
>  Fail Lab: Episode One
> 
>  _https://www.youtube.com/watch?v=c0msBWyTzU0_
> 
> 
>  On Thu, May 3, 2018 at 1:09 PM, Liam J. Revell   > wrote:
> 
>  I haven't been closing following this thread, so I'm not sure that
>  

Re: [R-sig-phylo] Problem with negative ages in OUwie.boot?

2018-05-07 Thread David Bapst
Interesting, Rafael. Perhaps it is just barely within tolerance for
force.ultrametric, but not within the zone to avoid issues with
branching.times?

What did

node.depth.edgelength(tree)

return? That should give us an idea how far each tip is from the root.

As a note, Eliot, I don't think I've seen branching.times have
problems with tree with zero-length branches, although that is pretty
unusual with the ultrametric trees valid with branching.times.

Cheers,
-Dave

On Fri, May 4, 2018 at 8:32 AM, Rafael S Marcondes
 wrote:
> Hi Elliot et al,
>
> Thanks for all the helpful answers, and sorry for my delay in getting back.
> min(tree$edge.length) returns a nonzero positive number, but running
> force.ultrametric on the tr did not cause that warning message to go away...
>
> --
> Rafael Sobral Marcondes
> PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
>
> Museum of Natural Science
> Louisiana State University
> 119 Foster Hall
> Baton Rouge, LA 70803, USA
>
> Twitter: @brown_birds
>
>
>
> On Fri, May 4, 2018 at 8:22 AM Eliot Miller  wrote:
>>
>> I suggest calling min(tree$edge.length) on any tree you plan to use for
>> comparative methods, including the one you're having trouble with Rafael. If
>> you get a negative value, then something is really funny and you need to
>> solve it. If you get a zero then various comparative methods will throw
>> errors, but it's not the end of the world--there are workarounds. If neither
>> of these things is true, and the tree is still returning FALSE to
>> is.ultrametric, then assuming the tree is supposed to be ultrametric, it's
>> almost certainly a tolerance thing (which you can check directly by tweaking
>> the tol method in the is.ultrametric function). In that case, I've had good
>> experiences using the phangorn/phytools approach to force the tree
>> ultrametric.
>>
>> Eliot
>>
>> On Thu, May 3, 2018 at 5:08 PM, Liam J. Revell 
>> wrote:
>>>
>>> Just to clarify, force.ultrametric is not a formal rate-smoothing method
>>> or anything like that. It is intended only for use to resolve numerical
>>> precision issues such as the one raised in this thread.
>>>
>>> Liam J. Revell, Associate Professor of Biology
>>> University of Massachusetts Boston
>>> & Profesor Asociado, Programa de Biología
>>> Universidad del Rosario
>>> web: http://faculty.umb.edu/liam.revell/
>>>
>>> On 5/3/2018 4:21 PM, Theodore Garland wrote:

 I'll just add that it is always a really good idea to view the trees you
 (think you) are using, not just rely on the variance-covariance matrices
 derived from them and used in PGLS analyses, etc.  Several times when I was
 compiling trees and data from the literature authors sent me tree files
 (e.g., Nexus) that did not match what they showed in a paper or described 
 in
 the methods.  Sometimes this was because the default display in Mesquite is
 NOT "branches proportional to lengths," but I am sure potentially 
 misleading
 displays occur in some other programs as well.

 If one does force a tree to become ultrametric, then make sure you
 provide that tree and the original in the Online Supplemental Material or
 whatever, and clearly say what you did.

 Cheers,
 Ted



 Theodore Garland, Jr., Distinguished Professor

 Department of Evolution, Ecology, and Organismal Biology (EEOB)

 University of California, Riverside

 Riverside, CA 92521

 Office Phone: (951) 827-3524 

 Facsimile: (951) 827-4286  (not confidential)

 Email: tgarl...@ucr.edu 

 http://www.biology.ucr.edu/people/faculty/Garland.html

 http://scholar.google.com/citations?hl=en&user=iSSbrhwJ


 Director, UCR Institute for the Development of
 Educational Applications 


 Editor in Chief, /Physiological and Biochemical Zoology
 /


 Fail Lab: Episode One

 _https://www.youtube.com/watch?v=c0msBWyTzU0_


 On Thu, May 3, 2018 at 1:09 PM, Liam J. Revell >>> > wrote:

 I haven't been closing following this thread, so I'm not sure that
 this is relevant - but phytools has a function called
 'force.ultrametric' (I believe) that does precisely what its name
 suggests it might.

 Liam J. Revell, Associate Professor of Biology
 University of Massachusetts Boston
 & Profesor Asociado, Programa de Biología
 Universidad del Rosario
 web: http://faculty.umb.edu/liam.revell/
 

 On 5/3/2018 3:34 PM, David Bapst wrote:

 Hmm. I hope that isn't the case - branching.times() is used
 pretty
 widely in ape-dependent packages for getting node ages from
>>