Dear r-sig-phylo participants,
I have data set where tips are assigned to 3 discrete states (aquatic,
semi-aquatic and terrestrial). Because the definition of "semi-aquatic"
is quite arbitrary and some species in the tree lack field observations
of their ecology, I decided to use a matrix of state priors for
stochastic mapping in the phytools package. That approach will allow me
to account for uncertainties/lack of information for some tips in the
phylogeny. I fitted 3 models (ER, SYM, and ARD) where Q was empirically
estimated and nsim was set to 1000. According to AIC value, the SYM
model was the best-fitted one. Describe.simmap showed that mean total
time spent in the state "semi-aquatic" was 0. Thus, all mapped trees
were actually binary and I was able to employ the densityMap function to
obtain an object, let's say "obj", which contains a single tree with the
posterior density for the "aquatic" and "terrestrial" states from 1000
Here is the question:
Is it straightforward idea to paint back the obj$tree with just two
colors where colors are determined by a threshold value of posterior
probability (indicated as a legend bar in the bottom left part of the
For instance, is it appropriate to paint a tree edges with a color A if
PP is lower or equal than 0.5 and color B if PP is greater than 0.5?
Some R packages for model fitting allow simmap tree as input, but if my
question makes sense, it would be better to provide consensus tree from
n stochastic maps instead to use one stochastic map as input.
Thank you for your time.
R-sig-phylo mailing list - Rfirstname.lastname@example.org
Searchable archive at http://email@example.com/