View source: R/convergent_regions.R
estimate_convergent_regimes | R Documentation |
Takes a model previously estimated by estimate_shift_configuration
,
including one or more traits and a configuration of evolutionary shifts, and detect which of these regime shifts
are convergent.
estimate_convergent_regimes(model, criterion = c("AICc", "pBIC", "BIC"), method = c("backward", "rr"), fixed.alpha = FALSE, nCores = 1)
model |
fitted object of class l1ou returned by |
criterion |
information criterion for model selection (see Details in |
method |
search method for finding convergent regimes. “rr” is based on genlasso,
a regularized linear regression estimation. Currenly, this method can only accept a single trait.
The default “backward” method is a heuristic similar to |
fixed.alpha |
indicates if the alpha parameters should be optimized while phylolm optimize the likelihood function. |
nCores |
number of processes to be created for parallel computing. If nCores=1 then it will run sequentially. Otherwise, it creates nCores processes by using mclapply function. For parallel computing it, requires parallel package. |
estimate_shift_configuration
library(l1ou) data("lizard.traits", "lizard.tree") Y <- lizard.traits[, 1:1] ## first fit a model to find individual shifts (no convergence assumed): fit_ind <- estimate_shift_configuration(lizard.tree, Y, criterion="AICc") fit_ind ## then detect which of these shifts are convergent: fit_conv <- estimate_convergent_regimes(fit_ind, criterion="AICc") fit_conv plot(fit_conv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.