Learn R Programming

PhylogeneticEM (version 1.0.0)

optimize_costs_given_shift_position.OU.specialCase: Minimization of the sum of costs, given the shift position.

Description

optimize_costs_given_shift_position.OU.specialCase minimize the sum of costs when the shift position is fixed.

Usage

optimize_costs_given_shift_position.OU.specialCase(phylo, conditional_law_X, selection.strength, shifts_edges, ...)

Arguments

phylo
a phylogenetic tree
conditional_law_X
moments of the conditional law of X given Y, result of function compute_M.OU.specialCase
selection.strength
the selection strength
shifts_edges
the vector of the position of the shifts on the tree

Value

List containing : beta_0 : the optimal value at the root shifts : list containing the computed tau and delta costs : vector of costs

Details

This function find the regimes of each node using function allocate_regimes_from_shifts and optimize the sum of costs, computed using function compute_diff_exp.OU, in the values of the optimal values betas (using a close formula). It then goes back to a shift expression of the problem using function compute_shifts_from_betas.