getBoundsSelectionStrength | R Documentation |
Find reasonable bounds on the alpha
parameter.
getBoundsSelectionStrength(
phy,
relative_half_life_min = 1e-04,
relative_half_life_max = 10000
)
phy |
a phylogenetic tree. |
relative_half_life_min |
optional minimal half life relative to tree height |
relative_half_life_max |
optional maximal half life relative to tree height |
This functions 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 = 10000
(selection is week and the process looks like a BM).
The default minimum value for D
is relative_half_life_min = 0.0001
(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.
A vector with lower and upper bounds for alpha
Hansen, T. F. (1997). Stabilizing Selection and the Comparative Analysis of Adaptation. Evolution, 51(5) :1341.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.