Phylogenetic Generalized Least Square with fossil phylogenies
The function performs pgls for non-ultrametric trees using
either Pagel's lambda transform, Brownian Motion or RRphylo
rates to change the correlation structure.
PGLS_fossil(modform,data,tree,RR=NULL)
modform |
the formula for the regression model. |
data |
a list of named vectors including response and predictor
variables as named in |
tree |
a phylogenetic tree. The tree needs not to be ultrametric and fully dichotomous. |
RR |
the result of |
With univariate data, the user may want to use either Pagel's lambda
or RRphylo
rates to transform the correlation structure. In the
former case, the lambda transform is fitted to the data (Revell, 2010). In
the latter case, branch lengths are multiplied by absolute rates as
computed by RRphylo
to accommodate rate variation across the tree. In
the multivariate case, the variance-covariance structure is either left
unaltered by keeping RR = NULL
(Adams and Collyer, 2015) or changed
according to the norm-2 vector of rates computed for each phenotype by
specifying the RR
object.
Fitted pgls parameters and significance.
Pasquale Raia, Silvia Castiglione, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto
Revell, L.J. (2010). Phylogenetic signal and linear regression on species data. Methods in Ecology and Evolution, 1, 319-329. https://doi.org/10.1111/j.2041-210X.2010.00044.x
Adams, D.C., & Collyer, M. L. (2017). Multivariate phylogenetic comparative methods: evaluations, comparisons, and recommendations. Systematic Biology, 67, 14-31. https://doi.org/10.1093/sysbio/syx055
## Not run: library(ape) library(phytools) rtree(100)->tree fastBM(tree)->resp fastBM(tree,nsim=3)->resp.multi fastBM(tree)->pred1 fastBM(tree)->pred2 PGLS_fossil(modform=y1~x1+x2,data=list(y1=resp,x2=pred1,x1=pred2),tree=tree) RRphylo::RRphylo(tree,resp)->RR PGLS_fossil(modform=y1~x1+x2,data=list(y1=resp,x2=pred1,x1=pred2),tree=tree,RR=RR) PGLS_fossil(modform=y1~x1+x2,data=list(y1=resp.multi,x2=pred1,x1=pred2),tree=tree) cc<- 2/parallel::detectCores() RRphylo::RRphylo(tree,resp.multi,clus=cc)->RR PGLS_fossil(modform=y1~x1+x2,data=list(y1=resp.multi,x2=pred1,x1=pred2),tree=tree,RR=RR) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.