Get Bounds on alpha for an OU
getBoundsSelectionStrength.RdFind reasonable bounds on the alpha parameter of an OU process on a tree
when fitted with phylolm.
Usage
getBoundsSelectionStrength(
phy,
relative_half_life_min = 1e-04,
relative_half_life_max = 10000
)Details
This function tries to find reasonable bounds on the \(\alpha\) parameter of an OU process by using the scaled phylogenetic half-life \(t_{1/2} = \log(2) / \alpha / h\), where \(h\) is the total height of the tree. If \(t_{1/2} = D)\), it means that the trait will need a time \(D \times h\) to cover half the distance to the optimal value (see Hansen, 1997). Small values of \(D\) means high selection pressure (large \(\alpha\)), while large values of \(D\) means low selection pressure (small \(\alpha\)).
The default maximum value for \(D\) is relative_half_life_max = 1e4
(selection is week and the process looks like a BM).
The default minimum value for \(D\) is relative_half_life_min = 1e-4
(selection is strong and tips are only weakly correlated).
The function makes sure that the maximum \(\alpha\) value associated with
relative_half_life_min does not lead to underflow errors when rescaling
the tree.