BM: BranchManager weights

View source: R/weights.R

BMR Documentation

BranchManager weights

Description

Calculates phylogenetic weights according the to BranchManager method of Stone & Sidow (2007).

Usage

BM(phy)

Arguments

phy

A phylo object

Details

Adapted from original R code by Eric A. Stone, published as supplementary material to Stone & Sidow (2007).

Value

A vector of weights

Examples


library(ape)

# Three trees, representing three genealogical hypotheses, that relate
# languages A,B,C,D:
tree1 <- read.tree(text = "(((A:1,B:1,C:1):1,D:2):0.3);")
plot(tree1)
tree2 <- read.tree(text = "(((A:0.2,B:0.2,C:0.2):1.8,D:2):0.3);")
plot(tree2)
tree3 <- read.tree(text = "(((A:1.8,B:1.8,C:1.8):0.2,D:2):0.3);")
plot(tree2)
# The BM weights of each language in each tree:
BM(tree1)
BM(tree2)
BM(tree3)

erichround/phyloWeights documentation built on Sept. 29, 2023, 9:49 a.m.