David intended to send his response below to the list, and that combined with my reply (also below) might help clarify things a bit.

## Advertising

Cheers, Kev ________________________________________ From: Arbuckle, Kevin Sent: 27 February 2017 18:30 To: David Bapst Subject: RE: [R-sig-phylo] Plotting uncertainty in continuous ASR Hi David, Yes, that's what I'd be after. As I said, aside from the obfuscation of some nodes, the traitgram approach also makes it difficult to simultaneously plot multiple ASRs, for instance also adding pie-charts for a discrete character, though I do think the traitgram plots are great for many cases. The idea of a 'flag style' representation is a pretty neat idea as well; as an aside, I agree that in many cases the CIs will be so wide as to hit both extremes, but this is the kind of uncertainty that it would be useful to actually include if we are to avoid giving a false impression of confidence Cheers, Kev ________________________________________ From: David Bapst [dwba...@gmail.com] Sent: 27 February 2017 18:04 To: Arbuckle, Kevin Subject: Re: [R-sig-phylo] Plotting uncertainty in continuous ASR Kevin, So, just to clarify, you're looking for a visualization of ASR with uncertainty for continuous traits for a typical phylogram where tips are ordered and arranged for clarity of the relatioships, not a phenogram/traitgram approach where tips and nodes are arrayed in a phenotypic (with uncertainty portrayed as dispersion, such as in Liam's approach, or as CI bars), which has the drawback of making it hard to pick out individual nodes/tips? If so, yeah, that's a tall order. I'm afraid I'm not familiar with anything like that, but maybe someone else will have an idea. Giving some thought to your idea, maybe something like a three-bar flag for each node, where the middle bar's color represents the ASR ML value, and the bottom and top bars is the lower and upper CI bounds? (My personal experience with ASR is that the top and the bottom colors for most nodes will be the extremes for the color legend, but I guess its a thing to do...) Cheers, -Dave On Mon, Feb 27, 2017 at 9:16 AM, Arbuckle, Kevin <k.arbuc...@liverpool.ac.uk> wrote: > Hi all, > > I was wondering about plotting the output of an ancestral state > 'reconstruction' of a continuous trait while incorporating at least some of > the uncertainty around the estimates. > > One approach I thought of was to map the ASR onto a tree in a standard way, > then at each node have essentially a mini-legend that is of a length > reflecting the width of the confidence interval of the estimate at that node, > and is coloured on the same colour-scale as the overall tree legend. For > instance, if the colour scheme for the tree goes from blue through yellow to > red as the value increases, then a node with a relatively precise and high > estimate will have a short bar only ranging through different shades of red, > whereas a highly uncertain low estimate will have a wider bar coloured from > (say) dark blue to orange/light red. I hope that description makes sense. > > I was wondering if anyone is aware of a function that already implements such > an approach, otherwise I'll try to put one together myself. I am aware of > phytool's fancyTree(type="phenogram95") as a way of incorporating uncertainty > into a plotted ASR for continuous traits. However, this often results in > difficulty in distinguishing different nodes where estimates are similar and > also does not lend itself easily to, for instance, plotting pie charts > representing discrete trait ASRs onto a tree mapped with a continuous trait. > Hence I can imagine a more general approach as above but don't want to > duplicate effort if a function already exists (and also if others feel this > is a useful idea it can be added to existing packages If I share it as above). > > Best wishes, > Kev > _______________________________________________ > 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/ -- David W. Bapst, PhD Adjunct Asst. Professor, Geology and Geol. Eng. South Dakota School of Mines and Technology 501 E. St. Joseph Rapid City, SD 57701 http://webpages.sdsmt.edu/~dbapst/ http://cran.r-project.org/web/packages/paleotree/index.html _______________________________________________ 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/