phylosig: Compute phylogenetic signal with two methods
Description
This function computes phylogenetic signal using two different methods. It can also conduct the hypothesis tests for significant phylogenetic signal.
Usage
phylosig(tree,x,method="K",test=FALSE,nsim=1000)
Arguments
tree
a phylogenetic tree in "phylo" format.
x
vector containing values for a single continuously distributed trait.
method
method to compute signal: can be "K" or "lambda".
test
logical indicating whether or not to conduct a hypothesis test of "K" or "lambda".
nsim
for method="K", number of simulations in randomization test.
Value
if (method="K"), a list with the following components:
Kvalue of the K-statistic.
Poptionally, the P-value from the randomization test.
if (method="lambda"), a list with the following components:
lambdafitted value of lambda.
logLlog-likelihood.
PP-value of the likelihood ratio test.
Details
Lambda optimization is performed using optimize with the range of lambda set between 0 and the theoretical upper limit of lambda (determined by the relative height of the most recent internal node on the tree).
References
Pagel, M. 1999. Inferring the historical patterns of biological evolution. Nature, 401, 877--884.
Blomberg, S. P., T. Garland Jr., A. R. Ives. 2003. Testing for phylogenetic signal in comparative data: Behavioral traits are more labile. Evolution, 57,
717--745.