Tip-based metrics
The estimated node states were used to calculate three tip-based metrics
of trait evolution. The transition rates (TR) of the species swere calculated as:
\begin{equation}
TRs=\ \frac{t}{N}\nonumber \\
\end{equation}where t is the number of transitions of trait states detected at
the nodes that a species underwent from the phylogeny root to the tip,
and N is the total number of nodes, counting from the tip to the
root. A value equal to 1 indicates that the species presented as many
character-state transitions as possible given its evolutionary history,
whereas a value equal to 0 indicates that there were no transitions –
the tip and the ancestral character-state remained the same (Fig. 1).
Stasis Time (ST) of the species s was calculated as:
\begin{equation}
\text{ST}_{s}=\max{\ \{L_{i},\ldots,L_{N}\}}\ \text{if}\ L_{i}\in A_{i}=a\nonumber \\
\end{equation}where L is the branch length value from node i to N that
have the trait-state A similar to the tip trait-state a .
Stasis time (ST) examines evidence for character retention over time
(Fig. 1). The metric consists in determining, across the whole
phylogeny, the maximum value of branch length between two nodes with
mapped trait A similar to the tip trait a . This can be
seen in Fig. 1, where species 3 is currently an insectivore, having
recently transitioned from a plant-eater diet. Its lineage had a longer
time as an insect-eater from node 2 to the 3 than between any other
nodes. Thus, the longer stasis time as an insect-eater is that one
embracing the branches predating the time as a plant-eater.
Finally, Last Transition Time (LT) of the species s was
calculated as:
\begin{equation}
\text{LT}_{s}=\sum_{i=1}^{min\{N,\ \text{\ L}_{i}\ \notin\text{\ A}_{i}\ =\ a\}}L_{i}\nonumber \\
\end{equation}where branch lengths L are summed from node i to Nhaving a trait A similar to the tip trait a . The sum stops when
the trait A of the node i differs from the tip traiti =1. Last transition time indicates when the current tip trait
became fixed. The values of LT will exceed ST because the former
consists of a sum of more recent branch lengths with trait a ,
whereas the latter is the maximum branch length between two nodes with
trait a . R code with the tip-based metrics we develop here can be
found in the GitHub of the first author.