average  R Documentation 
Extract and average the best supported models from a phylogenetic path analysis.
average(phylopath, cut_off = 2, avg_method = "conditional", ...)
phylopath 
An object of class 
cut_off 
The CICc cutoff used to select the best models. Use

avg_method 
Either 
... 
Arguments to pass to phylolm::phylolm and phylolm::phyloglm. Provide 
An object of class fitted_DAG
.
candidates < define_model_set(
A = NL ~ RS,
B = RS ~ NL + BM,
.common = c(LS ~ BM, DD ~ NL, NL ~ BM)
)
p < phylo_path(candidates, rhino, rhino_tree)
summary(p)
# Models A and B have similar support, so we may decide to take
# their average.
avg_model < average(p)
# Print the average model to see coefficients, se and ci:
avg_model
## Not run:
# Plot to show the weighted graph:
plot(avg_model)
# One can see that an averaged model is not necessarily a DAG itself.
# This model actually has a path in two directions.
# Note that coefficients that only occur in one of the models become much
# smaller when we use full averaging:
coef_plot(avg_model)
coef_plot(average(p, method = 'full'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.