joint_prob_clades: Computes the joint probability for two clades for a given...

View source: R/joint_prob_clades.R

joint_prob_cladesR Documentation

Computes the joint probability for two clades for a given number of taxa.

Description

Computes the joint probability for two clades for a given number of taxa.

Usage

joint_prob_clades(c1, c2, n, log = FALSE, verbose = FALSE)

Arguments

c1

a string containing a clade.

c2

a string containing a clade.

n

number of taxa.

log

logical. If TRUE computes the log probability (default is FALSE).

verbose

logical. If TRUE it prints the case (default is FALSE).

Value

(log) joint probability.

Examples

joint_prob_clades(c1 = "{t1,t2}", c2 = "{t1,t2}", n = 5) ## case 1
joint_prob_clades(c1 = "{t1,t2}", c2 = "{t1,t2,t4}", n = 5) ## case 2/3
joint_prob_clades(c1 = "{t1,t2}", c2 = "{t3,t4,t5}", n = 5) ## case 4
joint_prob_clades(c1 = "{t1,t2}", c2 = "{t3,t4}", n = 5) ## case 5
joint_prob_clades(c1 = "{t1,t2}", c2 = "{t1,t3,t4}", n = 5) ## case 6

maxbiostat/cladeCorrelation documentation built on July 28, 2023, 2:42 a.m.