phylo_path  R Documentation 
Continuous variables are modeled using phylolm::phylolm, while binary traits are modeled using phylolm::phyloglm.
phylo_path(
model_set,
data,
tree,
model = "lambda",
method = "logistic_MPLE",
order = NULL,
parallel = NULL,
na.rm = TRUE,
...
)
model_set 
A list of directed acyclic graphs. These are matrices,
typically created with 
data 
A 
tree 
A phylogenetic tree of class 
model 
The evolutionary model used for the regressions on continuous variables. See phylolm::phylolm for options and details. Defaults to Pagel's lambda model 
method 
The estimation method for the binary models. See phylolm::phyloglm for options and details. Defaults to logistic MPLE. 
order 
Causal order of the included variable, given as a character vector. This is used to determine which variable should be the dependent in the dsep regression equations. If left unspecified, the order will be automatically determined. If the combination of all included models is itself a DAG, then the ordering of that full model is used. Otherwise, the most common ordering between each pair of variables is used to create a general ordering. 
parallel 
Superseded From v1.2 
na.rm 
Should rows that contain missing values be dropped from the data as necessary (with a message)? 
... 
Arguments passed on to
Arguments passed on to

Parallel processing: From v1.2, phylopath
uses the future
framework
for parallel processing. This is compatible with the parallel computation
within the underlying phylolm
, making it easy to enable parallel
processing of multiple models, and of bootstrap replicates. To enable,
simply set a parallel plan()
using the future
package. Typically, you'll
want to run future::plan("multisession", workers = n)
, where n
is the
number of cores. Now parallel processing is enabled. Return to sequantial
processing using future::plan("sequential")
A phylopath object, with the following components:
for each model a table with separation statements and statistics.
the DAGs
the supplied data
the supplied tree
the employed model of evolution in phylolm
the employed method in phyloglm
any additional arguments given, these are passed on to downstream functions
any warnings generated by the models
#see vignette('intro_to_phylopath') for more details
candidates < define_model_set(
A = NL ~ BM,
B = NL ~ LS,
.common = c(LS ~ BM, DD ~ NL)
)
p < phylo_path(candidates, rhino, rhino_tree)
# Printing p gives some general information:
p
# And the summary gives statistics to compare the models:
summary(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.