Skip to contents

Permutation test for synchronous detection function

Usage

synchronous_permutation_test(
  comparitor,
  df,
  tr,
  tip_name_variable,
  trait,
  node_states = "joint",
  confidence_threshold = NULL,
  confidence = NULL,
  num_permutations = 1000,
  num_cores = 1
)

Arguments

comparitor

Comparitor, such as a genotype or a different trait/phenotype

df

Dataframe with comparitor, trait, and tip_name_variable

tr

Phylogenetic tree

tip_name_variable

Tip name variable

trait

Trait of interest, such as a trait/phenotype

node_states

Joint or marginal reconstruction

confidence_threshold

Confidence threshold if using marginal reconstruction

confidence

Whether to use high or low confidence transition nodes when node_states are marginal

num_permutations

Number of permutations. Default: 1000

num_cores

Number of cores. Default: 1

Value

Synchronous gain and loss events of two traits with p-value permutation testing results