marginalOddsRatioBranches: Ratio of (marginal) posterior-to-prior probabilities on...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/marginalOddsRatioBranches.R

Description

Compute marginal posterior-to-prior odds ratio associated with observing one or more rate shift on a given branch.

Usage

1
marginalOddsRatioBranches(ephy, expectedNumberOfShifts)

Arguments

ephy

An object of class bammdata.

expectedNumberOfShifts

Expected number of shifts under the prior alone.

Details

This function returns a copy of a phylogenetic tree where each branch length is equal to the marginal odds ratio in favor of a rate shift on a particular branch. These cannot be interpreted as evidence for a rate shift in an absolute sense. As explained on the website, they are a marginal odds ratio. This function is provided primarily for the purpose of distinguishing core and non-core shifts.

Value

A object of class phylo but where each branch length is equal to the marginal shift odds on each branch.

Author(s)

Dan Rabosky

See Also

getBranchShiftPriors, distinctShiftConfigurations, credibleShiftSet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#Produce a blank template control file
generateControlFile(file = 'traitcontrol.txt', type='trait')

#Produce a customized control file
data(whales)

#get bamm priors to supply to control file
priors <- setBAMMpriors(whales, outfile = NULL)

generateControlFile(file = 'divcontrol.txt', params = list(
	treefile = 'whales.tre',
	globalSamplingFraction = '1',
	numberOfGenerations = '100000',
	overwrite = '1',
	lambdaInitPrior = as.numeric(priors['lambdaInitPrior']),
	lambdaShiftPrior = as.numeric(priors['lambdaShiftPrior']),
	muInitPrior = as.numeric(priors['muInitPrior']),
	expectedNumberOfShifts = '1'))

BAMMtools documentation built on May 29, 2017, 5:47 p.m.