chr.disp.lrt: Character displacement likelihood ratio test

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

View source: R/chr.disp.lrt.R

Description

Conducts a likelihood ratio test between empirical data (phylogeny and trait data), and simumlations from the function chr.disp.sim using an approximate Bayesian computation (ABC) approach (Clarke et al. 2017)

Usage

1
chr.disp.lrt(emp.tree, emp.data, param.out, posteriorSize = 500)

Arguments

emp.tree

An empirical phylogeny - a object of class phylo (see ape).

emp.data

Continuous trait data matrix

param.out

simulated data from the function chr.disp.sim

posteriorSize

The number of samples to use in the likelihood-ratio test

Value

List containing element of 'estimates' with the estimates of sigma and a, with the Brownian motion (a = 0) summarised in column one and the character displacement (a > 0) in column two. 'likelihood' contains the likelihood of the Brownian motion model and the character displacement model, and the likelihood ratio test estimate. If used, there is an estimate of Blomberg's K for the empirical and simulated data.

Author(s)

Magnus Clarke and Mark Puttick

References

Clarke M, Thomas GH, Freckleton RP. 2017. Trait evolution in adaptive radiations: modelling and measuring interspecific competition on phylogenies. The American Naturalist. 189, 121-137.

See Also

chr.disp.sim, chr.disp.param

Examples

1
2
3
4
5
6
7
8
## import finch data form Clarke et al. (2017)
data(finches)
## simulate small amount of data 
## (example only - many more datasets are required for accuracy)
param.simulation <- chr.disp.param(finch.tree, n.sim = 100, n.steps=100,
max.sigma = 8, max.a = 8, ntraits=1, 
allopatry=as.matrix(allopatric.data), mc.cores = 1)
chr.disp.lrt(finch.tree, finch.data, param.simulation, 50)

PuttickMacroevolution/motmot documentation built on June 5, 2020, 7 p.m.