{'fraction_non_alphanumeric': 0.01350210970464135, 'fraction_numerical': 0.0, 'mean_word_length': 5.777142857142858, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
PHYLOMETRICS: an R package for detecting macroevolutionary patterns, using phylogenetic metrics and backward tree simulation

Patterns of trait distribution on phylogenies bear the imprint of the macroevolutionary mechanisms that have shaped them. Phylogenetic metrics can be used to summarize these patterns and potentially could be used to uncover the macroevolutionary mechanisms. However, their utility has been limited by the difficulty in constructing proper null distributions of phylogenetic metrics. Here, we present an efficient algorithm to construct the null distributions by generating phylogenies under a trait state‐dependent speciation and extinction model, with a fixed number of extant taxa with a given trait state and a fixed sampling fraction of taxa with each trait state. We also provide a pipeline for estimating the false‐positive rate and the statistical power of tests on phylogenetic metrics. These are implemented into an r package called phylometrics. phylometrics also provides a tractable means of assessing model inadequacy in model‐fitting approaches that have been widely used to test hypotheses about trait state‐dependent diversification processes.