pgls.dispRity {dispRity} | R Documentation |
phylolm dispRity (from phylolm::phylolm
)
Description
Passing dispRity
objects to the phylolm
function from the phylolm
package. Typically to run some PGLS.
Usage
pgls.dispRity(data, tree, formula, model = "BM", ..., optim = list())
Arguments
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 |
Details
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.
Author(s)
Thomas Guillerme
See Also
phylolm
, test.dispRity
, custom.subsets
, chrono.subsets
.
Examples
## 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