PhyloEM

Functions for the inference of shifts.

PhyloEM()

Model Estimation with Detection of Shifts

find_grid_alpha()

Find a reasonable grid for alpha

estimateEM()

Perform One EM

PhyloEM Handling Functions

Functions to handle objects of class PhyloEM.

plot(<PhyloEM>)

Plot for class PhyloEM

params_process(<PhyloEM>)

Parameter estimates

imputed_traits()

Ancestral State Reconstruction

model_selection()

Model Selection of a fitted object

residuals(<PhyloEM>)

Residuals of a fitted object

enlight()

Make the result lighter

log_likelihood()

Log Likelihood of a fitted object

find_rotation()

Test for rotation invariant datasets

merge_rotations()

Merge fits from independent runs of PhyloEM.

get_criterion()

Get Model Selection Criterion

plot_criterion()

Plot Model Selection Criterion

Parameters and Simulations

Functions to simulate various processes on the tree, and deal with their parameters.

simul_process()

Simulate a Stochastic Process on a tree

params_BM()

Create an object params_process for a BM

params_OU()

Create an object params_process for an OU

params_process()

Create an object params_process

params_process(<character>)

Create an object params_process

plot(<params_process>)

Plot for class simul_process

extract(<simul_process>)

Extraction of simulated traits

log_likelihood()

Log Likelihood of a fitted object

Identifiability

Functions to deal with the non-identifiability of shifts allocations.

equivalent_shifts()

Find all equivalent shifts allocations and values.

extract(<equivalent_shifts>)

Extract the shifts values for one trait.

plot(<equivalent_shifts>)

Plot all the equivalent solutions.

Parsimony and Enumeration

Functions to compute parsimony scores, and enumerate all equivalent solutions to a given clustering of the tips.

enumerate_parsimony()

Enumerate all the possible regime allocations, given a clustering of the tips.

extract(<enumerate_parsimony>)

Extract the result of enumerate_parsimony at a node.

plot(<enumerate_parsimony>)

Plot all the equivalent solutions.

partitionsNumber()

Number of different models

extract(<partitionsNumber>)

Extract from object partitionsNumber

parsimonyNumber()

Number of equivalent parsimonious allocations.

extract(<parsimonyNumber>)

Extraction of the actual number of solutions.

parsimonyCost()

Minimal number of shifts needed to get a clustering.

extract(<parsimonyCost>)

Extraction of the actual number of solutions.

Shifts vs Regimes

Functions to switch between representations using shifts positions, and representations using regimes allocations.

shifts_to_simmap()

Simmap format mapping from list of edges

allocate_regimes_from_shifts()

Allocation of regimes to nodes.

allocate_shifts_from_regimes()

Allocation of shifts to edges

check_parsimony()

Check Parsimony, assuming no homoplasy

clusters_from_shifts()

Clustering associated to a shift allocation, assuming no homoplasy.

compute_betas_from_shifts()

Computation of the optimal values at nodes and tips.

compute_shifts_from_betas()

Computation of shifts from the vector of optimal values

correspondenceEdges()

Correspondence between edges numbers

enumerate_tips_under_edges()

Tips descendants of nodes.

Tree Matrices

Functions for computing several matrices associated with a tree.

compute_dist_phy()

Phylogenetic Distances

compute_times_ca()

Common Ancestors Times

incidence.matrix()

Incidence matrix of a tree.

incidence.matrix.full()

Incidence matrix of a tree.

shifts.list_to_matrix()

Compute the matrix of shifts.

shifts.matrix_to_list()

Compute the list of shifts.

OU Helper Functions

Miscellaneous functions to deal with the OU process

compute_stationary_variance()

Compute the stationary variance matrix

transform_branch_length()

Transform branch length for a re-scaled BM

extract()

Extraction function

Dataset

New World Monkeys dataset

monkeys

New World Monkeys dataset