tree_phyglm: Phylogenetic uncertainty - Phylogenetic Logistic Regression

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

View source: R/tree_phyglm.R

Description

Performs Phylogenetic logistic regression evaluating uncertainty in trees topology.

Usage

1
tree_phyglm(formula, data, phy, n.tree = 2, btol = 50, track = TRUE, ...)

Arguments

formula

The model formula

data

Data frame containing species traits with species as row names.

phy

A phylogeny (class 'multiPhylo', see ?ape).

n.tree

Number of times to repeat the analysis with n different trees picked randomly in the multiPhylo file. If NULL, n.tree = 2

btol

Bound on searching space. For details see phyloglm.

track

Print a report tracking function progress (default = TRUE)

...

Further arguments to be passed to phyloglm

Details

This function fits a phylogenetic logistic regression model using phyloglm to n trees, randomly picked in a multiPhylo file.

Currently, this function can only implement simple logistic models (i.e. trait~ predictor). In the future we will implement more complex models.

Output can be visualised using sensi_plot.

Value

The function tree_phyglm 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

Author(s)

Caterina Penone & Pablo Ariel Martinez

References

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.

See Also

phyloglm, sensi_plot,tree_phylm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
### Simulating Data:
set.seed(6987)
mphy = rmtree(150, N = 30)
x = rTrait(n=1,phy=mphy[[1]])
X = cbind(rep(1,150),x)
y = rbinTrait(n=1,phy=mphy[[1]], beta=c(-1,0.5), alpha=.7 ,X=X)
dat = data.frame(y, x)
# Run sensitivity analysis:
tree <- tree_phyglm(y ~ x, data = dat, phy = mphy, n.tree = 30)
# summary results:
summary(tree)
# Visual diagnostics for phylogenetic uncertainty:
sensi_plot(tree)

paternogbc/sensiPhy documentation built on June 14, 2020, 10:07 a.m.