View source: R/pgls.dispRity.R
pgls.dispRity | R Documentation |
phylolm::phylolm
)Passing dispRity
objects to the phylolm
function from the phylolm
package. Typically to run some PGLS.
pgls.dispRity(data, tree, formula, model = "BM", ..., optim = list())
data |
A |
tree |
If |
formula |
The PGLS formula. If left empty, runs either |
model |
The covariance model (default is |
... |
Any optional arguments to be passed to |
optim |
An optional named list of arguments to be passed to the function |
The formula
needs to be expressed by always naming the response variable disparity
to use the calculated disparity data from data
.
Optional arguments ...
correspond to all the non-ambiguous named arguments from the phylolm
. Optional arguments for the internal optim
function can be passed as a named list to the optim
argument.
Thomas Guillerme
phylolm
, test.dispRity
, custom.subsets
, chrono.subsets
.
## Simple example
data(BeckLee_mat50)
data(BeckLee_tree)
disparity <- dispRity(BeckLee_mat50, metric = centroids, tree = BeckLee_tree)
## Running a simple PGLS
model <- pgls.dispRity(disparity)
summary(model)
## More complex example running a PGLS
## on multiple trees and using groups as a predictor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.