cophy_summary_stat: Calculates summary statistics for cophylogenetic objects

Description Usage Arguments Value Functions Examples

View source: R/calculate_cophylo_summary_stat.R

Description

For cophylogenetic objects produced in treeducken via 'sim_cophyBD', calculates the numbers of different events of interest. In addition, calculates and tests the ParaFit test.

Usage

1
2
3
4
5
6
7
cophy_summary_stat_by_indx(cophy_obj, cophy_obj_indx)

summarize_1cophy(cophy_obj, cophy_obj_indx)

cophy_summary_stat(cophy_obj)

summarize_cophy(cophy_obj)

Arguments

cophy_obj

The cophylogenetic object produced via 'sim_cophyBD'

cophy_obj_indx

The index with 'cophy_obj' for 'summarize_1cophy'

Value

A vector consisting of (in order) cospeciations, host speciations, host extinctions, symbiont speciations, symbiont extinctions, host spread/switch speciations, symbiont dispersals, symbiont extirpations, parafit statistic, and parafit p-value

A dataframe containing statistics relevant to cophylogenetic analysis

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
host_mu <- 0.5 # death rate
host_lambda <- 2.0 # birth rate
numb_replicates <- 1
time <- 1.0
symb_mu <- 0.2
symb_lambda <- 0.4
host_shift_rate <- 0.0
cosp_rate <- 2.0

cophy_pair <- sim_cophyBD(hbr = host_lambda,
                           hdr = host_mu,
                           cosp_rate = cosp_rate,
                           host_exp_rate = host_shift_rate,
                           sdr = symb_mu,
                           sbr = symb_lambda,
                           numbsim = numb_replicates,
                           time_to_sim = time)
summary_stats <- summarize_cophy(cophy_pair)

treeducken documentation built on March 3, 2021, 1:11 a.m.