Description Usage Arguments Details Value Author(s) References See Also Examples
Performs Phylogenetic linear regression evaluating uncertainty in trees topology.
1 | tree_phylm(formula, data, phy, n.tree = 2, model = "lambda", track = TRUE, ...)
|
formula |
The model formula |
data |
Data frame containing species traits with species as row names. |
phy |
A phylogeny (class 'multiPhylo', see ? |
n.tree |
Number of times to repeat the analysis with n different trees picked
randomly in the multiPhylo file.
If NULL, |
model |
The phylogenetic model to use (see Details). Default is |
track |
Print a report tracking function progress (default = TRUE) |
... |
Further arguments to be passed to |
This function fits a phylogenetic linear regression model using phylolm
to n trees, randomly picked in a multiPhylo file.
All phylogenetic models from phylolm can be used, i.e. BM,
OUfixedRoot, OUrandomRoot, lambda, kappa,
delta, EB and trend. See ?phylolm for details.
Currently, this function can only implement simple linear models (i.e. trait~ predictor). In the future we will implement more complex models.
Output can be visualised using sensi_plot.
The function tree_phylm returns a list with the following
components:
formula: The formula
data: Original full dataset
sensi.estimates: Coefficients, aic and the optimised
value of the phylogenetic parameter (e.g. lambda) for each regression with a
different phylogenetic tree.
N.obs: Size of the dataset after matching it with tree tips and removing NA's.
stats: Main statistics for model parameters.CI_low and CI_high are the lower
and upper limits of the 95
all.stats: Complete statistics for model parameters. sd_intra is the standard deviation
due to intraspecific variation. CI_low and CI_high are the lower and upper limits
of the 95
Caterina Penone & Pablo Ariel Martinez
Paterno, G. B., Penone, C. Werner, G. D. A. sensiPhy: An r-package for sensitivity analysis in phylogenetic comparative methods. Methods in Ecology and Evolution 2018, 9(6):1461-1467
Donoghue, M.J. & Ackerly, D.D. (1996). Phylogenetic Uncertainties and Sensitivity Analyses in Comparative Biology. Philosophical Transactions: Biological Sciences, pp. 1241-1249.
Ho, L. S. T. and Ane, C. 2014. "A linear-time algorithm for Gaussian and non-Gaussian trait evolution models". Systematic Biology 63(3):397-408.
phylolm, sensi_plot, tree_phyglm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Load data:
data(alien)
# This analysis needs a multiphylo file:
class(alien$phy)
alien$phy
# run PGLS accounting for phylogenetic uncertain:
tree <- tree_phylm(log(gestaLen) ~ log(adultMass), phy = alien$phy,
data = alien$data, n.tree = 30)
# To check summary results:
summary(tree)
# Visual diagnostics
sensi_plot(tree)
# You can specify which graph to print:
sensi_plot(tree, graphs = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.