estimate_convergent_regimes: Detects convergent regimes under an OU model

Description Usage Arguments See Also Examples

View source: R/convergent_regions.R

Description

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.

Usage

1
2
estimate_convergent_regimes(model, criterion = c("AICc", "pBIC", "BIC"),
  method = c("backward", "rr"), fixed.alpha = FALSE, nCores = 1)

Arguments

model

fitted object of class l1ou returned by estimate_shift_configuration.

criterion

information criterion for model selection (see Details in configuration_ic).

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 surface_backward in the surface package, using backward steps to repeatedly merge similar regimes into convergent regimes.

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.

See Also

estimate_shift_configuration

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

khabbazian/l1ou documentation built on July 30, 2018, 12:05 p.m.