chr.disp.lrt {motmot}R Documentation

Character displacement likelihood ratio test

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

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

## 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)

[Package motmot version 2.1.3 Index]