Learn R Programming

phylopath (version 1.2.1)

best: Extract and estimate the best supported model from a phylogenetic path analysis.

Description

Extract and estimate the best supported model from a phylogenetic path analysis.

Usage

best(phylopath, ...)

Value

An object of class fitted_DAG.

Arguments

phylopath

An object of class phylopath.

...

Arguments to pass to phylolm::phylolm and phylolm::phyloglm. Provide boot = K parameter to enable bootstrapping, where K is the number of bootstrap replicates. If you specified other options in the original phylo_path call you don't need to specify them again.

Examples

Run this code
  candidates <- define_model_set(
    A = NL ~ BM,
    B = NL ~ LS,
    .common = c(LS ~ BM, DD ~ NL)
  )
  p <- phylo_path(candidates, rhino, rhino_tree)
  best_model <- best(p)
  # Print the best model to see coefficients, se and ci:
  best_model
  # Plot to show the weighted graph:
  plot(best_model)

Run the code above in your browser using DataLab