Skip to contents

Calculate transition statistics (e.g., gain, loss, and continuation) of an ancestral state reconstruction model. Values include the number of transitions, gain events, loss events, continuation events, and the number of gains and losses at the tip. Additional frequency statistics include the frequency of gain events (gains / parents without trait), loss events (losses / parents with trait), and the proportion of edges with continuation events.

Usage

asr_transition_analysis(parent_child_df, node_states = "joint")

Arguments

parent_child_df

parent_child_df object returned sfrom asr() function

node_states

If 'joint' or 'marginal' reconstruction was used

Value

Dataframe with transition statistics for a trait.